repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
list
docstring
stringlengths
6
2.61k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
85
252
partition
stringclasses
1 value
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/wrapper.pb.validate.go
Validate
func (m *TraceWrapper) Validate() error { if m == nil { return nil } switch m.Trace.(type) { case *TraceWrapper_HttpBufferedTrace: { tmp := m.GetHttpBufferedTrace() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "HttpBufferedTrace", reason: "embedded message failed validation", cause: err, } } } } case *TraceWrapper_HttpStreamedTraceSegment: { tmp := m.GetHttpStreamedTraceSegment() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "HttpStreamedTraceSegment", reason: "embedded message failed validation", cause: err, } } } } case *TraceWrapper_SocketBufferedTrace: { tmp := m.GetSocketBufferedTrace() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "SocketBufferedTrace", reason: "embedded message failed validation", cause: err, } } } } case *TraceWrapper_SocketStreamedTraceSegment: { tmp := m.GetSocketStreamedTraceSegment() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "SocketStreamedTraceSegment", reason: "embedded message failed validation", cause: err, } } } } default: return TraceWrapperValidationError{ field: "Trace", reason: "value is required", } } return nil }
go
func (m *TraceWrapper) Validate() error { if m == nil { return nil } switch m.Trace.(type) { case *TraceWrapper_HttpBufferedTrace: { tmp := m.GetHttpBufferedTrace() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "HttpBufferedTrace", reason: "embedded message failed validation", cause: err, } } } } case *TraceWrapper_HttpStreamedTraceSegment: { tmp := m.GetHttpStreamedTraceSegment() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "HttpStreamedTraceSegment", reason: "embedded message failed validation", cause: err, } } } } case *TraceWrapper_SocketBufferedTrace: { tmp := m.GetSocketBufferedTrace() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "SocketBufferedTrace", reason: "embedded message failed validation", cause: err, } } } } case *TraceWrapper_SocketStreamedTraceSegment: { tmp := m.GetSocketStreamedTraceSegment() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceWrapperValidationError{ field: "SocketStreamedTraceSegment", reason: "embedded message failed validation", cause: err, } } } } default: return TraceWrapperValidationError{ field: "Trace", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "TraceWrapper", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "Trace", ".", "(", "type", ")", "{", "case", "*", "TraceWrapper_HttpBufferedTrace", "...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/wrapper.pb.validate.go#L39-L123
train
envoyproxy/go-control-plane
envoy/api/v2/rds.pb.validate.go
Validate
func (m *RouteConfiguration) Validate() error { if m == nil { return nil } // no validation rules for Name for idx, item := range m.GetVirtualHosts() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("VirtualHosts[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetVhds() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: "Vhds", reason: "embedded message failed validation", cause: err, } } } } if len(m.GetResponseHeadersToAdd()) > 1000 { return RouteConfigurationValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } if len(m.GetRequestHeadersToAdd()) > 1000 { return RouteConfigurationValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetValidateClusters() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: "ValidateClusters", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *RouteConfiguration) Validate() error { if m == nil { return nil } // no validation rules for Name for idx, item := range m.GetVirtualHosts() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("VirtualHosts[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetVhds() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: "Vhds", reason: "embedded message failed validation", cause: err, } } } } if len(m.GetResponseHeadersToAdd()) > 1000 { return RouteConfigurationValidationError{ field: "ResponseHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } } for idx, item := range m.GetResponseHeadersToAdd() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } if len(m.GetRequestHeadersToAdd()) > 1000 { return RouteConfigurationValidationError{ field: "RequestHeadersToAdd", reason: "value must contain no more than 1000 item(s)", } } for idx, item := range m.GetRequestHeadersToAdd() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetValidateClusters() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteConfigurationValidationError{ field: "ValidateClusters", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "RouteConfiguration", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Name", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetVirtualHosts",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/rds.pb.validate.go#L39-L151
train
envoyproxy/go-control-plane
envoy/api/v2/rds.pb.validate.go
Validate
func (m *Vhds) Validate() error { if m == nil { return nil } { tmp := m.GetConfigSource() if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VhdsValidationError{ field: "ConfigSource", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *Vhds) Validate() error { if m == nil { return nil } { tmp := m.GetConfigSource() if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return VhdsValidationError{ field: "ConfigSource", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "Vhds", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetConfigSource", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", "...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/rds.pb.validate.go#L211-L232
train
envoyproxy/go-control-plane
envoy/admin/v2alpha/server_info.pb.validate.go
Validate
func (m *ServerInfo) Validate() error { if m == nil { return nil } // no validation rules for Version // no validation rules for State { tmp := m.GetUptimeCurrentEpoch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "UptimeCurrentEpoch", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetUptimeAllEpochs() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "UptimeAllEpochs", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetCommandLineOptions() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "CommandLineOptions", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *ServerInfo) Validate() error { if m == nil { return nil } // no validation rules for Version // no validation rules for State { tmp := m.GetUptimeCurrentEpoch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "UptimeCurrentEpoch", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetUptimeAllEpochs() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "UptimeAllEpochs", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetCommandLineOptions() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ServerInfoValidationError{ field: "CommandLineOptions", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "ServerInfo", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Version", "// no validation rules for State", "{", "tmp", ":=", "m", ".", "GetUptimeCurre...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/server_info.pb.validate.go#L38-L93
train
envoyproxy/go-control-plane
envoy/admin/v2alpha/server_info.pb.validate.go
Validate
func (m *CommandLineOptions) Validate() error { if m == nil { return nil } // no validation rules for BaseId // no validation rules for Concurrency // no validation rules for ConfigPath // no validation rules for ConfigYaml // no validation rules for AllowUnknownFields // 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 LogPath // no validation rules for HotRestartVersion // no validation rules for ServiceCluster // no validation rules for ServiceNode // no validation rules for ServiceZone { tmp := m.GetFileFlushInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "FileFlushInterval", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetDrainTime() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "DrainTime", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetParentShutdownTime() if v, ok := interface{}(tmp).(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 MaxStats // no validation rules for MaxObjNameLen // no validation rules for DisableHotRestart // no validation rules for EnableMutexTracing // no validation rules for RestartEpoch // no validation rules for CpusetThreads return nil }
go
func (m *CommandLineOptions) Validate() error { if m == nil { return nil } // no validation rules for BaseId // no validation rules for Concurrency // no validation rules for ConfigPath // no validation rules for ConfigYaml // no validation rules for AllowUnknownFields // 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 LogPath // no validation rules for HotRestartVersion // no validation rules for ServiceCluster // no validation rules for ServiceNode // no validation rules for ServiceZone { tmp := m.GetFileFlushInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "FileFlushInterval", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetDrainTime() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommandLineOptionsValidationError{ field: "DrainTime", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetParentShutdownTime() if v, ok := interface{}(tmp).(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 MaxStats // no validation rules for MaxObjNameLen // no validation rules for DisableHotRestart // no validation rules for EnableMutexTracing // no validation rules for RestartEpoch // no validation rules for CpusetThreads return nil }
[ "func", "(", "m", "*", "CommandLineOptions", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for BaseId", "// no validation rules for Concurrency", "// no validation rules for ConfigPath",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/server_info.pb.validate.go#L152-L247
train
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *Tracing) Validate() error { if m == nil { return nil } { tmp := m.GetHttp() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "Http", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *Tracing) Validate() error { if m == nil { return nil } { tmp := m.GetHttp() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TracingValidationError{ field: "Http", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "Tracing", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetHttp", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", "{", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/trace/v2/trace.pb.validate.go#L38-L59
train
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *LightstepConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return LightstepConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetAccessTokenFile()) < 1 { return LightstepConfigValidationError{ field: "AccessTokenFile", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *LightstepConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return LightstepConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetAccessTokenFile()) < 1 { return LightstepConfigValidationError{ field: "AccessTokenFile", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "LightstepConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCollectorCluster", "(", ")", ")", "<", "1", "{", "return", "Lightste...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/trace/v2/trace.pb.validate.go#L118-L138
train
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *ZipkinConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return ZipkinConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetCollectorEndpoint()) < 1 { return ZipkinConfigValidationError{ field: "CollectorEndpoint", reason: "value length must be at least 1 bytes", } } // no validation rules for TraceId_128Bit { tmp := m.GetSharedSpanContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ZipkinConfigValidationError{ field: "SharedSpanContext", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *ZipkinConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return ZipkinConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetCollectorEndpoint()) < 1 { return ZipkinConfigValidationError{ field: "CollectorEndpoint", reason: "value length must be at least 1 bytes", } } // no validation rules for TraceId_128Bit { tmp := m.GetSharedSpanContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ZipkinConfigValidationError{ field: "SharedSpanContext", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "ZipkinConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCollectorCluster", "(", ")", ")", "<", "1", "{", "return", "ZipkinConfi...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/trace/v2/trace.pb.validate.go#L197-L234
train
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *DynamicOtConfig) Validate() error { if m == nil { return nil } if len(m.GetLibrary()) < 1 { return DynamicOtConfigValidationError{ field: "Library", reason: "value length must be at least 1 bytes", } } { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DynamicOtConfigValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *DynamicOtConfig) Validate() error { if m == nil { return nil } if len(m.GetLibrary()) < 1 { return DynamicOtConfigValidationError{ field: "Library", reason: "value length must be at least 1 bytes", } } { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DynamicOtConfigValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "DynamicOtConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetLibrary", "(", ")", ")", "<", "1", "{", "return", "DynamicOtConfigVa...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/trace/v2/trace.pb.validate.go#L293-L321
train
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *DatadogConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return DatadogConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetServiceName()) < 1 { return DatadogConfigValidationError{ field: "ServiceName", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *DatadogConfig) Validate() error { if m == nil { return nil } if len(m.GetCollectorCluster()) < 1 { return DatadogConfigValidationError{ field: "CollectorCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetServiceName()) < 1 { return DatadogConfigValidationError{ field: "ServiceName", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "DatadogConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCollectorCluster", "(", ")", ")", "<", "1", "{", "return", "DatadogCon...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/trace/v2/trace.pb.validate.go#L380-L400
train
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *TraceServiceConfig) Validate() error { if m == nil { return nil } if m.GetGrpcService() == nil { return TraceServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } } { tmp := m.GetGrpcService() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceServiceConfigValidationError{ field: "GrpcService", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *TraceServiceConfig) Validate() error { if m == nil { return nil } if m.GetGrpcService() == nil { return TraceServiceConfigValidationError{ field: "GrpcService", reason: "value is required", } } { tmp := m.GetGrpcService() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TraceServiceConfigValidationError{ field: "GrpcService", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "TraceServiceConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetGrpcService", "(", ")", "==", "nil", "{", "return", "TraceServiceConfigValidationEr...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/trace/v2/trace.pb.validate.go#L459-L487
train
envoyproxy/go-control-plane
envoy/config/trace/v2/trace.pb.validate.go
Validate
func (m *Tracing_Http) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return Tracing_HttpValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *Tracing_Http_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Tracing_HttpValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *Tracing_Http_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Tracing_HttpValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *Tracing_Http) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return Tracing_HttpValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *Tracing_Http_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Tracing_HttpValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *Tracing_Http_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Tracing_HttpValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "Tracing_Http", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "Tracing_HttpValidationE...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/trace/v2/trace.pb.validate.go#L548-L599
train
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *UpstreamBindConfig) Validate() error { if m == nil { return nil } { tmp := m.GetSourceAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamBindConfigValidationError{ field: "SourceAddress", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *UpstreamBindConfig) Validate() error { if m == nil { return nil } { tmp := m.GetSourceAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamBindConfigValidationError{ field: "SourceAddress", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "UpstreamBindConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetSourceAddress", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cds.pb.validate.go#L563-L584
train
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *UpstreamConnectionOptions) Validate() error { if m == nil { return nil } { tmp := m.GetTcpKeepalive() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamConnectionOptionsValidationError{ field: "TcpKeepalive", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *UpstreamConnectionOptions) Validate() error { if m == nil { return nil } { tmp := m.GetTcpKeepalive() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamConnectionOptionsValidationError{ field: "TcpKeepalive", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "UpstreamConnectionOptions", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetTcpKeepalive", "(", ")", "\n\n", "if", "v", ",", "ok", ":=...
// 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.
[ "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", "...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cds.pb.validate.go#L645-L666
train
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_CustomClusterType) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return Cluster_CustomClusterTypeValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CustomClusterTypeValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *Cluster_CustomClusterType) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return Cluster_CustomClusterTypeValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CustomClusterTypeValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "Cluster_CustomClusterType", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "Cluster_Cu...
// 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.
[ "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", "...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cds.pb.validate.go#L727-L755
train
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_EdsClusterConfig) Validate() error { if m == nil { return nil } { tmp := m.GetEdsConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_EdsClusterConfigValidationError{ field: "EdsConfig", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ServiceName return nil }
go
func (m *Cluster_EdsClusterConfig) Validate() error { if m == nil { return nil } { tmp := m.GetEdsConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_EdsClusterConfigValidationError{ field: "EdsConfig", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ServiceName return nil }
[ "func", "(", "m", "*", "Cluster_EdsClusterConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetEdsConfig", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// 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.
[ "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", "....
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cds.pb.validate.go#L816-L839
train
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_LbSubsetConfig) Validate() error { if m == nil { return nil } if _, ok := Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { return Cluster_LbSubsetConfigValidationError{ field: "FallbackPolicy", reason: "value must be one of the defined enum values", } } { tmp := m.GetDefaultSubset() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_LbSubsetConfigValidationError{ field: "DefaultSubset", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetSubsetSelectors() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_LbSubsetConfigValidationError{ field: fmt.Sprintf("SubsetSelectors[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for LocalityWeightAware // no validation rules for ScaleLocalityWeight // no validation rules for PanicModeAny return nil }
go
func (m *Cluster_LbSubsetConfig) Validate() error { if m == nil { return nil } if _, ok := Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { return Cluster_LbSubsetConfigValidationError{ field: "FallbackPolicy", reason: "value must be one of the defined enum values", } } { tmp := m.GetDefaultSubset() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_LbSubsetConfigValidationError{ field: "DefaultSubset", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetSubsetSelectors() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_LbSubsetConfigValidationError{ field: fmt.Sprintf("SubsetSelectors[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for LocalityWeightAware // no validation rules for ScaleLocalityWeight // no validation rules for PanicModeAny return nil }
[ "func", "(", "m", "*", "Cluster_LbSubsetConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name", "[", "int32", "(", ...
// 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.
[ "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", "." ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cds.pb.validate.go#L900-L954
train
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_LeastRequestLbConfig) Validate() error { if m == nil { return nil } if wrapper := m.GetChoiceCount(); wrapper != nil { if wrapper.GetValue() < 2 { return Cluster_LeastRequestLbConfigValidationError{ field: "ChoiceCount", reason: "value must be greater than or equal to 2", } } } return nil }
go
func (m *Cluster_LeastRequestLbConfig) Validate() error { if m == nil { return nil } if wrapper := m.GetChoiceCount(); wrapper != nil { if wrapper.GetValue() < 2 { return Cluster_LeastRequestLbConfigValidationError{ field: "ChoiceCount", reason: "value must be greater than or equal to 2", } } } return nil }
[ "func", "(", "m", "*", "Cluster_LeastRequestLbConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "wrapper", ":=", "m", ".", "GetChoiceCount", "(", ")", ";", "wrapper", "!=", "nil", ...
// 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.
[ "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", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cds.pb.validate.go#L1015-L1032
train
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
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 }
go
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 }
[ "func", "(", "m", "*", "Cluster_RingHashLbConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "wrapper", ":=", "m", ".", "GetMinimumRingSize", "(", ")", ";", "wrapper", "!=", "nil", ...
// 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.
[ "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", "....
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cds.pb.validate.go#L1094-L1129
train
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_CommonLbConfig) Validate() error { if m == nil { return nil } { tmp := m.GetHealthyPanicThreshold() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "HealthyPanicThreshold", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetUpdateMergeWindow() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "UpdateMergeWindow", reason: "embedded message failed validation", cause: err, } } } } switch m.LocalityConfigSpecifier.(type) { case *Cluster_CommonLbConfig_ZoneAwareLbConfig_: { tmp := m.GetZoneAwareLbConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "ZoneAwareLbConfig", reason: "embedded message failed validation", cause: err, } } } } case *Cluster_CommonLbConfig_LocalityWeightedLbConfig_: { tmp := m.GetLocalityWeightedLbConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "LocalityWeightedLbConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *Cluster_CommonLbConfig) Validate() error { if m == nil { return nil } { tmp := m.GetHealthyPanicThreshold() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "HealthyPanicThreshold", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetUpdateMergeWindow() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "UpdateMergeWindow", reason: "embedded message failed validation", cause: err, } } } } switch m.LocalityConfigSpecifier.(type) { case *Cluster_CommonLbConfig_ZoneAwareLbConfig_: { tmp := m.GetZoneAwareLbConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "ZoneAwareLbConfig", reason: "embedded message failed validation", cause: err, } } } } case *Cluster_CommonLbConfig_LocalityWeightedLbConfig_: { tmp := m.GetLocalityWeightedLbConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfigValidationError{ field: "LocalityWeightedLbConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "Cluster_CommonLbConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetHealthyPanicThreshold", "(", ")", "\n\n", "if", "v", ",", "ok",...
// 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.
[ "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", "." ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cds.pb.validate.go#L1260-L1334
train
envoyproxy/go-control-plane
envoy/api/v2/cds.pb.validate.go
Validate
func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { if m == nil { return nil } { tmp := m.GetRoutingEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ field: "RoutingEnabled", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMinClusterSize() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ field: "MinClusterSize", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { if m == nil { return nil } { tmp := m.GetRoutingEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ field: "RoutingEnabled", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMinClusterSize() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ field: "MinClusterSize", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "Cluster_CommonLbConfig_ZoneAwareLbConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetRoutingEnabled", "(", ")", "\n\n", "if", "v", "...
// 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.
[ "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", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cds.pb.validate.go#L1463-L1499
train
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
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 }
go
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 }
[ "func", "(", "m", "*", "TlsParameters", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "TlsParameters_TlsProtocol_name", "[", "int32", "(", "m", ".", "GetTlsMinimumP...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/auth/cert.pb.validate.go#L39-L59
train
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *TlsCertificate) Validate() error { if m == nil { return nil } { tmp := m.GetCertificateChain() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "CertificateChain", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetPrivateKey() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "PrivateKey", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetPassword() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "Password", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetOcspStaple() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "OcspStaple", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetSignedCertificateTimestamp() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *TlsCertificate) Validate() error { if m == nil { return nil } { tmp := m.GetCertificateChain() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "CertificateChain", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetPrivateKey() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "PrivateKey", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetPassword() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "Password", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetOcspStaple() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: "OcspStaple", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetSignedCertificateTimestamp() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsCertificateValidationError{ field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "TlsCertificate", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetCertificateChain", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "i...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/auth/cert.pb.validate.go#L118-L204
train
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
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 { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsSessionTicketKeysValidationError{ field: fmt.Sprintf("Keys[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
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 { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TlsSessionTicketKeysValidationError{ field: fmt.Sprintf("Keys[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "TlsSessionTicketKeys", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetKeys", "(", ")", ")", "<", "1", "{", "return", "TlsSessionTicke...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/auth/cert.pb.validate.go#L263-L296
train
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *CertificateValidationContext) Validate() error { if m == nil { return nil } { tmp := m.GetTrustedCa() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "TrustedCa", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetVerifyCertificateSpki() { _, _ = idx, item if len(item) != 44 { return CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx), reason: "value length must be 44 bytes", } } } for idx, item := range m.GetVerifyCertificateHash() { _, _ = idx, item if l := len(item); l < 64 || l > 95 { return CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateHash[%v]", idx), reason: "value length must be between 64 and 95 bytes, inclusive", } } } { tmp := m.GetRequireOcspStaple() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "RequireOcspStaple", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRequireSignedCertificateTimestamp() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "RequireSignedCertificateTimestamp", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetCrl() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "Crl", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for AllowExpiredCertificate return nil }
go
func (m *CertificateValidationContext) Validate() error { if m == nil { return nil } { tmp := m.GetTrustedCa() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "TrustedCa", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetVerifyCertificateSpki() { _, _ = idx, item if len(item) != 44 { return CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx), reason: "value length must be 44 bytes", } } } for idx, item := range m.GetVerifyCertificateHash() { _, _ = idx, item if l := len(item); l < 64 || l > 95 { return CertificateValidationContextValidationError{ field: fmt.Sprintf("VerifyCertificateHash[%v]", idx), reason: "value length must be between 64 and 95 bytes, inclusive", } } } { tmp := m.GetRequireOcspStaple() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "RequireOcspStaple", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRequireSignedCertificateTimestamp() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "RequireSignedCertificateTimestamp", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetCrl() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CertificateValidationContextValidationError{ field: "Crl", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for AllowExpiredCertificate return nil }
[ "func", "(", "m", "*", "CertificateValidationContext", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetTrustedCa", "(", ")", "\n\n", "if", "v", ",", "ok", ":=...
// 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.
[ "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", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/auth/cert.pb.validate.go#L357-L449
train
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *UpstreamTlsContext) Validate() error { if m == nil { return nil } { tmp := m.GetCommonTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "CommonTlsContext", reason: "embedded message failed validation", cause: err, } } } } if len(m.GetSni()) > 255 { return UpstreamTlsContextValidationError{ field: "Sni", reason: "value length must be at most 255 bytes", } } // no validation rules for AllowRenegotiation { tmp := m.GetMaxSessionKeys() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "MaxSessionKeys", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *UpstreamTlsContext) Validate() error { if m == nil { return nil } { tmp := m.GetCommonTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "CommonTlsContext", reason: "embedded message failed validation", cause: err, } } } } if len(m.GetSni()) > 255 { return UpstreamTlsContextValidationError{ field: "Sni", reason: "value length must be at most 255 bytes", } } // no validation rules for AllowRenegotiation { tmp := m.GetMaxSessionKeys() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamTlsContextValidationError{ field: "MaxSessionKeys", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "UpstreamTlsContext", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetCommonTlsContext", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/auth/cert.pb.validate.go#L693-L738
train
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *DownstreamTlsContext) Validate() error { if m == nil { return nil } { tmp := m.GetCommonTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "CommonTlsContext", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRequireClientCertificate() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "RequireClientCertificate", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRequireSni() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "RequireSni", reason: "embedded message failed validation", cause: err, } } } } switch m.SessionTicketKeysType.(type) { case *DownstreamTlsContext_SessionTicketKeys: { tmp := m.GetSessionTicketKeys() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "SessionTicketKeys", reason: "embedded message failed validation", cause: err, } } } } case *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig: { tmp := m.GetSessionTicketKeysSdsSecretConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "SessionTicketKeysSdsSecretConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *DownstreamTlsContext) Validate() error { if m == nil { return nil } { tmp := m.GetCommonTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "CommonTlsContext", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRequireClientCertificate() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "RequireClientCertificate", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRequireSni() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "RequireSni", reason: "embedded message failed validation", cause: err, } } } } switch m.SessionTicketKeysType.(type) { case *DownstreamTlsContext_SessionTicketKeys: { tmp := m.GetSessionTicketKeys() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "SessionTicketKeys", reason: "embedded message failed validation", cause: err, } } } } case *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig: { tmp := m.GetSessionTicketKeysSdsSecretConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DownstreamTlsContextValidationError{ field: "SessionTicketKeysSdsSecretConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "DownstreamTlsContext", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetCommonTlsContext", "(", ")", "\n\n", "if", "v", ",", "ok", ":="...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/auth/cert.pb.validate.go#L799-L888
train
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *SdsSecretConfig) Validate() error { if m == nil { return nil } // no validation rules for Name { tmp := m.GetSdsConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SdsSecretConfigValidationError{ field: "SdsConfig", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *SdsSecretConfig) Validate() error { if m == nil { return nil } // no validation rules for Name { tmp := m.GetSdsConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SdsSecretConfigValidationError{ field: "SdsConfig", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "SdsSecretConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Name", "{", "tmp", ":=", "m", ".", "GetSdsConfig", "(", ")", "\n\n", "if", "...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/auth/cert.pb.validate.go#L949-L972
train
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *Secret) Validate() error { if m == nil { return nil } // no validation rules for Name switch m.Type.(type) { case *Secret_TlsCertificate: { tmp := m.GetTlsCertificate() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "TlsCertificate", reason: "embedded message failed validation", cause: err, } } } } case *Secret_SessionTicketKeys: { tmp := m.GetSessionTicketKeys() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "SessionTicketKeys", reason: "embedded message failed validation", cause: err, } } } } case *Secret_ValidationContext: { tmp := m.GetValidationContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "ValidationContext", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *Secret) Validate() error { if m == nil { return nil } // no validation rules for Name switch m.Type.(type) { case *Secret_TlsCertificate: { tmp := m.GetTlsCertificate() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "TlsCertificate", reason: "embedded message failed validation", cause: err, } } } } case *Secret_SessionTicketKeys: { tmp := m.GetSessionTicketKeys() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "SessionTicketKeys", reason: "embedded message failed validation", cause: err, } } } } case *Secret_ValidationContext: { tmp := m.GetValidationContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SecretValidationError{ field: "ValidationContext", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "Secret", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Name", "switch", "m", ".", "Type", ".", "(", "type", ")", "{", "case", "*", "Secret...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/auth/cert.pb.validate.go#L1030-L1093
train
envoyproxy/go-control-plane
envoy/api/v2/auth/cert.pb.validate.go
Validate
func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error { if m == nil { return nil } if m.GetDefaultValidationContext() == nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "DefaultValidationContext", reason: "value is required", } } { tmp := m.GetDefaultValidationContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "DefaultValidationContext", reason: "embedded message failed validation", cause: err, } } } } if m.GetValidationContextSdsSecretConfig() == nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextSdsSecretConfig", reason: "value is required", } } { tmp := m.GetValidationContextSdsSecretConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextSdsSecretConfig", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error { if m == nil { return nil } if m.GetDefaultValidationContext() == nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "DefaultValidationContext", reason: "value is required", } } { tmp := m.GetDefaultValidationContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "DefaultValidationContext", reason: "embedded message failed validation", cause: err, } } } } if m.GetValidationContextSdsSecretConfig() == nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextSdsSecretConfig", reason: "value is required", } } { tmp := m.GetValidationContextSdsSecretConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonTlsContext_CombinedCertificateValidationContextValidationError{ field: "ValidationContextSdsSecretConfig", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "CommonTlsContext_CombinedCertificateValidationContext", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetDefaultValidationContext", "(", ")", "==", "nil", "{...
// 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.
[ "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...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/auth/cert.pb.validate.go#L1153-L1203
train
envoyproxy/go-control-plane
envoy/config/filter/http/csrf/v2/csrf.pb.validate.go
Validate
func (m *CsrfPolicy) Validate() error { if m == nil { return nil } if m.GetFilterEnabled() == nil { return CsrfPolicyValidationError{ field: "FilterEnabled", reason: "value is required", } } { tmp := m.GetFilterEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: "FilterEnabled", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetShadowEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: "ShadowEnabled", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *CsrfPolicy) Validate() error { if m == nil { return nil } if m.GetFilterEnabled() == nil { return CsrfPolicyValidationError{ field: "FilterEnabled", reason: "value is required", } } { tmp := m.GetFilterEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: "FilterEnabled", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetShadowEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CsrfPolicyValidationError{ field: "ShadowEnabled", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "CsrfPolicy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetFilterEnabled", "(", ")", "==", "nil", "{", "return", "CsrfPolicyValidationError", "{", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/csrf/v2/csrf.pb.validate.go#L38-L81
train
envoyproxy/go-control-plane
envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.validate.go
Validate
func (m *InjectedResourceConfig) Validate() error { if m == nil { return nil } if len(m.GetFilename()) < 1 { return InjectedResourceConfigValidationError{ field: "Filename", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *InjectedResourceConfig) Validate() error { if m == nil { return nil } if len(m.GetFilename()) < 1 { return InjectedResourceConfigValidationError{ field: "Filename", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "InjectedResourceConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetFilename", "(", ")", ")", "<", "1", "{", "return", "InjectedR...
// 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.
[ "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", "." ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.pb.validate.go#L39-L52
train
envoyproxy/go-control-plane
envoy/api/v2/listener/listener.pb.validate.go
Validate
func (m *Filter) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return FilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *Filter_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *Filter_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *Filter) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return FilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *Filter_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *Filter_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "Filter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "FilterValidationError", "{"...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/listener/listener.pb.validate.go#L38-L89
train
envoyproxy/go-control-plane
envoy/api/v2/listener/listener.pb.validate.go
Validate
func (m *FilterChainMatch) Validate() error { if m == nil { return nil } if wrapper := m.GetDestinationPort(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 65535 { return FilterChainMatchValidationError{ field: "DestinationPort", reason: "value must be inside range [1, 65535]", } } } for idx, item := range m.GetPrefixRanges() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("PrefixRanges[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for AddressSuffix { tmp := m.GetSuffixLen() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: "SuffixLen", reason: "embedded message failed validation", cause: err, } } } } if _, ok := FilterChainMatch_ConnectionSourceType_name[int32(m.GetSourceType())]; !ok { return FilterChainMatchValidationError{ field: "SourceType", reason: "value must be one of the defined enum values", } } for idx, item := range m.GetSourcePrefixRanges() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetSourcePorts() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("SourcePorts[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for TransportProtocol return nil }
go
func (m *FilterChainMatch) Validate() error { if m == nil { return nil } if wrapper := m.GetDestinationPort(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 65535 { return FilterChainMatchValidationError{ field: "DestinationPort", reason: "value must be inside range [1, 65535]", } } } for idx, item := range m.GetPrefixRanges() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("PrefixRanges[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for AddressSuffix { tmp := m.GetSuffixLen() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: "SuffixLen", reason: "embedded message failed validation", cause: err, } } } } if _, ok := FilterChainMatch_ConnectionSourceType_name[int32(m.GetSourceType())]; !ok { return FilterChainMatchValidationError{ field: "SourceType", reason: "value must be one of the defined enum values", } } for idx, item := range m.GetSourcePrefixRanges() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetSourcePorts() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainMatchValidationError{ field: fmt.Sprintf("SourcePorts[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for TransportProtocol return nil }
[ "func", "(", "m", "*", "FilterChainMatch", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "wrapper", ":=", "m", ".", "GetDestinationPort", "(", ")", ";", "wrapper", "!=", "nil", "{", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/listener/listener.pb.validate.go#L148-L251
train
envoyproxy/go-control-plane
envoy/api/v2/listener/listener.pb.validate.go
Validate
func (m *FilterChain) Validate() error { if m == nil { return nil } { tmp := m.GetFilterChainMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "FilterChainMatch", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "TlsContext", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetFilters() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: fmt.Sprintf("Filters[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetUseProxyProto() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "UseProxyProto", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMetadata() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetTransportSocket() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "TransportSocket", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *FilterChain) Validate() error { if m == nil { return nil } { tmp := m.GetFilterChainMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "FilterChainMatch", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetTlsContext() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "TlsContext", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetFilters() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: fmt.Sprintf("Filters[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetUseProxyProto() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "UseProxyProto", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMetadata() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetTransportSocket() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FilterChainValidationError{ field: "TransportSocket", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "FilterChain", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetFilterChainMatch", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "inte...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/listener/listener.pb.validate.go#L310-L411
train
envoyproxy/go-control-plane
envoy/api/v2/listener/listener.pb.validate.go
Validate
func (m *ListenerFilter) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return ListenerFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *ListenerFilter_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *ListenerFilter_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *ListenerFilter) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return ListenerFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *ListenerFilter_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *ListenerFilter_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListenerFilterValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "ListenerFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "ListenerFilterValidat...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/listener/listener.pb.validate.go#L470-L521
train
envoyproxy/go-control-plane
envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go
Validate
func (m *TcpProxy_DeprecatedV1) Validate() 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)", } } for idx, item := range m.GetRoutes() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_DeprecatedV1ValidationError{ field: fmt.Sprintf("Routes[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *TcpProxy_DeprecatedV1) Validate() 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)", } } for idx, item := range m.GetRoutes() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_DeprecatedV1ValidationError{ field: fmt.Sprintf("Routes[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "TcpProxy_DeprecatedV1", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetRoutes", "(", ")", ")", "<", "1", "{", "return", "TcpProxy_Dep...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go#L245-L278
train
envoyproxy/go-control-plane
envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go
Validate
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 { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_WeightedClusterValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
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 { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_WeightedClusterValidationError{ field: fmt.Sprintf("Clusters[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "TcpProxy_WeightedCluster", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetClusters", "(", ")", ")", "<", "1", "{", "return", "TcpProx...
// 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.
[ "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", "....
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go#L339-L372
train
envoyproxy/go-control-plane
envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go
Validate
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 { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_DeprecatedV1_TCPRouteValidationError{ field: fmt.Sprintf("DestinationIpList[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for DestinationPorts for idx, item := range m.GetSourceIpList() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_DeprecatedV1_TCPRouteValidationError{ field: fmt.Sprintf("SourceIpList[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for SourcePorts return nil }
go
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 { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_DeprecatedV1_TCPRouteValidationError{ field: fmt.Sprintf("DestinationIpList[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for DestinationPorts for idx, item := range m.GetSourceIpList() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpProxy_DeprecatedV1_TCPRouteValidationError{ field: fmt.Sprintf("SourceIpList[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for SourcePorts return nil }
[ "func", "(", "m", "*", "TcpProxy_DeprecatedV1_TCPRoute", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCluster", "(", ")", ")", "<", "1", "{", "return", "Tc...
// 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.
[ "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"...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go#L433-L490
train
envoyproxy/go-control-plane
envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go
Validate
func (m *TcpProxy_WeightedCluster_ClusterWeight) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } if m.GetWeight() < 1 { return TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "Weight", reason: "value must be greater than or equal to 1", } } return nil }
go
func (m *TcpProxy_WeightedCluster_ClusterWeight) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } if m.GetWeight() < 1 { return TcpProxy_WeightedCluster_ClusterWeightValidationError{ field: "Weight", reason: "value must be greater than or equal to 1", } } return nil }
[ "func", "(", "m", "*", "TcpProxy_WeightedCluster_ClusterWeight", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", ...
// 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.
[ "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", "r...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.pb.validate.go#L552-L572
train
envoyproxy/go-control-plane
envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.validate.go
Validate
func (m *MethodMatch) Validate() error { if m == nil { return nil } { tmp := m.GetName() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MethodMatchValidationError{ field: "Name", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ParamsMatch return nil }
go
func (m *MethodMatch) Validate() error { if m == nil { return nil } { tmp := m.GetName() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MethodMatchValidationError{ field: "Name", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ParamsMatch return nil }
[ "func", "(", "m", "*", "MethodMatch", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetName", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", "{...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.validate.go#L422-L445
train
envoyproxy/go-control-plane
envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.validate.go
Validate
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: { tmp := m.GetRangeMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MethodMatch_ParameterMatchSpecifierValidationError{ field: "RangeMatch", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
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: { tmp := m.GetRangeMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MethodMatch_ParameterMatchSpecifierValidationError{ field: "RangeMatch", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "MethodMatch_ParameterMatchSpecifier", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "ParameterMatchSpecifier", ".", "(", "type", ")", "{", "case", "*"...
// 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.
[ "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", "retu...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.pb.validate.go#L504-L534
train
envoyproxy/go-control-plane
envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.validate.go
Validate
func (m *DubboProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return DubboProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } 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 { tmp := item if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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 }
go
func (m *DubboProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return DubboProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } 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 { tmp := item if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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 }
[ "func", "(", "m", "*", "DubboProxy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetStatPrefix", "(", ")", ")", "<", "1", "{", "return", "DubboProxyValidatio...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.validate.go#L38-L105
train
envoyproxy/go-control-plane
envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.validate.go
Validate
func (m *DubboFilter) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return DubboFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DubboFilterValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *DubboFilter) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return DubboFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DubboFilterValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "DubboFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "DubboFilterValidationErr...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.pb.validate.go#L164-L192
train
envoyproxy/go-control-plane
envoy/config/common/tap/v2alpha/common.pb.validate.go
Validate
func (m *CommonExtensionConfig) Validate() error { if m == nil { return nil } switch m.ConfigType.(type) { case *CommonExtensionConfig_AdminConfig: { tmp := m.GetAdminConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonExtensionConfigValidationError{ field: "AdminConfig", reason: "embedded message failed validation", cause: err, } } } } case *CommonExtensionConfig_StaticConfig: { tmp := m.GetStaticConfig() if v, ok := interface{}(tmp).(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 }
go
func (m *CommonExtensionConfig) Validate() error { if m == nil { return nil } switch m.ConfigType.(type) { case *CommonExtensionConfig_AdminConfig: { tmp := m.GetAdminConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CommonExtensionConfigValidationError{ field: "AdminConfig", reason: "embedded message failed validation", cause: err, } } } } case *CommonExtensionConfig_StaticConfig: { tmp := m.GetStaticConfig() if v, ok := interface{}(tmp).(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 }
[ "func", "(", "m", "*", "CommonExtensionConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "ConfigType", ".", "(", "type", ")", "{", "case", "*", "CommonExtensionConfig_...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/common/tap/v2alpha/common.pb.validate.go#L39-L89
train
envoyproxy/go-control-plane
envoy/config/common/tap/v2alpha/common.pb.validate.go
Validate
func (m *AdminConfig) Validate() error { if m == nil { return nil } if len(m.GetConfigId()) < 1 { return AdminConfigValidationError{ field: "ConfigId", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *AdminConfig) Validate() error { if m == nil { return nil } if len(m.GetConfigId()) < 1 { return AdminConfigValidationError{ field: "ConfigId", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "AdminConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetConfigId", "(", ")", ")", "<", "1", "{", "return", "AdminConfigValidatio...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/common/tap/v2alpha/common.pb.validate.go#L150-L163
train
envoyproxy/go-control-plane
envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.validate.go
Validate
func (m *FilterConfig) Validate() error { if m == nil { return nil } if len(m.GetContentType()) < 1 { return FilterConfigValidationError{ field: "ContentType", reason: "value length must be at least 1 bytes", } } // no validation rules for WithholdGrpcFrames return nil }
go
func (m *FilterConfig) Validate() error { if m == nil { return nil } if len(m.GetContentType()) < 1 { return FilterConfigValidationError{ field: "ContentType", reason: "value length must be at least 1 bytes", } } // no validation rules for WithholdGrpcFrames return nil }
[ "func", "(", "m", "*", "FilterConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetContentType", "(", ")", ")", "<", "1", "{", "return", "FilterConfigVali...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.pb.validate.go#L39-L54
train
envoyproxy/go-control-plane
envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go
Validate
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 len(m.GetStatPrefix()) < 1 { return ThriftProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } { tmp := m.GetRouteConfig() if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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, } } } } } return nil }
go
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 len(m.GetStatPrefix()) < 1 { return ThriftProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } { tmp := m.GetRouteConfig() if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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, } } } } } return nil }
[ "func", "(", "m", "*", "ThriftProxy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "TransportType_name", "[", "int32", "(", "m", ".", "GetTransport", "(", ")",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go#L39-L101
train
envoyproxy/go-control-plane
envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go
Validate
func (m *ThriftFilter) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return ThriftFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *ThriftFilter_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftFilterValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *ThriftFilter_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftFilterValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *ThriftFilter) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return ThriftFilterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *ThriftFilter_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftFilterValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *ThriftFilter_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ThriftFilterValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "ThriftFilter", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "ThriftFilterValidationE...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go#L160-L211
train
envoyproxy/go-control-plane
envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go
Validate
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 }
go
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 }
[ "func", "(", "m", "*", "ThriftProtocolOptions", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "TransportType_name", "[", "int32", "(", "m", ".", "GetTransport", "...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.pb.validate.go#L270-L290
train
envoyproxy/go-control-plane
envoy/service/accesslog/v2/als.pb.validate.go
Validate
func (m *StreamAccessLogsMessage) Validate() error { if m == nil { return nil } { tmp := m.GetIdentifier() if v, ok := interface{}(tmp).(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: { tmp := m.GetHttpLogs() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessageValidationError{ field: "HttpLogs", reason: "embedded message failed validation", cause: err, } } } } case *StreamAccessLogsMessage_TcpLogs: { tmp := m.GetTcpLogs() if v, ok := interface{}(tmp).(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 }
go
func (m *StreamAccessLogsMessage) Validate() error { if m == nil { return nil } { tmp := m.GetIdentifier() if v, ok := interface{}(tmp).(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: { tmp := m.GetHttpLogs() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessageValidationError{ field: "HttpLogs", reason: "embedded message failed validation", cause: err, } } } } case *StreamAccessLogsMessage_TcpLogs: { tmp := m.GetTcpLogs() if v, ok := interface{}(tmp).(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 }
[ "func", "(", "m", "*", "StreamAccessLogsMessage", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetIdentifier", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// 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.
[ "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", "."...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/accesslog/v2/als.pb.validate.go#L106-L171
train
envoyproxy/go-control-plane
envoy/service/accesslog/v2/als.pb.validate.go
Validate
func (m *StreamAccessLogsMessage_Identifier) Validate() error { if m == nil { return nil } if m.GetNode() == nil { return StreamAccessLogsMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } } { tmp := m.GetNode() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessage_IdentifierValidationError{ field: "Node", reason: "embedded message failed validation", cause: err, } } } } if len(m.GetLogName()) < 1 { return StreamAccessLogsMessage_IdentifierValidationError{ field: "LogName", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *StreamAccessLogsMessage_Identifier) Validate() error { if m == nil { return nil } if m.GetNode() == nil { return StreamAccessLogsMessage_IdentifierValidationError{ field: "Node", reason: "value is required", } } { tmp := m.GetNode() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamAccessLogsMessage_IdentifierValidationError{ field: "Node", reason: "embedded message failed validation", cause: err, } } } } if len(m.GetLogName()) < 1 { return StreamAccessLogsMessage_IdentifierValidationError{ field: "LogName", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "StreamAccessLogsMessage_Identifier", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetNode", "(", ")", "==", "nil", "{", "return", "StreamAccessLogsMessa...
// 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.
[ "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", "retur...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/accesslog/v2/als.pb.validate.go#L232-L267
train
envoyproxy/go-control-plane
envoy/service/accesslog/v2/als.pb.validate.go
Validate
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 { tmp := item if v, ok := interface{}(tmp).(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 }
go
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 { tmp := item if v, ok := interface{}(tmp).(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 }
[ "func", "(", "m", "*", "StreamAccessLogsMessage_TCPAccessLogEntries", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetLogEntry", "(", ")", ")", "<", "1", "{", "...
// 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.
[ "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",...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/accesslog/v2/als.pb.validate.go#L425-L458
train
envoyproxy/go-control-plane
envoy/config/filter/http/buffer/v2/buffer.pb.validate.go
Validate
func (m *Buffer) Validate() error { if m == nil { return nil } if wrapper := m.GetMaxRequestBytes(); wrapper != nil { if wrapper.GetValue() <= 0 { return BufferValidationError{ field: "MaxRequestBytes", reason: "value must be greater than 0", } } } return nil }
go
func (m *Buffer) Validate() error { if m == nil { return nil } if wrapper := m.GetMaxRequestBytes(); wrapper != nil { if wrapper.GetValue() <= 0 { return BufferValidationError{ field: "MaxRequestBytes", reason: "value must be greater than 0", } } } return nil }
[ "func", "(", "m", "*", "Buffer", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "wrapper", ":=", "m", ".", "GetMaxRequestBytes", "(", ")", ";", "wrapper", "!=", "nil", "{", "if", "w...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/buffer/v2/buffer.pb.validate.go#L38-L55
train
envoyproxy/go-control-plane
envoy/config/filter/http/buffer/v2/buffer.pb.validate.go
Validate
func (m *BufferPerRoute) Validate() error { if m == nil { return nil } switch m.Override.(type) { case *BufferPerRoute_Disabled: if m.GetDisabled() != true { return BufferPerRouteValidationError{ field: "Disabled", reason: "value must equal true", } } case *BufferPerRoute_Buffer: if m.GetBuffer() == nil { return BufferPerRouteValidationError{ field: "Buffer", reason: "value is required", } } { tmp := m.GetBuffer() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BufferPerRouteValidationError{ field: "Buffer", reason: "embedded message failed validation", cause: err, } } } } default: return BufferPerRouteValidationError{ field: "Override", reason: "value is required", } } return nil }
go
func (m *BufferPerRoute) Validate() error { if m == nil { return nil } switch m.Override.(type) { case *BufferPerRoute_Disabled: if m.GetDisabled() != true { return BufferPerRouteValidationError{ field: "Disabled", reason: "value must equal true", } } case *BufferPerRoute_Buffer: if m.GetBuffer() == nil { return BufferPerRouteValidationError{ field: "Buffer", reason: "value is required", } } { tmp := m.GetBuffer() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BufferPerRouteValidationError{ field: "Buffer", reason: "embedded message failed validation", cause: err, } } } } default: return BufferPerRouteValidationError{ field: "Override", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "BufferPerRoute", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "Override", ".", "(", "type", ")", "{", "case", "*", "BufferPerRoute_Disabled", ":"...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/buffer/v2/buffer.pb.validate.go#L114-L163
train
envoyproxy/go-control-plane
envoy/config/accesslog/v2/file.pb.validate.go
Validate
func (m *FileAccessLog) Validate() error { if m == nil { return nil } if len(m.GetPath()) < 1 { return FileAccessLogValidationError{ field: "Path", reason: "value length must be at least 1 bytes", } } switch m.AccessLogFormat.(type) { case *FileAccessLog_Format: // no validation rules for Format case *FileAccessLog_JsonFormat: { tmp := m.GetJsonFormat() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileAccessLogValidationError{ field: "JsonFormat", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *FileAccessLog) Validate() error { if m == nil { return nil } if len(m.GetPath()) < 1 { return FileAccessLogValidationError{ field: "Path", reason: "value length must be at least 1 bytes", } } switch m.AccessLogFormat.(type) { case *FileAccessLog_Format: // no validation rules for Format case *FileAccessLog_JsonFormat: { tmp := m.GetJsonFormat() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FileAccessLogValidationError{ field: "JsonFormat", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "FileAccessLog", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetPath", "(", ")", ")", "<", "1", "{", "return", "FileAccessLogValidatio...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/accesslog/v2/file.pb.validate.go#L39-L76
train
envoyproxy/go-control-plane
envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go
Validate
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 return nil }
go
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 return nil }
[ "func", "(", "m", "*", "BufferSettings", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetMaxRequestBytes", "(", ")", "<=", "0", "{", "return", "BufferSettingsValidationError", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go#L162-L177
train
envoyproxy/go-control-plane
envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go
Validate
func (m *HttpService) Validate() error { if m == nil { return nil } { tmp := m.GetServerUri() if v, ok := interface{}(tmp).(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 { tmp := m.GetAuthorizationRequest() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "AuthorizationRequest", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetAuthorizationResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "AuthorizationResponse", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *HttpService) Validate() error { if m == nil { return nil } { tmp := m.GetServerUri() if v, ok := interface{}(tmp).(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 { tmp := m.GetAuthorizationRequest() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "AuthorizationRequest", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetAuthorizationResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpServiceValidationError{ field: "AuthorizationResponse", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "HttpService", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetServerUri", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go#L236-L289
train
envoyproxy/go-control-plane
envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go
Validate
func (m *AuthorizationRequest) Validate() error { if m == nil { return nil } { tmp := m.GetAllowedHeaders() if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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 }
go
func (m *AuthorizationRequest) Validate() error { if m == nil { return nil } { tmp := m.GetAllowedHeaders() if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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 }
[ "func", "(", "m", "*", "AuthorizationRequest", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetAllowedHeaders", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go#L348-L389
train
envoyproxy/go-control-plane
envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go
Validate
func (m *AuthorizationResponse) Validate() error { if m == nil { return nil } { tmp := m.GetAllowedUpstreamHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationResponseValidationError{ field: "AllowedUpstreamHeaders", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetAllowedClientHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationResponseValidationError{ field: "AllowedClientHeaders", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *AuthorizationResponse) Validate() error { if m == nil { return nil } { tmp := m.GetAllowedUpstreamHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationResponseValidationError{ field: "AllowedUpstreamHeaders", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetAllowedClientHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AuthorizationResponseValidationError{ field: "AllowedClientHeaders", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "AuthorizationResponse", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetAllowedUpstreamHeaders", "(", ")", "\n\n", "if", "v", ",", "ok",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go#L450-L486
train
envoyproxy/go-control-plane
envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go
Validate
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", } } { tmp := m.GetCheckSettings() if v, ok := interface{}(tmp).(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 }
go
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", } } { tmp := m.GetCheckSettings() if v, ok := interface{}(tmp).(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 }
[ "func", "(", "m", "*", "ExtAuthzPerRoute", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "Override", ".", "(", "type", ")", "{", "case", "*", "ExtAuthzPerRoute_Disabled", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/ext_authz/v2/ext_authz.pb.validate.go#L547-L596
train
envoyproxy/go-control-plane
pkg/cache/status.go
newStatusInfo
func newStatusInfo(node *core.Node) *statusInfo { out := statusInfo{ node: node, watches: make(map[int64]ResponseWatch), } return &out }
go
func newStatusInfo(node *core.Node) *statusInfo { out := statusInfo{ node: node, watches: make(map[int64]ResponseWatch), } return &out }
[ "func", "newStatusInfo", "(", "node", "*", "core", ".", "Node", ")", "*", "statusInfo", "{", "out", ":=", "statusInfo", "{", "node", ":", "node", ",", "watches", ":", "make", "(", "map", "[", "int64", "]", "ResponseWatch", ")", ",", "}", "\n", "retur...
// newStatusInfo initializes a status info data structure.
[ "newStatusInfo", "initializes", "a", "status", "info", "data", "structure", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/cache/status.go#L68-L74
train
envoyproxy/go-control-plane
envoy/api/v2/cluster/circuit_breaker.pb.validate.go
Validate
func (m *CircuitBreakers) Validate() error { if m == nil { return nil } for idx, item := range m.GetThresholds() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakersValidationError{ field: fmt.Sprintf("Thresholds[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *CircuitBreakers) Validate() error { if m == nil { return nil } for idx, item := range m.GetThresholds() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakersValidationError{ field: fmt.Sprintf("Thresholds[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "CircuitBreakers", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetThresholds", "(", ")", "{", "_", ",", "_",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cluster/circuit_breaker.pb.validate.go#L43-L69
train
envoyproxy/go-control-plane
envoy/api/v2/cluster/circuit_breaker.pb.validate.go
Validate
func (m *CircuitBreakers_Thresholds) Validate() error { if m == nil { return nil } // no validation rules for Priority { tmp := m.GetMaxConnections() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxConnections", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMaxPendingRequests() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxPendingRequests", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMaxRequests() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxRequests", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMaxRetries() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxRetries", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for TrackRemaining { tmp := m.GetMaxConnectionPools() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxConnectionPools", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *CircuitBreakers_Thresholds) Validate() error { if m == nil { return nil } // no validation rules for Priority { tmp := m.GetMaxConnections() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxConnections", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMaxPendingRequests() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxPendingRequests", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMaxRequests() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxRequests", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMaxRetries() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxRetries", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for TrackRemaining { tmp := m.GetMaxConnectionPools() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CircuitBreakers_ThresholdsValidationError{ field: "MaxConnectionPools", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "CircuitBreakers_Thresholds", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Priority", "{", "tmp", ":=", "m", ".", "GetMaxConnections", "(", ")", ...
// 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.
[ "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", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/cluster/circuit_breaker.pb.validate.go#L128-L213
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/http.pb.validate.go
Validate
func (m *HttpBufferedTrace) Validate() error { if m == nil { return nil } { tmp := m.GetRequest() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTraceValidationError{ field: "Request", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTraceValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *HttpBufferedTrace) Validate() error { if m == nil { return nil } { tmp := m.GetRequest() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTraceValidationError{ field: "Request", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTraceValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "HttpBufferedTrace", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetRequest", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interfa...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/http.pb.validate.go#L39-L75
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/http.pb.validate.go
Validate
func (m *HttpStreamedTraceSegment) Validate() error { if m == nil { return nil } // no validation rules for TraceId switch m.MessagePiece.(type) { case *HttpStreamedTraceSegment_RequestHeaders: { tmp := m.GetRequestHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestHeaders", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_RequestBodyChunk: { tmp := m.GetRequestBodyChunk() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestBodyChunk", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_RequestTrailers: { tmp := m.GetRequestTrailers() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestTrailers", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_ResponseHeaders: { tmp := m.GetResponseHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseHeaders", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_ResponseBodyChunk: { tmp := m.GetResponseBodyChunk() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseBodyChunk", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_ResponseTrailers: { tmp := m.GetResponseTrailers() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseTrailers", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *HttpStreamedTraceSegment) Validate() error { if m == nil { return nil } // no validation rules for TraceId switch m.MessagePiece.(type) { case *HttpStreamedTraceSegment_RequestHeaders: { tmp := m.GetRequestHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestHeaders", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_RequestBodyChunk: { tmp := m.GetRequestBodyChunk() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestBodyChunk", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_RequestTrailers: { tmp := m.GetRequestTrailers() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "RequestTrailers", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_ResponseHeaders: { tmp := m.GetResponseHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseHeaders", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_ResponseBodyChunk: { tmp := m.GetResponseBodyChunk() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseBodyChunk", reason: "embedded message failed validation", cause: err, } } } } case *HttpStreamedTraceSegment_ResponseTrailers: { tmp := m.GetResponseTrailers() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpStreamedTraceSegmentValidationError{ field: "ResponseTrailers", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "HttpStreamedTraceSegment", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for TraceId", "switch", "m", ".", "MessagePiece", ".", "(", "type", ")", "{...
// 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.
[ "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", "....
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/http.pb.validate.go#L136-L250
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/http.pb.validate.go
Validate
func (m *HttpBufferedTrace_Message) Validate() error { if m == nil { return nil } for idx, item := range m.GetHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetBody() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: "Body", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetTrailers() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: fmt.Sprintf("Trailers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *HttpBufferedTrace_Message) Validate() error { if m == nil { return nil } for idx, item := range m.GetHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetBody() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: "Body", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetTrailers() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpBufferedTrace_MessageValidationError{ field: fmt.Sprintf("Trailers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "HttpBufferedTrace_Message", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetHeaders", "(", ")", "{", "_", ",",...
// 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.
[ "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", "...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/http.pb.validate.go#L311-L372
train
envoyproxy/go-control-plane
envoy/config/transport_socket/alts/v2alpha/alts.pb.validate.go
Validate
func (m *Alts) Validate() error { if m == nil { return nil } if len(m.GetHandshakerService()) < 1 { return AltsValidationError{ field: "HandshakerService", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *Alts) Validate() error { if m == nil { return nil } if len(m.GetHandshakerService()) < 1 { return AltsValidationError{ field: "HandshakerService", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "Alts", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetHandshakerService", "(", ")", ")", "<", "1", "{", "return", "AltsValidationErro...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/transport_socket/alts/v2alpha/alts.pb.validate.go#L38-L51
train
envoyproxy/go-control-plane
envoy/api/v2/core/health_check.pb.validate.go
Validate
func (m *HealthCheck_Payload) Validate() error { if m == nil { return nil } switch m.Payload.(type) { case *HealthCheck_Payload_Text: if len(m.GetText()) < 1 { return HealthCheck_PayloadValidationError{ field: "Text", reason: "value length must be at least 1 bytes", } } case *HealthCheck_Payload_Binary: // no validation rules for Binary default: return HealthCheck_PayloadValidationError{ field: "Payload", reason: "value is required", } } return nil }
go
func (m *HealthCheck_Payload) Validate() error { if m == nil { return nil } switch m.Payload.(type) { case *HealthCheck_Payload_Text: if len(m.GetText()) < 1 { return HealthCheck_PayloadValidationError{ field: "Text", reason: "value length must be at least 1 bytes", } } case *HealthCheck_Payload_Binary: // no validation rules for Binary default: return HealthCheck_PayloadValidationError{ field: "Payload", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "HealthCheck_Payload", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "Payload", ".", "(", "type", ")", "{", "case", "*", "HealthCheck_Payload_Text", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/health_check.pb.validate.go#L389-L417
train
envoyproxy/go-control-plane
envoy/api/v2/core/health_check.pb.validate.go
Validate
func (m *HealthCheck_HttpHealthCheck) Validate() error { if m == nil { return nil } // no validation rules for Host if len(m.GetPath()) < 1 { return HealthCheck_HttpHealthCheckValidationError{ field: "Path", reason: "value length must be at least 1 bytes", } } { tmp := m.GetSend() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "Send", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetReceive() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "Receive", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ServiceName 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 { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for UseHttp2 for idx, item := range m.GetExpectedStatuses() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: fmt.Sprintf("ExpectedStatuses[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *HealthCheck_HttpHealthCheck) Validate() error { if m == nil { return nil } // no validation rules for Host if len(m.GetPath()) < 1 { return HealthCheck_HttpHealthCheckValidationError{ field: "Path", reason: "value length must be at least 1 bytes", } } { tmp := m.GetSend() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "Send", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetReceive() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: "Receive", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ServiceName 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 { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for UseHttp2 for idx, item := range m.GetExpectedStatuses() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_HttpHealthCheckValidationError{ field: fmt.Sprintf("ExpectedStatuses[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "HealthCheck_HttpHealthCheck", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Host", "if", "len", "(", "m", ".", "GetPath", "(", ")", ")", "<", ...
// 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.
[ "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", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/health_check.pb.validate.go#L478-L574
train
envoyproxy/go-control-plane
envoy/api/v2/core/health_check.pb.validate.go
Validate
func (m *HealthCheck_TcpHealthCheck) Validate() error { if m == nil { return nil } { tmp := m.GetSend() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_TcpHealthCheckValidationError{ field: "Send", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetReceive() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_TcpHealthCheckValidationError{ field: fmt.Sprintf("Receive[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *HealthCheck_TcpHealthCheck) Validate() error { if m == nil { return nil } { tmp := m.GetSend() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_TcpHealthCheckValidationError{ field: "Send", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetReceive() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_TcpHealthCheckValidationError{ field: fmt.Sprintf("Receive[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "HealthCheck_TcpHealthCheck", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetSend", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "i...
// 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.
[ "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", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/health_check.pb.validate.go#L636-L677
train
envoyproxy/go-control-plane
envoy/api/v2/core/health_check.pb.validate.go
Validate
func (m *HealthCheck_CustomHealthCheck) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return HealthCheck_CustomHealthCheckValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *HealthCheck_CustomHealthCheck_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_CustomHealthCheckValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *HealthCheck_CustomHealthCheck_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_CustomHealthCheckValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *HealthCheck_CustomHealthCheck) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return HealthCheck_CustomHealthCheckValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *HealthCheck_CustomHealthCheck_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_CustomHealthCheckValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *HealthCheck_CustomHealthCheck_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheck_CustomHealthCheckValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "HealthCheck_CustomHealthCheck", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "Health...
// 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.
[ "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",...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/health_check.pb.validate.go#L880-L931
train
envoyproxy/go-control-plane
envoy/api/v2/endpoint/load_report.pb.validate.go
Validate
func (m *UpstreamLocalityStats) Validate() error { if m == nil { return nil } { tmp := m.GetLocality() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: "Locality", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for TotalSuccessfulRequests // no validation rules for TotalRequestsInProgress // no validation rules for TotalErrorRequests for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: fmt.Sprintf("LoadMetricStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetUpstreamEndpointStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for Priority return nil }
go
func (m *UpstreamLocalityStats) Validate() error { if m == nil { return nil } { tmp := m.GetLocality() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: "Locality", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for TotalSuccessfulRequests // no validation rules for TotalRequestsInProgress // no validation rules for TotalErrorRequests for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: fmt.Sprintf("LoadMetricStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetUpstreamEndpointStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamLocalityStatsValidationError{ field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for Priority return nil }
[ "func", "(", "m", "*", "UpstreamLocalityStats", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetLocality", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "in...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/endpoint/load_report.pb.validate.go#L39-L108
train
envoyproxy/go-control-plane
envoy/api/v2/endpoint/load_report.pb.validate.go
Validate
func (m *UpstreamEndpointStats) Validate() error { if m == nil { return nil } { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: "Address", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMetadata() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for TotalSuccessfulRequests // no validation rules for TotalRequestsInProgress // no validation rules for TotalErrorRequests for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: fmt.Sprintf("LoadMetricStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *UpstreamEndpointStats) Validate() error { if m == nil { return nil } { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: "Address", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetMetadata() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for TotalSuccessfulRequests // no validation rules for TotalRequestsInProgress // no validation rules for TotalErrorRequests for idx, item := range m.GetLoadMetricStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpstreamEndpointStatsValidationError{ field: fmt.Sprintf("LoadMetricStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "UpstreamEndpointStats", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetAddress", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "int...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/endpoint/load_report.pb.validate.go#L169-L231
train
envoyproxy/go-control-plane
envoy/api/v2/endpoint/load_report.pb.validate.go
Validate
func (m *ClusterStats) Validate() error { if m == nil { return nil } if len(m.GetClusterName()) < 1 { return ClusterStatsValidationError{ field: "ClusterName", reason: "value length must be at least 1 bytes", } } // no validation rules for ClusterServiceName if len(m.GetUpstreamLocalityStats()) < 1 { return ClusterStatsValidationError{ field: "UpstreamLocalityStats", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetUpstreamLocalityStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for TotalDroppedRequests for idx, item := range m.GetDroppedRequests() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: fmt.Sprintf("DroppedRequests[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetLoadReportInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: "LoadReportInterval", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *ClusterStats) Validate() error { if m == nil { return nil } if len(m.GetClusterName()) < 1 { return ClusterStatsValidationError{ field: "ClusterName", reason: "value length must be at least 1 bytes", } } // no validation rules for ClusterServiceName if len(m.GetUpstreamLocalityStats()) < 1 { return ClusterStatsValidationError{ field: "UpstreamLocalityStats", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetUpstreamLocalityStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for TotalDroppedRequests for idx, item := range m.GetDroppedRequests() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: fmt.Sprintf("DroppedRequests[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetLoadReportInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterStatsValidationError{ field: "LoadReportInterval", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "ClusterStats", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetClusterName", "(", ")", ")", "<", "1", "{", "return", "ClusterStatsVali...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/endpoint/load_report.pb.validate.go#L365-L444
train
envoyproxy/go-control-plane
envoy/api/v2/endpoint/load_report.pb.validate.go
Validate
func (m *ClusterStats_DroppedRequests) Validate() error { if m == nil { return nil } if len(m.GetCategory()) < 1 { return ClusterStats_DroppedRequestsValidationError{ field: "Category", reason: "value length must be at least 1 bytes", } } // no validation rules for DroppedCount return nil }
go
func (m *ClusterStats_DroppedRequests) Validate() error { if m == nil { return nil } if len(m.GetCategory()) < 1 { return ClusterStats_DroppedRequestsValidationError{ field: "Category", reason: "value length must be at least 1 bytes", } } // no validation rules for DroppedCount return nil }
[ "func", "(", "m", "*", "ClusterStats_DroppedRequests", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCategory", "(", ")", ")", "<", "1", "{", "return", "Clu...
// 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.
[ "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", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/endpoint/load_report.pb.validate.go#L503-L518
train
envoyproxy/go-control-plane
envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go
Validate
func (m *Config) Validate() error { if m == nil { return nil } for idx, item := range m.GetRequestRules() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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 }
go
func (m *Config) Validate() error { if m == nil { return nil } for idx, item := range m.GetRequestRules() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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 }
[ "func", "(", "m", "*", "Config", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetRequestRules", "(", ")", "{", "_", ",", "_", "=",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go#L38-L84
train
envoyproxy/go-control-plane
envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go
Validate
func (m *Config_KeyValuePair) Validate() error { if m == nil { return nil } // no validation rules for MetadataNamespace if len(m.GetKey()) < 1 { return Config_KeyValuePairValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } } // no validation rules for Value // no validation rules for Type return nil }
go
func (m *Config_KeyValuePair) Validate() error { if m == nil { return nil } // no validation rules for MetadataNamespace if len(m.GetKey()) < 1 { return Config_KeyValuePairValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } } // no validation rules for Value // no validation rules for Type return nil }
[ "func", "(", "m", "*", "Config_KeyValuePair", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for MetadataNamespace", "if", "len", "(", "m", ".", "GetKey", "(", ")", ")", "...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go#L143-L162
train
envoyproxy/go-control-plane
envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go
Validate
func (m *Config_Rule) Validate() error { if m == nil { return nil } if len(m.GetHeader()) < 1 { return Config_RuleValidationError{ field: "Header", reason: "value length must be at least 1 bytes", } } { tmp := m.GetOnHeaderPresent() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Config_RuleValidationError{ field: "OnHeaderPresent", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetOnHeaderMissing() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Config_RuleValidationError{ field: "OnHeaderMissing", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Remove return nil }
go
func (m *Config_Rule) Validate() error { if m == nil { return nil } if len(m.GetHeader()) < 1 { return Config_RuleValidationError{ field: "Header", reason: "value length must be at least 1 bytes", } } { tmp := m.GetOnHeaderPresent() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Config_RuleValidationError{ field: "OnHeaderPresent", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetOnHeaderMissing() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Config_RuleValidationError{ field: "OnHeaderMissing", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Remove return nil }
[ "func", "(", "m", "*", "Config_Rule", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetHeader", "(", ")", ")", "<", "1", "{", "return", "Config_RuleValidationE...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.pb.validate.go#L223-L268
train
envoyproxy/go-control-plane
pkg/util/struct.go
StructToMessage
func StructToMessage(pbst *types.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 { return err } return jsonpb.Unmarshal(buf, out) }
go
func StructToMessage(pbst *types.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 { return err } return jsonpb.Unmarshal(buf, out) }
[ "func", "StructToMessage", "(", "pbst", "*", "types", ".", "Struct", ",", "out", "proto", ".", "Message", ")", "error", "{", "if", "pbst", "==", "nil", "{", "return", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n\n", "buf", ":=", "&", ...
// StructToMessage decodes a protobuf Message from a Struct.
[ "StructToMessage", "decodes", "a", "protobuf", "Message", "from", "a", "Struct", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/pkg/util/struct.go#L49-L60
train
envoyproxy/go-control-plane
envoy/api/v2/core/http_uri.pb.validate.go
Validate
func (m *HttpUri) Validate() error { if m == nil { return nil } if len(m.GetUri()) < 1 { return HttpUriValidationError{ field: "Uri", reason: "value length must be at least 1 bytes", } } if m.GetTimeout() == nil { return HttpUriValidationError{ field: "Timeout", reason: "value is required", } } switch m.HttpUpstreamType.(type) { case *HttpUri_Cluster: if len(m.GetCluster()) < 1 { return HttpUriValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } } default: return HttpUriValidationError{ field: "HttpUpstreamType", reason: "value is required", } } return nil }
go
func (m *HttpUri) Validate() error { if m == nil { return nil } if len(m.GetUri()) < 1 { return HttpUriValidationError{ field: "Uri", reason: "value length must be at least 1 bytes", } } if m.GetTimeout() == nil { return HttpUriValidationError{ field: "Timeout", reason: "value is required", } } switch m.HttpUpstreamType.(type) { case *HttpUri_Cluster: if len(m.GetCluster()) < 1 { return HttpUriValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } } default: return HttpUriValidationError{ field: "HttpUpstreamType", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "HttpUri", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetUri", "(", ")", ")", "<", "1", "{", "return", "HttpUriValidationError", "{...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/http_uri.pb.validate.go#L38-L77
train
envoyproxy/go-control-plane
envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.validate.go
Validate
func (m *ClientSSLAuth) Validate() error { if m == nil { return nil } if len(m.GetAuthApiCluster()) < 1 { return ClientSSLAuthValidationError{ field: "AuthApiCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetStatPrefix()) < 1 { return ClientSSLAuthValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } { tmp := m.GetRefreshDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientSSLAuthValidationError{ field: "RefreshDelay", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetIpWhiteList() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientSSLAuthValidationError{ field: fmt.Sprintf("IpWhiteList[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *ClientSSLAuth) Validate() error { if m == nil { return nil } if len(m.GetAuthApiCluster()) < 1 { return ClientSSLAuthValidationError{ field: "AuthApiCluster", reason: "value length must be at least 1 bytes", } } if len(m.GetStatPrefix()) < 1 { return ClientSSLAuthValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } { tmp := m.GetRefreshDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientSSLAuthValidationError{ field: "RefreshDelay", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetIpWhiteList() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClientSSLAuthValidationError{ field: fmt.Sprintf("IpWhiteList[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "ClientSSLAuth", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetAuthApiCluster", "(", ")", ")", "<", "1", "{", "return", "ClientSSLAut...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.pb.validate.go#L39-L94
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/common.pb.validate.go
Validate
func (m *Body) Validate() error { if m == nil { return nil } // no validation rules for Truncated switch m.BodyType.(type) { case *Body_AsBytes: // no validation rules for AsBytes case *Body_AsString: // no validation rules for AsString } return nil }
go
func (m *Body) Validate() error { if m == nil { return nil } // no validation rules for Truncated switch m.BodyType.(type) { case *Body_AsBytes: // no validation rules for AsBytes case *Body_AsString: // no validation rules for AsString } return nil }
[ "func", "(", "m", "*", "Body", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Truncated", "switch", "m", ".", "BodyType", ".", "(", "type", ")", "{", "case", "*", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/common.pb.validate.go#L38-L56
train
envoyproxy/go-control-plane
envoy/type/matcher/metadata.pb.validate.go
Validate
func (m *MetadataMatcher) Validate() error { if m == nil { return nil } if len(m.GetFilter()) < 1 { return MetadataMatcherValidationError{ field: "Filter", reason: "value length must be at least 1 bytes", } } if len(m.GetPath()) < 1 { return MetadataMatcherValidationError{ field: "Path", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetPath() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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", } } { tmp := m.GetValue() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataMatcherValidationError{ field: "Value", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *MetadataMatcher) Validate() error { if m == nil { return nil } if len(m.GetFilter()) < 1 { return MetadataMatcherValidationError{ field: "Filter", reason: "value length must be at least 1 bytes", } } if len(m.GetPath()) < 1 { return MetadataMatcherValidationError{ field: "Path", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetPath() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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", } } { tmp := m.GetValue() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MetadataMatcherValidationError{ field: "Value", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "MetadataMatcher", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetFilter", "(", ")", ")", "<", "1", "{", "return", "MetadataMatcherVal...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/type/matcher/metadata.pb.validate.go#L39-L101
train
envoyproxy/go-control-plane
envoy/type/matcher/metadata.pb.validate.go
Validate
func (m *MetadataMatcher_PathSegment) Validate() error { if m == nil { return nil } switch m.Segment.(type) { case *MetadataMatcher_PathSegment_Key: if len(m.GetKey()) < 1 { return MetadataMatcher_PathSegmentValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } } default: return MetadataMatcher_PathSegmentValidationError{ field: "Segment", reason: "value is required", } } return nil }
go
func (m *MetadataMatcher_PathSegment) Validate() error { if m == nil { return nil } switch m.Segment.(type) { case *MetadataMatcher_PathSegment_Key: if len(m.GetKey()) < 1 { return MetadataMatcher_PathSegmentValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } } default: return MetadataMatcher_PathSegmentValidationError{ field: "Segment", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "MetadataMatcher_PathSegment", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "Segment", ".", "(", "type", ")", "{", "case", "*", "MetadataMatcher_Pat...
// 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.
[ "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", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/type/matcher/metadata.pb.validate.go#L160-L185
train
envoyproxy/go-control-plane
envoy/service/ratelimit/v2/rls.pb.validate.go
Validate
func (m *RateLimitRequest) Validate() error { if m == nil { return nil } // no validation rules for Domain for idx, item := range m.GetDescriptors() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitRequestValidationError{ field: fmt.Sprintf("Descriptors[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for HitsAddend return nil }
go
func (m *RateLimitRequest) Validate() error { if m == nil { return nil } // no validation rules for Domain for idx, item := range m.GetDescriptors() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitRequestValidationError{ field: fmt.Sprintf("Descriptors[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for HitsAddend return nil }
[ "func", "(", "m", "*", "RateLimitRequest", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Domain", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetDescriptors", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/ratelimit/v2/rls.pb.validate.go#L39-L69
train
envoyproxy/go-control-plane
envoy/service/ratelimit/v2/rls.pb.validate.go
Validate
func (m *RateLimitResponse) Validate() error { if m == nil { return nil } // no validation rules for OverallCode for idx, item := range m.GetStatuses() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("Statuses[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *RateLimitResponse) Validate() error { if m == nil { return nil } // no validation rules for OverallCode for idx, item := range m.GetStatuses() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("Statuses[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "RateLimitResponse", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for OverallCode", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetStatuses...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/ratelimit/v2/rls.pb.validate.go#L128-L176
train
envoyproxy/go-control-plane
envoy/service/ratelimit/v2/rls.pb.validate.go
Validate
func (m *RateLimitResponse_DescriptorStatus) Validate() error { if m == nil { return nil } // no validation rules for Code { tmp := m.GetCurrentLimit() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponse_DescriptorStatusValidationError{ field: "CurrentLimit", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for LimitRemaining return nil }
go
func (m *RateLimitResponse_DescriptorStatus) Validate() error { if m == nil { return nil } // no validation rules for Code { tmp := m.GetCurrentLimit() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitResponse_DescriptorStatusValidationError{ field: "CurrentLimit", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for LimitRemaining return nil }
[ "func", "(", "m", "*", "RateLimitResponse_DescriptorStatus", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Code", "{", "tmp", ":=", "m", ".", "GetCurrentLimit", "(", ")",...
// 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.
[ "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", "retur...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/ratelimit/v2/rls.pb.validate.go#L309-L334
train
envoyproxy/go-control-plane
envoy/config/filter/http/gzip/v2/gzip.pb.validate.go
Validate
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 wrapper := m.GetContentLength(); wrapper != nil { if wrapper.GetValue() < 30 { return GzipValidationError{ field: "ContentLength", reason: "value must be greater than or equal to 30", } } } 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 len(m.GetContentType()) > 50 { return GzipValidationError{ field: "ContentType", reason: "value must contain no more than 50 item(s)", } } // no validation rules for DisableOnEtagHeader // no validation rules for RemoveAcceptEncodingHeader 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]", } } } return nil }
go
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 wrapper := m.GetContentLength(); wrapper != nil { if wrapper.GetValue() < 30 { return GzipValidationError{ field: "ContentLength", reason: "value must be greater than or equal to 30", } } } 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 len(m.GetContentType()) > 50 { return GzipValidationError{ field: "ContentType", reason: "value must contain no more than 50 item(s)", } } // no validation rules for DisableOnEtagHeader // no validation rules for RemoveAcceptEncodingHeader 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]", } } } return nil }
[ "func", "(", "m", "*", "Gzip", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "wrapper", ":=", "m", ".", "GetMemoryLevel", "(", ")", ";", "wrapper", "!=", "nil", "{", "if", "val", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/gzip/v2/gzip.pb.validate.go#L38-L102
train
envoyproxy/go-control-plane
envoy/config/filter/http/fault/v2/fault.pb.validate.go
Validate
func (m *FaultAbort) Validate() error { if m == nil { return nil } { tmp := m.GetPercentage() if v, ok := interface{}(tmp).(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)", } } default: return FaultAbortValidationError{ field: "ErrorType", reason: "value is required", } } return nil }
go
func (m *FaultAbort) Validate() error { if m == nil { return nil } { tmp := m.GetPercentage() if v, ok := interface{}(tmp).(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)", } } default: return FaultAbortValidationError{ field: "ErrorType", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "FaultAbort", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetPercentage", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/fault/v2/fault.pb.validate.go#L38-L78
train
envoyproxy/go-control-plane
envoy/config/filter/http/fault/v2/fault.pb.validate.go
Validate
func (m *HTTPFault) Validate() error { if m == nil { return nil } { tmp := m.GetDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "Delay", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetAbort() if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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, } } } } } { tmp := m.GetMaxActiveFaults() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "MaxActiveFaults", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetResponseRateLimit() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "ResponseRateLimit", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *HTTPFault) Validate() error { if m == nil { return nil } { tmp := m.GetDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "Delay", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetAbort() if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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, } } } } } { tmp := m.GetMaxActiveFaults() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "MaxActiveFaults", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetResponseRateLimit() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPFaultValidationError{ field: "ResponseRateLimit", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "HTTPFault", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetDelay", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", "{"...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/fault/v2/fault.pb.validate.go#L136-L224
train
envoyproxy/go-control-plane
envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.validate.go
Validate
func (m *MongoProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return MongoProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } // no validation rules for AccessLog { tmp := m.GetDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MongoProxyValidationError{ field: "Delay", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for EmitDynamicMetadata return nil }
go
func (m *MongoProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return MongoProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } // no validation rules for AccessLog { tmp := m.GetDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return MongoProxyValidationError{ field: "Delay", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for EmitDynamicMetadata return nil }
[ "func", "(", "m", "*", "MongoProxy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetStatPrefix", "(", ")", ")", "<", "1", "{", "return", "MongoProxyValidatio...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.pb.validate.go#L38-L70
train
envoyproxy/go-control-plane
envoy/admin/v2alpha/clusters.pb.validate.go
Validate
func (m *Clusters) Validate() error { if m == nil { return nil } for idx, item := range m.GetClusterStatuses() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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 }
go
func (m *Clusters) Validate() error { if m == nil { return nil } for idx, item := range m.GetClusterStatuses() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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 }
[ "func", "(", "m", "*", "Clusters", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetClusterStatuses", "(", ")", "{", "_", ",", "_", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/clusters.pb.validate.go#L42-L68
train
envoyproxy/go-control-plane
envoy/admin/v2alpha/clusters.pb.validate.go
Validate
func (m *ClusterStatus) Validate() error { if m == nil { return nil } // no validation rules for Name // no validation rules for AddedViaApi { tmp := m.GetSuccessRateEjectionThreshold() if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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, } } } } } return nil }
go
func (m *ClusterStatus) Validate() error { if m == nil { return nil } // no validation rules for Name // no validation rules for AddedViaApi { tmp := m.GetSuccessRateEjectionThreshold() if v, ok := interface{}(tmp).(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 { tmp := item if v, ok := interface{}(tmp).(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, } } } } } return nil }
[ "func", "(", "m", "*", "ClusterStatus", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Name", "// no validation rules for AddedViaApi", "{", "tmp", ":=", "m", ".", "GetSucce...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/clusters.pb.validate.go#L127-L172
train
envoyproxy/go-control-plane
envoy/admin/v2alpha/clusters.pb.validate.go
Validate
func (m *HostStatus) Validate() error { if m == nil { return nil } { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "Address", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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, } } } } } { tmp := m.GetHealthStatus() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "HealthStatus", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetSuccessRate() if v, ok := interface{}(tmp).(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 return nil }
go
func (m *HostStatus) Validate() error { if m == nil { return nil } { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "Address", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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, } } } } } { tmp := m.GetHealthStatus() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HostStatusValidationError{ field: "HealthStatus", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetSuccessRate() if v, ok := interface{}(tmp).(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 return nil }
[ "func", "(", "m", "*", "HostStatus", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetAddress", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/admin/v2alpha/clusters.pb.validate.go#L230-L303
train
envoyproxy/go-control-plane
envoy/type/percent.pb.validate.go
Validate
func (m *Percent) Validate() error { if m == nil { return nil } if val := m.GetValue(); val < 0 || val > 100 { return PercentValidationError{ field: "Value", reason: "value must be inside range [0, 100]", } } return nil }
go
func (m *Percent) Validate() error { if m == nil { return nil } if val := m.GetValue(); val < 0 || val > 100 { return PercentValidationError{ field: "Value", reason: "value must be inside range [0, 100]", } } return nil }
[ "func", "(", "m", "*", "Percent", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "val", ":=", "m", ".", "GetValue", "(", ")", ";", "val", "<", "0", "||", "val", ">", "100", "{",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/type/percent.pb.validate.go#L38-L51
train
envoyproxy/go-control-plane
envoy/type/percent.pb.validate.go
Validate
func (m *FractionalPercent) Validate() error { if m == nil { return nil } // no validation rules for Numerator if _, ok := FractionalPercent_DenominatorType_name[int32(m.GetDenominator())]; !ok { return FractionalPercentValidationError{ field: "Denominator", reason: "value must be one of the defined enum values", } } return nil }
go
func (m *FractionalPercent) Validate() error { if m == nil { return nil } // no validation rules for Numerator if _, ok := FractionalPercent_DenominatorType_name[int32(m.GetDenominator())]; !ok { return FractionalPercentValidationError{ field: "Denominator", reason: "value must be one of the defined enum values", } } return nil }
[ "func", "(", "m", "*", "FractionalPercent", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Numerator", "if", "_", ",", "ok", ":=", "FractionalPercent_DenominatorType_name", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/type/percent.pb.validate.go#L110-L125
train
envoyproxy/go-control-plane
envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go
Validate
func (m *JwtProvider) Validate() error { if m == nil { return nil } if len(m.GetIssuer()) < 1 { return JwtProviderValidationError{ field: "Issuer", reason: "value length must be at least 1 bytes", } } // no validation rules for Forward for idx, item := range m.GetFromHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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, } } } } } // no validation rules for ForwardPayloadHeader // no validation rules for PayloadInMetadata switch m.JwksSourceSpecifier.(type) { case *JwtProvider_RemoteJwks: { tmp := m.GetRemoteJwks() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtProviderValidationError{ field: "RemoteJwks", reason: "embedded message failed validation", cause: err, } } } } case *JwtProvider_LocalJwks: { tmp := m.GetLocalJwks() if v, ok := interface{}(tmp).(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 }
go
func (m *JwtProvider) Validate() error { if m == nil { return nil } if len(m.GetIssuer()) < 1 { return JwtProviderValidationError{ field: "Issuer", reason: "value length must be at least 1 bytes", } } // no validation rules for Forward for idx, item := range m.GetFromHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(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, } } } } } // no validation rules for ForwardPayloadHeader // no validation rules for PayloadInMetadata switch m.JwksSourceSpecifier.(type) { case *JwtProvider_RemoteJwks: { tmp := m.GetRemoteJwks() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtProviderValidationError{ field: "RemoteJwks", reason: "embedded message failed validation", cause: err, } } } } case *JwtProvider_LocalJwks: { tmp := m.GetLocalJwks() if v, ok := interface{}(tmp).(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 }
[ "func", "(", "m", "*", "JwtProvider", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetIssuer", "(", ")", ")", "<", "1", "{", "return", "JwtProviderValidationE...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go#L39-L122
train
envoyproxy/go-control-plane
envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go
Validate
func (m *RemoteJwks) Validate() error { if m == nil { return nil } { tmp := m.GetHttpUri() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteJwksValidationError{ field: "HttpUri", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetCacheDuration() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteJwksValidationError{ field: "CacheDuration", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *RemoteJwks) Validate() error { if m == nil { return nil } { tmp := m.GetHttpUri() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteJwksValidationError{ field: "HttpUri", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetCacheDuration() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RemoteJwksValidationError{ field: "CacheDuration", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "RemoteJwks", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetHttpUri", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", ...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go#L180-L216
train
envoyproxy/go-control-plane
envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go
Validate
func (m *JwtHeader) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return JwtHeaderValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } // no validation rules for ValuePrefix return nil }
go
func (m *JwtHeader) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return JwtHeaderValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } // no validation rules for ValuePrefix return nil }
[ "func", "(", "m", "*", "JwtHeader", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "JwtHeaderValidationError",...
// 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.
[ "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", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go#L274-L289
train