diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-01-30 11:20:39 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2024-01-30 12:12:51 +0300 |
commit | be737fd8956853e06bd2c4f9fcd4a85188f4c172 (patch) | |
tree | 5bd76802fac1096dfd90983c7739d50de367a79f /vendor/github.com/envoyproxy/go-control-plane/envoy/config/route/v3/route.pb.validate.go | |
parent | fe62880c46b1f2c9fec779b0dc39f8a92ce256a5 (diff) | |
download | ydb-be737fd8956853e06bd2c4f9fcd4a85188f4c172.tar.gz |
Update vendor/github.com/envoyproxy/go-control-plane to 0.12.0
Diffstat (limited to 'vendor/github.com/envoyproxy/go-control-plane/envoy/config/route/v3/route.pb.validate.go')
-rw-r--r-- | vendor/github.com/envoyproxy/go-control-plane/envoy/config/route/v3/route.pb.validate.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/route/v3/route.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/route/v3/route.pb.validate.go index ce8a399e8d..78991464dc 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/route/v3/route.pb.validate.go +++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/route/v3/route.pb.validate.go @@ -438,6 +438,35 @@ func (m *RouteConfiguration) validate(all bool) error { } } + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + 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 RouteConfigurationValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + if len(errors) > 0 { return RouteConfigurationMultiError(errors) } |