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/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go
Validate
func (m *JwtRequirement) Validate() error { if m == nil { return nil } switch m.RequiresType.(type) { case *JwtRequirement_ProviderName: // no validation rules for ProviderName case *JwtRequirement_ProviderAndAudiences: { tmp := m.GetProviderAndAudiences() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "ProviderAndAudiences", reason: "embedded message failed validation", cause: err, } } } } case *JwtRequirement_RequiresAny: { tmp := m.GetRequiresAny() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "RequiresAny", reason: "embedded message failed validation", cause: err, } } } } case *JwtRequirement_RequiresAll: { tmp := m.GetRequiresAll() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "RequiresAll", reason: "embedded message failed validation", cause: err, } } } } case *JwtRequirement_AllowMissingOrFailed: { tmp := m.GetAllowMissingOrFailed() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "AllowMissingOrFailed", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *JwtRequirement) Validate() error { if m == nil { return nil } switch m.RequiresType.(type) { case *JwtRequirement_ProviderName: // no validation rules for ProviderName case *JwtRequirement_ProviderAndAudiences: { tmp := m.GetProviderAndAudiences() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "ProviderAndAudiences", reason: "embedded message failed validation", cause: err, } } } } case *JwtRequirement_RequiresAny: { tmp := m.GetRequiresAny() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "RequiresAny", reason: "embedded message failed validation", cause: err, } } } } case *JwtRequirement_RequiresAll: { tmp := m.GetRequiresAll() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "RequiresAll", reason: "embedded message failed validation", cause: err, } } } } case *JwtRequirement_AllowMissingOrFailed: { tmp := m.GetAllowMissingOrFailed() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementValidationError{ field: "AllowMissingOrFailed", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "JwtRequirement", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "RequiresType", ".", "(", "type", ")", "{", "case", "*", "JwtRequirement_ProviderName...
// Validate checks the field values on JwtRequirement with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "JwtRequirement", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go#L417-L498
train
envoyproxy/go-control-plane
envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go
Validate
func (m *JwtRequirementAndList) Validate() error { if m == nil { return nil } if len(m.GetRequirements()) < 2 { return JwtRequirementAndListValidationError{ field: "Requirements", reason: "value must contain at least 2 item(s)", } } for idx, item := range m.GetRequirements() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementAndListValidationError{ field: fmt.Sprintf("Requirements[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *JwtRequirementAndList) Validate() error { if m == nil { return nil } if len(m.GetRequirements()) < 2 { return JwtRequirementAndListValidationError{ field: "Requirements", reason: "value must contain at least 2 item(s)", } } for idx, item := range m.GetRequirements() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtRequirementAndListValidationError{ field: fmt.Sprintf("Requirements[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "JwtRequirementAndList", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetRequirements", "(", ")", ")", "<", "2", "{", "return", "JwtReq...
// Validate checks the field values on JwtRequirementAndList with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "JwtRequirementAndList", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go#L651-L684
train
envoyproxy/go-control-plane
envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go
Validate
func (m *RequirementRule) Validate() error { if m == nil { return nil } if m.GetMatch() == nil { return RequirementRuleValidationError{ field: "Match", reason: "value is required", } } { tmp := m.GetMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequirementRuleValidationError{ field: "Match", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRequires() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequirementRuleValidationError{ field: "Requires", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *RequirementRule) Validate() error { if m == nil { return nil } if m.GetMatch() == nil { return RequirementRuleValidationError{ field: "Match", reason: "value is required", } } { tmp := m.GetMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequirementRuleValidationError{ field: "Match", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRequires() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RequirementRuleValidationError{ field: "Requires", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "RequirementRule", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetMatch", "(", ")", "==", "nil", "{", "return", "RequirementRuleValidationError", "{",...
// Validate checks the field values on RequirementRule with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RequirementRule", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go#L745-L788
train
envoyproxy/go-control-plane
envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go
Validate
func (m *FilterStateRule) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return FilterStateRuleValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } // no validation rules for Requires return nil }
go
func (m *FilterStateRule) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return FilterStateRuleValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } // no validation rules for Requires return nil }
[ "func", "(", "m", "*", "FilterStateRule", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "FilterStateRuleValid...
// Validate checks the field values on FilterStateRule with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "FilterStateRule", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go#L847-L862
train
envoyproxy/go-control-plane
envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go
Validate
func (m *JwtAuthentication) Validate() error { if m == nil { return nil } // no validation rules for Providers for idx, item := range m.GetRules() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtAuthenticationValidationError{ field: fmt.Sprintf("Rules[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetFilterStateRules() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtAuthenticationValidationError{ field: "FilterStateRules", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *JwtAuthentication) Validate() error { if m == nil { return nil } // no validation rules for Providers for idx, item := range m.GetRules() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtAuthenticationValidationError{ field: fmt.Sprintf("Rules[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetFilterStateRules() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return JwtAuthenticationValidationError{ field: "FilterStateRules", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "JwtAuthentication", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Providers", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetRules", ...
// Validate checks the field values on JwtAuthentication with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "JwtAuthentication", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/jwt_authn/v2alpha/config.pb.validate.go#L921-L964
train
envoyproxy/go-control-plane
envoy/api/v2/core/base.pb.validate.go
Validate
func (m *Node) Validate() error { if m == nil { return nil } // no validation rules for Id // no validation rules for Cluster { tmp := m.GetMetadata() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetLocality() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "Locality", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for BuildVersion return nil }
go
func (m *Node) Validate() error { if m == nil { return nil } // no validation rules for Id // no validation rules for Cluster { tmp := m.GetMetadata() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetLocality() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return NodeValidationError{ field: "Locality", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for BuildVersion return nil }
[ "func", "(", "m", "*", "Node", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Id", "// no validation rules for Cluster", "{", "tmp", ":=", "m", ".", "GetMetadata", "(", ...
// Validate checks the field values on Node with the rules defined in the proto // definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Node", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/base.pb.validate.go#L108-L150
train
envoyproxy/go-control-plane
envoy/api/v2/core/base.pb.validate.go
Validate
func (m *RuntimeUInt32) Validate() error { if m == nil { return nil } // no validation rules for DefaultValue if len(m.GetRuntimeKey()) < 1 { return RuntimeUInt32ValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *RuntimeUInt32) Validate() error { if m == nil { return nil } // no validation rules for DefaultValue if len(m.GetRuntimeKey()) < 1 { return RuntimeUInt32ValidationError{ field: "RuntimeKey", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "RuntimeUInt32", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for DefaultValue", "if", "len", "(", "m", ".", "GetRuntimeKey", "(", ")", ")", "<", ...
// Validate checks the field values on RuntimeUInt32 with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RuntimeUInt32", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/base.pb.validate.go#L275-L290
train
envoyproxy/go-control-plane
envoy/api/v2/core/base.pb.validate.go
Validate
func (m *HeaderValue) Validate() error { if m == nil { return nil } if l := len(m.GetKey()); l < 1 || l > 16384 { return HeaderValueValidationError{ field: "Key", reason: "value length must be between 1 and 16384 bytes, inclusive", } } if len(m.GetValue()) > 16384 { return HeaderValueValidationError{ field: "Value", reason: "value length must be at most 16384 bytes", } } return nil }
go
func (m *HeaderValue) Validate() error { if m == nil { return nil } if l := len(m.GetKey()); l < 1 || l > 16384 { return HeaderValueValidationError{ field: "Key", reason: "value length must be between 1 and 16384 bytes, inclusive", } } if len(m.GetValue()) > 16384 { return HeaderValueValidationError{ field: "Value", reason: "value length must be at most 16384 bytes", } } return nil }
[ "func", "(", "m", "*", "HeaderValue", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "l", ":=", "len", "(", "m", ".", "GetKey", "(", ")", ")", ";", "l", "<", "1", "||", "l", "...
// Validate checks the field values on HeaderValue with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HeaderValue", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/base.pb.validate.go#L349-L369
train
envoyproxy/go-control-plane
envoy/api/v2/core/base.pb.validate.go
Validate
func (m *HeaderValueOption) Validate() error { if m == nil { return nil } if m.GetHeader() == nil { return HeaderValueOptionValidationError{ field: "Header", reason: "value is required", } } { tmp := m.GetHeader() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderValueOptionValidationError{ field: "Header", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetAppend() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderValueOptionValidationError{ field: "Append", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *HeaderValueOption) Validate() error { if m == nil { return nil } if m.GetHeader() == nil { return HeaderValueOptionValidationError{ field: "Header", reason: "value is required", } } { tmp := m.GetHeader() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderValueOptionValidationError{ field: "Header", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetAppend() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderValueOptionValidationError{ field: "Append", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "HeaderValueOption", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetHeader", "(", ")", "==", "nil", "{", "return", "HeaderValueOptionValidationError", ...
// Validate checks the field values on HeaderValueOption with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HeaderValueOption", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/base.pb.validate.go#L428-L471
train
envoyproxy/go-control-plane
envoy/api/v2/core/base.pb.validate.go
Error
func (e HeaderMapValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sHeaderMap.%s: %s%s", key, e.field, e.reason, cause) }
go
func (e HeaderMapValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" if e.key { key = "key for " } return fmt.Sprintf( "invalid %sHeaderMap.%s: %s%s", key, e.field, e.reason, cause) }
[ "func", "(", "e", "HeaderMapValidationError", ")", "Error", "(", ")", "string", "{", "cause", ":=", "\"", "\"", "\n", "if", "e", ".", "cause", "!=", "nil", "{", "cause", "=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "e", ".", "cause", ")", "\...
// Error satisfies the builtin error interface
[ "Error", "satisfies", "the", "builtin", "error", "interface" ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/base.pb.validate.go#L584-L601
train
envoyproxy/go-control-plane
envoy/api/v2/core/base.pb.validate.go
Validate
func (m *DataSource) Validate() error { if m == nil { return nil } switch m.Specifier.(type) { case *DataSource_Filename: if len(m.GetFilename()) < 1 { return DataSourceValidationError{ field: "Filename", reason: "value length must be at least 1 bytes", } } case *DataSource_InlineBytes: if len(m.GetInlineBytes()) < 1 { return DataSourceValidationError{ field: "InlineBytes", reason: "value length must be at least 1 bytes", } } case *DataSource_InlineString: if len(m.GetInlineString()) < 1 { return DataSourceValidationError{ field: "InlineString", reason: "value length must be at least 1 bytes", } } default: return DataSourceValidationError{ field: "Specifier", reason: "value is required", } } return nil }
go
func (m *DataSource) Validate() error { if m == nil { return nil } switch m.Specifier.(type) { case *DataSource_Filename: if len(m.GetFilename()) < 1 { return DataSourceValidationError{ field: "Filename", reason: "value length must be at least 1 bytes", } } case *DataSource_InlineBytes: if len(m.GetInlineBytes()) < 1 { return DataSourceValidationError{ field: "InlineBytes", reason: "value length must be at least 1 bytes", } } case *DataSource_InlineString: if len(m.GetInlineString()) < 1 { return DataSourceValidationError{ field: "InlineString", reason: "value length must be at least 1 bytes", } } default: return DataSourceValidationError{ field: "Specifier", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "DataSource", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "Specifier", ".", "(", "type", ")", "{", "case", "*", "DataSource_Filename", ":", "if...
// Validate checks the field values on DataSource with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "DataSource", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/base.pb.validate.go#L615-L658
train
envoyproxy/go-control-plane
envoy/api/v2/core/base.pb.validate.go
Validate
func (m *TransportSocket) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return TransportSocketValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *TransportSocket_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TransportSocketValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *TransportSocket_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TransportSocketValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *TransportSocket) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return TransportSocketValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *TransportSocket_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TransportSocketValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *TransportSocket_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TransportSocketValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "TransportSocket", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "TransportSocketValid...
// Validate checks the field values on TransportSocket with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "TransportSocket", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/base.pb.validate.go#L717-L768
train
envoyproxy/go-control-plane
envoy/api/v2/core/base.pb.validate.go
Validate
func (m *SocketOption) Validate() error { if m == nil { return nil } // no validation rules for Description // no validation rules for Level // no validation rules for Name if _, ok := SocketOption_SocketState_name[int32(m.GetState())]; !ok { return SocketOptionValidationError{ field: "State", reason: "value must be one of the defined enum values", } } switch m.Value.(type) { case *SocketOption_IntValue: // no validation rules for IntValue case *SocketOption_BufValue: // no validation rules for BufValue default: return SocketOptionValidationError{ field: "Value", reason: "value is required", } } return nil }
go
func (m *SocketOption) Validate() error { if m == nil { return nil } // no validation rules for Description // no validation rules for Level // no validation rules for Name if _, ok := SocketOption_SocketState_name[int32(m.GetState())]; !ok { return SocketOptionValidationError{ field: "State", reason: "value must be one of the defined enum values", } } switch m.Value.(type) { case *SocketOption_IntValue: // no validation rules for IntValue case *SocketOption_BufValue: // no validation rules for BufValue default: return SocketOptionValidationError{ field: "Value", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "SocketOption", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Description", "// no validation rules for Level", "// no validation rules for Name", "if", "_...
// Validate checks the field values on SocketOption with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "SocketOption", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/base.pb.validate.go#L827-L862
train
envoyproxy/go-control-plane
envoy/api/v2/core/base.pb.validate.go
Validate
func (m *RuntimeFractionalPercent) Validate() error { if m == nil { return nil } if m.GetDefaultValue() == nil { return RuntimeFractionalPercentValidationError{ field: "DefaultValue", reason: "value is required", } } { tmp := m.GetDefaultValue() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeFractionalPercentValidationError{ field: "DefaultValue", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for RuntimeKey return nil }
go
func (m *RuntimeFractionalPercent) Validate() error { if m == nil { return nil } if m.GetDefaultValue() == nil { return RuntimeFractionalPercentValidationError{ field: "DefaultValue", reason: "value is required", } } { tmp := m.GetDefaultValue() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RuntimeFractionalPercentValidationError{ field: "DefaultValue", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for RuntimeKey return nil }
[ "func", "(", "m", "*", "RuntimeFractionalPercent", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetDefaultValue", "(", ")", "==", "nil", "{", "return", "RuntimeFractionalPercen...
// Validate checks the field values on RuntimeFractionalPercent with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RuntimeFractionalPercent", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "....
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/base.pb.validate.go#L921-L951
train
envoyproxy/go-control-plane
envoy/api/v2/endpoint/endpoint.pb.validate.go
Validate
func (m *Endpoint) Validate() error { if m == nil { return nil } { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointValidationError{ field: "Address", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetHealthCheckConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointValidationError{ field: "HealthCheckConfig", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *Endpoint) Validate() error { if m == nil { return nil } { tmp := m.GetAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointValidationError{ field: "Address", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetHealthCheckConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointValidationError{ field: "HealthCheckConfig", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "Endpoint", ")", "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 Endpoint 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", "Endpoint", "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/endpoint.pb.validate.go#L42-L78
train
envoyproxy/go-control-plane
envoy/api/v2/endpoint/endpoint.pb.validate.go
Validate
func (m *LbEndpoint) Validate() error { if m == nil { return nil } // no validation rules for HealthStatus { tmp := m.GetMetadata() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LbEndpointValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, } } } } if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 128 { return LbEndpointValidationError{ field: "LoadBalancingWeight", reason: "value must be inside range [1, 128]", } } } switch m.HostIdentifier.(type) { case *LbEndpoint_Endpoint: { tmp := m.GetEndpoint() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LbEndpointValidationError{ field: "Endpoint", reason: "embedded message failed validation", cause: err, } } } } case *LbEndpoint_EndpointName: // no validation rules for EndpointName } return nil }
go
func (m *LbEndpoint) Validate() error { if m == nil { return nil } // no validation rules for HealthStatus { tmp := m.GetMetadata() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LbEndpointValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, } } } } if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 128 { return LbEndpointValidationError{ field: "LoadBalancingWeight", reason: "value must be inside range [1, 128]", } } } switch m.HostIdentifier.(type) { case *LbEndpoint_Endpoint: { tmp := m.GetEndpoint() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LbEndpointValidationError{ field: "Endpoint", reason: "embedded message failed validation", cause: err, } } } } case *LbEndpoint_EndpointName: // no validation rules for EndpointName } return nil }
[ "func", "(", "m", "*", "LbEndpoint", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for HealthStatus", "{", "tmp", ":=", "m", ".", "GetMetadata", "(", ")", "\n\n", "if", ...
// Validate checks the field values on LbEndpoint with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "LbEndpoint", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/endpoint/endpoint.pb.validate.go#L136-L194
train
envoyproxy/go-control-plane
envoy/api/v2/endpoint/endpoint.pb.validate.go
Validate
func (m *LocalityLbEndpoints) Validate() error { if m == nil { return nil } { tmp := m.GetLocality() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: "Locality", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetLbEndpoints() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: fmt.Sprintf("LbEndpoints[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 128 { return LocalityLbEndpointsValidationError{ field: "LoadBalancingWeight", reason: "value must be inside range [1, 128]", } } } if m.GetPriority() > 128 { return LocalityLbEndpointsValidationError{ field: "Priority", reason: "value must be less than or equal to 128", } } return nil }
go
func (m *LocalityLbEndpoints) Validate() error { if m == nil { return nil } { tmp := m.GetLocality() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: "Locality", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetLbEndpoints() { _, _ = idx, item { tmp := item if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityLbEndpointsValidationError{ field: fmt.Sprintf("LbEndpoints[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 128 { return LocalityLbEndpointsValidationError{ field: "LoadBalancingWeight", reason: "value must be inside range [1, 128]", } } } if m.GetPriority() > 128 { return LocalityLbEndpointsValidationError{ field: "Priority", reason: "value must be less than or equal to 128", } } return nil }
[ "func", "(", "m", "*", "LocalityLbEndpoints", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetLocality", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "inte...
// Validate checks the field values on LocalityLbEndpoints with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "LocalityLbEndpoints", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/endpoint/endpoint.pb.validate.go#L253-L312
train
envoyproxy/go-control-plane
envoy/api/v2/endpoint/endpoint.pb.validate.go
Validate
func (m *Endpoint_HealthCheckConfig) Validate() error { if m == nil { return nil } if m.GetPortValue() > 65535 { return Endpoint_HealthCheckConfigValidationError{ field: "PortValue", reason: "value must be less than or equal to 65535", } } return nil }
go
func (m *Endpoint_HealthCheckConfig) Validate() error { if m == nil { return nil } if m.GetPortValue() > 65535 { return Endpoint_HealthCheckConfigValidationError{ field: "PortValue", reason: "value must be less than or equal to 65535", } } return nil }
[ "func", "(", "m", "*", "Endpoint_HealthCheckConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetPortValue", "(", ")", ">", "65535", "{", "return", "Endpoint_HealthCheckCon...
// Validate checks the field values on Endpoint_HealthCheckConfig with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Endpoint_HealthCheckConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/endpoint/endpoint.pb.validate.go#L373-L386
train
envoyproxy/go-control-plane
envoy/api/v2/core/protocol.pb.validate.go
Validate
func (m *HttpProtocolOptions) Validate() error { if m == nil { return nil } { tmp := m.GetIdleTimeout() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "IdleTimeout", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *HttpProtocolOptions) Validate() error { if m == nil { return nil } { tmp := m.GetIdleTimeout() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HttpProtocolOptionsValidationError{ field: "IdleTimeout", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "HttpProtocolOptions", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetIdleTimeout", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "i...
// Validate checks the field values on HttpProtocolOptions with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HttpProtocolOptions", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/protocol.pb.validate.go#L106-L127
train
envoyproxy/go-control-plane
envoy/api/v2/core/protocol.pb.validate.go
Validate
func (m *Http1ProtocolOptions) Validate() error { if m == nil { return nil } { tmp := m.GetAllowAbsoluteUrl() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http1ProtocolOptionsValidationError{ field: "AllowAbsoluteUrl", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for AcceptHttp_10 // no validation rules for DefaultHostForHttp_10 return nil }
go
func (m *Http1ProtocolOptions) Validate() error { if m == nil { return nil } { tmp := m.GetAllowAbsoluteUrl() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http1ProtocolOptionsValidationError{ field: "AllowAbsoluteUrl", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for AcceptHttp_10 // no validation rules for DefaultHostForHttp_10 return nil }
[ "func", "(", "m", "*", "Http1ProtocolOptions", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetAllowAbsoluteUrl", "(", ")", "\n\n", "if", "v", ",", "ok", ":="...
// Validate checks the field values on Http1ProtocolOptions with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Http1ProtocolOptions", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/protocol.pb.validate.go#L188-L213
train
envoyproxy/go-control-plane
envoy/api/v2/core/protocol.pb.validate.go
Validate
func (m *Http2ProtocolOptions) Validate() error { if m == nil { return nil } { tmp := m.GetHpackTableSize() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http2ProtocolOptionsValidationError{ field: "HpackTableSize", reason: "embedded message failed validation", cause: err, } } } } if wrapper := m.GetMaxConcurrentStreams(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 2147483647 { return Http2ProtocolOptionsValidationError{ field: "MaxConcurrentStreams", reason: "value must be inside range [1, 2147483647]", } } } if wrapper := m.GetInitialStreamWindowSize(); wrapper != nil { if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { return Http2ProtocolOptionsValidationError{ field: "InitialStreamWindowSize", reason: "value must be inside range [65535, 2147483647]", } } } if wrapper := m.GetInitialConnectionWindowSize(); wrapper != nil { if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { return Http2ProtocolOptionsValidationError{ field: "InitialConnectionWindowSize", reason: "value must be inside range [65535, 2147483647]", } } } // no validation rules for AllowConnect // no validation rules for AllowMetadata return nil }
go
func (m *Http2ProtocolOptions) Validate() error { if m == nil { return nil } { tmp := m.GetHpackTableSize() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return Http2ProtocolOptionsValidationError{ field: "HpackTableSize", reason: "embedded message failed validation", cause: err, } } } } if wrapper := m.GetMaxConcurrentStreams(); wrapper != nil { if val := wrapper.GetValue(); val < 1 || val > 2147483647 { return Http2ProtocolOptionsValidationError{ field: "MaxConcurrentStreams", reason: "value must be inside range [1, 2147483647]", } } } if wrapper := m.GetInitialStreamWindowSize(); wrapper != nil { if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { return Http2ProtocolOptionsValidationError{ field: "InitialStreamWindowSize", reason: "value must be inside range [65535, 2147483647]", } } } if wrapper := m.GetInitialConnectionWindowSize(); wrapper != nil { if val := wrapper.GetValue(); val < 65535 || val > 2147483647 { return Http2ProtocolOptionsValidationError{ field: "InitialConnectionWindowSize", reason: "value must be inside range [65535, 2147483647]", } } } // no validation rules for AllowConnect // no validation rules for AllowMetadata return nil }
[ "func", "(", "m", "*", "Http2ProtocolOptions", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetHpackTableSize", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// Validate checks the field values on Http2ProtocolOptions with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Http2ProtocolOptions", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/protocol.pb.validate.go#L274-L332
train
envoyproxy/go-control-plane
envoy/api/v2/core/protocol.pb.validate.go
Validate
func (m *GrpcProtocolOptions) Validate() error { if m == nil { return nil } { tmp := m.GetHttp2ProtocolOptions() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcProtocolOptionsValidationError{ field: "Http2ProtocolOptions", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *GrpcProtocolOptions) Validate() error { if m == nil { return nil } { tmp := m.GetHttp2ProtocolOptions() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GrpcProtocolOptionsValidationError{ field: "Http2ProtocolOptions", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "GrpcProtocolOptions", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetHttp2ProtocolOptions", "(", ")", "\n\n", "if", "v", ",", "ok", "...
// Validate checks the field values on GrpcProtocolOptions with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "GrpcProtocolOptions", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/protocol.pb.validate.go#L393-L414
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *CorsPolicy) Validate() error { if m == nil { return nil } for idx, item := range m.GetAllowOriginRegex() { _, _ = idx, item if len(item) > 1024 { return CorsPolicyValidationError{ field: fmt.Sprintf("AllowOriginRegex[%v]", idx), reason: "value length must be at most 1024 bytes", } } } // no validation rules for AllowMethods // no validation rules for AllowHeaders // no validation rules for ExposeHeaders // no validation rules for MaxAge { tmp := m.GetAllowCredentials() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "AllowCredentials", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetShadowEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "ShadowEnabled", reason: "embedded message failed validation", cause: err, } } } } switch m.EnabledSpecifier.(type) { case *CorsPolicy_Enabled: { tmp := m.GetEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "Enabled", reason: "embedded message failed validation", cause: err, } } } } case *CorsPolicy_FilterEnabled: { tmp := m.GetFilterEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "FilterEnabled", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *CorsPolicy) Validate() error { if m == nil { return nil } for idx, item := range m.GetAllowOriginRegex() { _, _ = idx, item if len(item) > 1024 { return CorsPolicyValidationError{ field: fmt.Sprintf("AllowOriginRegex[%v]", idx), reason: "value length must be at most 1024 bytes", } } } // no validation rules for AllowMethods // no validation rules for AllowHeaders // no validation rules for ExposeHeaders // no validation rules for MaxAge { tmp := m.GetAllowCredentials() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "AllowCredentials", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetShadowEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "ShadowEnabled", reason: "embedded message failed validation", cause: err, } } } } switch m.EnabledSpecifier.(type) { case *CorsPolicy_Enabled: { tmp := m.GetEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "Enabled", reason: "embedded message failed validation", cause: err, } } } } case *CorsPolicy_FilterEnabled: { tmp := m.GetFilterEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CorsPolicyValidationError{ field: "FilterEnabled", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "CorsPolicy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetAllowOriginRegex", "(", ")", "{", "_", ",", "_"...
// Validate checks the field values on CorsPolicy with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "CorsPolicy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L797-L891
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RetryPolicy) Validate() error { if m == nil { return nil } // no validation rules for RetryOn { tmp := m.GetNumRetries() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "NumRetries", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetPerTryTimeout() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "PerTryTimeout", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRetryPriority() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryPriority", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetRetryHostPredicate() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: fmt.Sprintf("RetryHostPredicate[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for HostSelectionRetryMaxAttempts { tmp := m.GetRetryBackOff() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryBackOff", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *RetryPolicy) Validate() error { if m == nil { return nil } // no validation rules for RetryOn { tmp := m.GetNumRetries() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "NumRetries", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetPerTryTimeout() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "PerTryTimeout", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRetryPriority() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryPriority", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetRetryHostPredicate() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: fmt.Sprintf("RetryHostPredicate[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for HostSelectionRetryMaxAttempts { tmp := m.GetRetryBackOff() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicyValidationError{ field: "RetryBackOff", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "RetryPolicy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for RetryOn", "{", "tmp", ":=", "m", ".", "GetNumRetries", "(", ")", "\n\n", "if", "...
// Validate checks the field values on RetryPolicy with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RetryPolicy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L1307-L1397
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *HedgePolicy) Validate() error { if m == nil { return nil } if wrapper := m.GetInitialRequests(); wrapper != nil { if wrapper.GetValue() < 1 { return HedgePolicyValidationError{ field: "InitialRequests", reason: "value must be greater than or equal to 1", } } } { tmp := m.GetAdditionalRequestChance() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HedgePolicyValidationError{ field: "AdditionalRequestChance", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for HedgeOnPerTryTimeout return nil }
go
func (m *HedgePolicy) Validate() error { if m == nil { return nil } if wrapper := m.GetInitialRequests(); wrapper != nil { if wrapper.GetValue() < 1 { return HedgePolicyValidationError{ field: "InitialRequests", reason: "value must be greater than or equal to 1", } } } { tmp := m.GetAdditionalRequestChance() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HedgePolicyValidationError{ field: "AdditionalRequestChance", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for HedgeOnPerTryTimeout return nil }
[ "func", "(", "m", "*", "HedgePolicy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "wrapper", ":=", "m", ".", "GetInitialRequests", "(", ")", ";", "wrapper", "!=", "nil", "{", "if",...
// Validate checks the field values on HedgePolicy with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HedgePolicy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L1456-L1490
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RedirectAction) Validate() error { if m == nil { return nil } // no validation rules for HostRedirect // no validation rules for PortRedirect if _, ok := RedirectAction_RedirectResponseCode_name[int32(m.GetResponseCode())]; !ok { return RedirectActionValidationError{ field: "ResponseCode", reason: "value must be one of the defined enum values", } } // no validation rules for StripQuery switch m.SchemeRewriteSpecifier.(type) { case *RedirectAction_HttpsRedirect: // no validation rules for HttpsRedirect case *RedirectAction_SchemeRedirect: // no validation rules for SchemeRedirect } switch m.PathRewriteSpecifier.(type) { case *RedirectAction_PathRedirect: // no validation rules for PathRedirect case *RedirectAction_PrefixRewrite: // no validation rules for PrefixRewrite } return nil }
go
func (m *RedirectAction) Validate() error { if m == nil { return nil } // no validation rules for HostRedirect // no validation rules for PortRedirect if _, ok := RedirectAction_RedirectResponseCode_name[int32(m.GetResponseCode())]; !ok { return RedirectActionValidationError{ field: "ResponseCode", reason: "value must be one of the defined enum values", } } // no validation rules for StripQuery switch m.SchemeRewriteSpecifier.(type) { case *RedirectAction_HttpsRedirect: // no validation rules for HttpsRedirect case *RedirectAction_SchemeRedirect: // no validation rules for SchemeRedirect } switch m.PathRewriteSpecifier.(type) { case *RedirectAction_PathRedirect: // no validation rules for PathRedirect case *RedirectAction_PrefixRewrite: // no validation rules for PrefixRewrite } return nil }
[ "func", "(", "m", "*", "RedirectAction", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for HostRedirect", "// no validation rules for PortRedirect", "if", "_", ",", "ok", ":=", ...
// Validate checks the field values on RedirectAction with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RedirectAction", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L1549-L1588
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *DirectResponseAction) Validate() error { if m == nil { return nil } if val := m.GetStatus(); val < 100 || val >= 600 { return DirectResponseActionValidationError{ field: "Status", reason: "value must be inside range [100, 600)", } } { tmp := m.GetBody() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DirectResponseActionValidationError{ field: "Body", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *DirectResponseAction) Validate() error { if m == nil { return nil } if val := m.GetStatus(); val < 100 || val >= 600 { return DirectResponseActionValidationError{ field: "Status", reason: "value must be inside range [100, 600)", } } { tmp := m.GetBody() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DirectResponseActionValidationError{ field: "Body", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "DirectResponseAction", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "val", ":=", "m", ".", "GetStatus", "(", ")", ";", "val", "<", "100", "||", "val", ">="...
// Validate checks the field values on DirectResponseAction with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "DirectResponseAction", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L1647-L1675
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *Decorator) Validate() error { if m == nil { return nil } if len(m.GetOperation()) < 1 { return DecoratorValidationError{ field: "Operation", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *Decorator) Validate() error { if m == nil { return nil } if len(m.GetOperation()) < 1 { return DecoratorValidationError{ field: "Operation", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "Decorator", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetOperation", "(", ")", ")", "<", "1", "{", "return", "DecoratorValidationEr...
// Validate checks the field values on Decorator with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Decorator", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L1735-L1748
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *VirtualCluster) Validate() error { if m == nil { return nil } if l := len(m.GetPattern()); l < 1 || l > 1024 { return VirtualClusterValidationError{ field: "Pattern", reason: "value length must be between 1 and 1024 bytes, inclusive", } } if len(m.GetName()) < 1 { return VirtualClusterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } // no validation rules for Method return nil }
go
func (m *VirtualCluster) Validate() error { if m == nil { return nil } if l := len(m.GetPattern()); l < 1 || l > 1024 { return VirtualClusterValidationError{ field: "Pattern", reason: "value length must be between 1 and 1024 bytes, inclusive", } } if len(m.GetName()) < 1 { return VirtualClusterValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } // no validation rules for Method return nil }
[ "func", "(", "m", "*", "VirtualCluster", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "l", ":=", "len", "(", "m", ".", "GetPattern", "(", ")", ")", ";", "l", "<", "1", "||", "...
// Validate checks the field values on VirtualCluster with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "VirtualCluster", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L1807-L1829
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *HeaderMatcher) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return HeaderMatcherValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } // no validation rules for InvertMatch switch m.HeaderMatchSpecifier.(type) { case *HeaderMatcher_ExactMatch: // no validation rules for ExactMatch case *HeaderMatcher_RegexMatch: if len(m.GetRegexMatch()) > 1024 { return HeaderMatcherValidationError{ field: "RegexMatch", reason: "value length must be at most 1024 bytes", } } case *HeaderMatcher_RangeMatch: { tmp := m.GetRangeMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderMatcherValidationError{ field: "RangeMatch", reason: "embedded message failed validation", cause: err, } } } } case *HeaderMatcher_PresentMatch: // no validation rules for PresentMatch case *HeaderMatcher_PrefixMatch: if len(m.GetPrefixMatch()) < 1 { return HeaderMatcherValidationError{ field: "PrefixMatch", reason: "value length must be at least 1 bytes", } } case *HeaderMatcher_SuffixMatch: if len(m.GetSuffixMatch()) < 1 { return HeaderMatcherValidationError{ field: "SuffixMatch", reason: "value length must be at least 1 bytes", } } } return nil }
go
func (m *HeaderMatcher) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return HeaderMatcherValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } // no validation rules for InvertMatch switch m.HeaderMatchSpecifier.(type) { case *HeaderMatcher_ExactMatch: // no validation rules for ExactMatch case *HeaderMatcher_RegexMatch: if len(m.GetRegexMatch()) > 1024 { return HeaderMatcherValidationError{ field: "RegexMatch", reason: "value length must be at most 1024 bytes", } } case *HeaderMatcher_RangeMatch: { tmp := m.GetRangeMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HeaderMatcherValidationError{ field: "RangeMatch", reason: "embedded message failed validation", cause: err, } } } } case *HeaderMatcher_PresentMatch: // no validation rules for PresentMatch case *HeaderMatcher_PrefixMatch: if len(m.GetPrefixMatch()) < 1 { return HeaderMatcherValidationError{ field: "PrefixMatch", reason: "value length must be at least 1 bytes", } } case *HeaderMatcher_SuffixMatch: if len(m.GetSuffixMatch()) < 1 { return HeaderMatcherValidationError{ field: "SuffixMatch", reason: "value length must be at least 1 bytes", } } } return nil }
[ "func", "(", "m", "*", "HeaderMatcher", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "HeaderMatcherValidatio...
// Validate checks the field values on HeaderMatcher with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HeaderMatcher", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L1992-L2061
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *QueryParameterMatcher) Validate() error { if m == nil { return nil } if l := len(m.GetName()); l < 1 || l > 1024 { return QueryParameterMatcherValidationError{ field: "Name", reason: "value length must be between 1 and 1024 bytes, inclusive", } } // no validation rules for Value { tmp := m.GetRegex() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QueryParameterMatcherValidationError{ field: "Regex", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *QueryParameterMatcher) Validate() error { if m == nil { return nil } if l := len(m.GetName()); l < 1 || l > 1024 { return QueryParameterMatcherValidationError{ field: "Name", reason: "value length must be between 1 and 1024 bytes, inclusive", } } // no validation rules for Value { tmp := m.GetRegex() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return QueryParameterMatcherValidationError{ field: "Regex", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "QueryParameterMatcher", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "l", ":=", "len", "(", "m", ".", "GetName", "(", ")", ")", ";", "l", "<", "1", "||",...
// Validate checks the field values on QueryParameterMatcher with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "QueryParameterMatcher", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L2120-L2150
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RouteAction_RequestMirrorPolicy) Validate() error { if m == nil { return nil } if len(m.GetCluster()) < 1 { return RouteAction_RequestMirrorPolicyValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } } // no validation rules for RuntimeKey { tmp := m.GetRuntimeFraction() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_RequestMirrorPolicyValidationError{ field: "RuntimeFraction", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *RouteAction_RequestMirrorPolicy) Validate() error { if m == nil { return nil } if len(m.GetCluster()) < 1 { return RouteAction_RequestMirrorPolicyValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } } // no validation rules for RuntimeKey { tmp := m.GetRuntimeFraction() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_RequestMirrorPolicyValidationError{ field: "RuntimeFraction", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "RouteAction_RequestMirrorPolicy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetCluster", "(", ")", ")", "<", "1", "{", "return", "R...
// Validate checks the field values on RouteAction_RequestMirrorPolicy with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RouteAction_RequestMirrorPolicy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L2442-L2472
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RouteAction_HashPolicy) Validate() error { if m == nil { return nil } // no validation rules for Terminal switch m.PolicySpecifier.(type) { case *RouteAction_HashPolicy_Header_: { tmp := m.GetHeader() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "Header", reason: "embedded message failed validation", cause: err, } } } } case *RouteAction_HashPolicy_Cookie_: { tmp := m.GetCookie() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "Cookie", reason: "embedded message failed validation", cause: err, } } } } case *RouteAction_HashPolicy_ConnectionProperties_: { tmp := m.GetConnectionProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "ConnectionProperties", reason: "embedded message failed validation", cause: err, } } } } default: return RouteAction_HashPolicyValidationError{ field: "PolicySpecifier", reason: "value is required", } } return nil }
go
func (m *RouteAction_HashPolicy) Validate() error { if m == nil { return nil } // no validation rules for Terminal switch m.PolicySpecifier.(type) { case *RouteAction_HashPolicy_Header_: { tmp := m.GetHeader() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "Header", reason: "embedded message failed validation", cause: err, } } } } case *RouteAction_HashPolicy_Cookie_: { tmp := m.GetCookie() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "Cookie", reason: "embedded message failed validation", cause: err, } } } } case *RouteAction_HashPolicy_ConnectionProperties_: { tmp := m.GetConnectionProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicyValidationError{ field: "ConnectionProperties", reason: "embedded message failed validation", cause: err, } } } } default: return RouteAction_HashPolicyValidationError{ field: "PolicySpecifier", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "RouteAction_HashPolicy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Terminal", "switch", "m", ".", "PolicySpecifier", ".", "(", "type", ")", ...
// Validate checks the field values on RouteAction_HashPolicy with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RouteAction_HashPolicy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L2534-L2603
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RouteAction_UpgradeConfig) Validate() error { if m == nil { return nil } // no validation rules for UpgradeType { tmp := m.GetEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_UpgradeConfigValidationError{ field: "Enabled", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *RouteAction_UpgradeConfig) Validate() error { if m == nil { return nil } // no validation rules for UpgradeType { tmp := m.GetEnabled() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_UpgradeConfigValidationError{ field: "Enabled", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "RouteAction_UpgradeConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for UpgradeType", "{", "tmp", ":=", "m", ".", "GetEnabled", "(", ")", "\n\...
// Validate checks the field values on RouteAction_UpgradeConfig with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RouteAction_UpgradeConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L2664-L2687
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RouteAction_HashPolicy_Header) Validate() error { if m == nil { return nil } if len(m.GetHeaderName()) < 1 { return RouteAction_HashPolicy_HeaderValidationError{ field: "HeaderName", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *RouteAction_HashPolicy_Header) Validate() error { if m == nil { return nil } if len(m.GetHeaderName()) < 1 { return RouteAction_HashPolicy_HeaderValidationError{ field: "HeaderName", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "RouteAction_HashPolicy_Header", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetHeaderName", "(", ")", ")", "<", "1", "{", "return", "...
// Validate checks the field values on RouteAction_HashPolicy_Header with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RouteAction_HashPolicy_Header", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned",...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L2748-L2761
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RouteAction_HashPolicy_Cookie) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return RouteAction_HashPolicy_CookieValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } { tmp := m.GetTtl() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicy_CookieValidationError{ field: "Ttl", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Path return nil }
go
func (m *RouteAction_HashPolicy_Cookie) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return RouteAction_HashPolicy_CookieValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } { tmp := m.GetTtl() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouteAction_HashPolicy_CookieValidationError{ field: "Ttl", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Path return nil }
[ "func", "(", "m", "*", "RouteAction_HashPolicy_Cookie", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "RouteA...
// Validate checks the field values on RouteAction_HashPolicy_Cookie with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RouteAction_HashPolicy_Cookie", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned",...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L2823-L2853
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RetryPolicy_RetryPriority) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return RetryPolicy_RetryPriorityValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *RetryPolicy_RetryPriority_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryPriorityValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *RetryPolicy_RetryPriority_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryPriorityValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *RetryPolicy_RetryPriority) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return RetryPolicy_RetryPriorityValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *RetryPolicy_RetryPriority_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryPriorityValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *RetryPolicy_RetryPriority_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryPriorityValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "RetryPolicy_RetryPriority", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "RetryPolic...
// Validate checks the field values on RetryPolicy_RetryPriority with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RetryPolicy_RetryPriority", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L2985-L3036
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RetryPolicy_RetryHostPredicate) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return RetryPolicy_RetryHostPredicateValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *RetryPolicy_RetryHostPredicate_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryHostPredicateValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *RetryPolicy_RetryHostPredicate_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryHostPredicateValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *RetryPolicy_RetryHostPredicate) Validate() error { if m == nil { return nil } if len(m.GetName()) < 1 { return RetryPolicy_RetryHostPredicateValidationError{ field: "Name", reason: "value length must be at least 1 bytes", } } switch m.ConfigType.(type) { case *RetryPolicy_RetryHostPredicate_Config: { tmp := m.GetConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryHostPredicateValidationError{ field: "Config", reason: "embedded message failed validation", cause: err, } } } } case *RetryPolicy_RetryHostPredicate_TypedConfig: { tmp := m.GetTypedConfig() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RetryPolicy_RetryHostPredicateValidationError{ field: "TypedConfig", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "RetryPolicy_RetryHostPredicate", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetName", "(", ")", ")", "<", "1", "{", "return", "Retry...
// Validate checks the field values on RetryPolicy_RetryHostPredicate with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RetryPolicy_RetryHostPredicate", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned"...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L3097-L3148
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RetryPolicy_RetryBackOff) Validate() error { if m == nil { return nil } if m.GetBaseInterval() == nil { return RetryPolicy_RetryBackOffValidationError{ field: "BaseInterval", reason: "value is required", } } if d := m.GetBaseInterval(); d != nil { dur := *d gt := time.Duration(0*time.Second + 0*time.Nanosecond) if dur <= gt { return RetryPolicy_RetryBackOffValidationError{ field: "BaseInterval", reason: "value must be greater than 0s", } } } if d := m.GetMaxInterval(); d != nil { dur := *d gt := time.Duration(0*time.Second + 0*time.Nanosecond) if dur <= gt { return RetryPolicy_RetryBackOffValidationError{ field: "MaxInterval", reason: "value must be greater than 0s", } } } return nil }
go
func (m *RetryPolicy_RetryBackOff) Validate() error { if m == nil { return nil } if m.GetBaseInterval() == nil { return RetryPolicy_RetryBackOffValidationError{ field: "BaseInterval", reason: "value is required", } } if d := m.GetBaseInterval(); d != nil { dur := *d gt := time.Duration(0*time.Second + 0*time.Nanosecond) if dur <= gt { return RetryPolicy_RetryBackOffValidationError{ field: "BaseInterval", reason: "value must be greater than 0s", } } } if d := m.GetMaxInterval(); d != nil { dur := *d gt := time.Duration(0*time.Second + 0*time.Nanosecond) if dur <= gt { return RetryPolicy_RetryBackOffValidationError{ field: "MaxInterval", reason: "value must be greater than 0s", } } } return nil }
[ "func", "(", "m", "*", "RetryPolicy_RetryBackOff", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetBaseInterval", "(", ")", "==", "nil", "{", "return", "RetryPolicy_RetryBackOf...
// Validate checks the field values on RetryPolicy_RetryBackOff with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RetryPolicy_RetryBackOff", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "....
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L3210-L3251
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RateLimit_Action) Validate() error { if m == nil { return nil } switch m.ActionSpecifier.(type) { case *RateLimit_Action_SourceCluster_: { tmp := m.GetSourceCluster() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "SourceCluster", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_DestinationCluster_: { tmp := m.GetDestinationCluster() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "DestinationCluster", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_RequestHeaders_: { tmp := m.GetRequestHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "RequestHeaders", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_RemoteAddress_: { tmp := m.GetRemoteAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "RemoteAddress", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_GenericKey_: { tmp := m.GetGenericKey() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "GenericKey", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_HeaderValueMatch_: { tmp := m.GetHeaderValueMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "HeaderValueMatch", reason: "embedded message failed validation", cause: err, } } } } default: return RateLimit_ActionValidationError{ field: "ActionSpecifier", reason: "value is required", } } return nil }
go
func (m *RateLimit_Action) Validate() error { if m == nil { return nil } switch m.ActionSpecifier.(type) { case *RateLimit_Action_SourceCluster_: { tmp := m.GetSourceCluster() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "SourceCluster", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_DestinationCluster_: { tmp := m.GetDestinationCluster() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "DestinationCluster", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_RequestHeaders_: { tmp := m.GetRequestHeaders() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "RequestHeaders", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_RemoteAddress_: { tmp := m.GetRemoteAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "RemoteAddress", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_GenericKey_: { tmp := m.GetGenericKey() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "GenericKey", reason: "embedded message failed validation", cause: err, } } } } case *RateLimit_Action_HeaderValueMatch_: { tmp := m.GetHeaderValueMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_ActionValidationError{ field: "HeaderValueMatch", reason: "embedded message failed validation", cause: err, } } } } default: return RateLimit_ActionValidationError{ field: "ActionSpecifier", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "RateLimit_Action", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "ActionSpecifier", ".", "(", "type", ")", "{", "case", "*", "RateLimit_Action_Sourc...
// Validate checks the field values on RateLimit_Action with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RateLimit_Action", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L3312-L3430
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RateLimit_Action_RequestHeaders) Validate() error { if m == nil { return nil } if len(m.GetHeaderName()) < 1 { return RateLimit_Action_RequestHeadersValidationError{ field: "HeaderName", reason: "value length must be at least 1 bytes", } } if len(m.GetDescriptorKey()) < 1 { return RateLimit_Action_RequestHeadersValidationError{ field: "DescriptorKey", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *RateLimit_Action_RequestHeaders) Validate() error { if m == nil { return nil } if len(m.GetHeaderName()) < 1 { return RateLimit_Action_RequestHeadersValidationError{ field: "HeaderName", reason: "value length must be at least 1 bytes", } } if len(m.GetDescriptorKey()) < 1 { return RateLimit_Action_RequestHeadersValidationError{ field: "DescriptorKey", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "RateLimit_Action_RequestHeaders", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetHeaderName", "(", ")", ")", "<", "1", "{", "return", ...
// Validate checks the field values on RateLimit_Action_RequestHeaders with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RateLimit_Action_RequestHeaders", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L3625-L3645
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RateLimit_Action_GenericKey) Validate() error { if m == nil { return nil } if len(m.GetDescriptorValue()) < 1 { return RateLimit_Action_GenericKeyValidationError{ field: "DescriptorValue", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *RateLimit_Action_GenericKey) Validate() error { if m == nil { return nil } if len(m.GetDescriptorValue()) < 1 { return RateLimit_Action_GenericKeyValidationError{ field: "DescriptorValue", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "RateLimit_Action_GenericKey", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetDescriptorValue", "(", ")", ")", "<", "1", "{", "return", ...
// Validate checks the field values on RateLimit_Action_GenericKey with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RateLimit_Action_GenericKey", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L3775-L3788
train
envoyproxy/go-control-plane
envoy/api/v2/route/route.pb.validate.go
Validate
func (m *RateLimit_Action_HeaderValueMatch) Validate() error { if m == nil { return nil } if len(m.GetDescriptorValue()) < 1 { return RateLimit_Action_HeaderValueMatchValidationError{ field: "DescriptorValue", reason: "value length must be at least 1 bytes", } } { tmp := m.GetExpectMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_HeaderValueMatchValidationError{ field: "ExpectMatch", reason: "embedded message failed validation", cause: err, } } } } if len(m.GetHeaders()) < 1 { return RateLimit_Action_HeaderValueMatchValidationError{ field: "Headers", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_HeaderValueMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *RateLimit_Action_HeaderValueMatch) Validate() error { if m == nil { return nil } if len(m.GetDescriptorValue()) < 1 { return RateLimit_Action_HeaderValueMatchValidationError{ field: "DescriptorValue", reason: "value length must be at least 1 bytes", } } { tmp := m.GetExpectMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_HeaderValueMatchValidationError{ field: "ExpectMatch", reason: "embedded message failed validation", cause: err, } } } } if len(m.GetHeaders()) < 1 { return RateLimit_Action_HeaderValueMatchValidationError{ field: "Headers", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimit_Action_HeaderValueMatchValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "RateLimit_Action_HeaderValueMatch", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetDescriptorValue", "(", ")", ")", "<", "1", "{", "ret...
// Validate checks the field values on RateLimit_Action_HeaderValueMatch with // the rules defined in the proto definition for this message. If any rules // are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RateLimit_Action_HeaderValueMatch", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "return...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/route/route.pb.validate.go#L3850-L3905
train
envoyproxy/go-control-plane
envoy/service/load_stats/v2/lrs.pb.validate.go
Validate
func (m *LoadStatsRequest) Validate() error { if m == nil { return nil } { tmp := m.GetNode() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsRequestValidationError{ field: "Node", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetClusterStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsRequestValidationError{ field: fmt.Sprintf("ClusterStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *LoadStatsRequest) Validate() error { if m == nil { return nil } { tmp := m.GetNode() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsRequestValidationError{ field: "Node", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetClusterStats() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsRequestValidationError{ field: fmt.Sprintf("ClusterStats[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "LoadStatsRequest", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetNode", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface",...
// Validate checks the field values on LoadStatsRequest with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "LoadStatsRequest", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/load_stats/v2/lrs.pb.validate.go#L39-L80
train
envoyproxy/go-control-plane
envoy/service/load_stats/v2/lrs.pb.validate.go
Validate
func (m *LoadStatsResponse) Validate() error { if m == nil { return nil } if len(m.GetClusters()) < 1 { return LoadStatsResponseValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } } { tmp := m.GetLoadReportingInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsResponseValidationError{ field: "LoadReportingInterval", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ReportEndpointGranularity return nil }
go
func (m *LoadStatsResponse) Validate() error { if m == nil { return nil } if len(m.GetClusters()) < 1 { return LoadStatsResponseValidationError{ field: "Clusters", reason: "value must contain at least 1 item(s)", } } { tmp := m.GetLoadReportingInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LoadStatsResponseValidationError{ field: "LoadReportingInterval", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ReportEndpointGranularity return nil }
[ "func", "(", "m", "*", "LoadStatsResponse", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetClusters", "(", ")", ")", "<", "1", "{", "return", "LoadStatsRespo...
// Validate checks the field values on LoadStatsResponse with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "LoadStatsResponse", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/load_stats/v2/lrs.pb.validate.go#L139-L169
train
envoyproxy/go-control-plane
envoy/config/filter/fault/v2/fault.pb.validate.go
Validate
func (m *FaultDelay) Validate() error { if m == nil { return nil } // no validation rules for Type { tmp := m.GetPercentage() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultDelayValidationError{ field: "Percentage", reason: "embedded message failed validation", cause: err, } } } } switch m.FaultDelaySecifier.(type) { case *FaultDelay_FixedDelay: if d := m.GetFixedDelay(); d != nil { dur := *d gt := time.Duration(0*time.Second + 0*time.Nanosecond) if dur <= gt { return FaultDelayValidationError{ field: "FixedDelay", reason: "value must be greater than 0s", } } } case *FaultDelay_HeaderDelay_: { tmp := m.GetHeaderDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultDelayValidationError{ field: "HeaderDelay", reason: "embedded message failed validation", cause: err, } } } } default: return FaultDelayValidationError{ field: "FaultDelaySecifier", reason: "value is required", } } return nil }
go
func (m *FaultDelay) Validate() error { if m == nil { return nil } // no validation rules for Type { tmp := m.GetPercentage() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultDelayValidationError{ field: "Percentage", reason: "embedded message failed validation", cause: err, } } } } switch m.FaultDelaySecifier.(type) { case *FaultDelay_FixedDelay: if d := m.GetFixedDelay(); d != nil { dur := *d gt := time.Duration(0*time.Second + 0*time.Nanosecond) if dur <= gt { return FaultDelayValidationError{ field: "FixedDelay", reason: "value must be greater than 0s", } } } case *FaultDelay_HeaderDelay_: { tmp := m.GetHeaderDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultDelayValidationError{ field: "HeaderDelay", reason: "embedded message failed validation", cause: err, } } } } default: return FaultDelayValidationError{ field: "FaultDelaySecifier", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "FaultDelay", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for Type", "{", "tmp", ":=", "m", ".", "GetPercentage", "(", ")", "\n\n", "if", "v", ...
// Validate checks the field values on FaultDelay with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "FaultDelay", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/fault/v2/fault.pb.validate.go#L38-L104
train
envoyproxy/go-control-plane
envoy/config/filter/fault/v2/fault.pb.validate.go
Validate
func (m *FaultRateLimit) 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 FaultRateLimitValidationError{ field: "Percentage", reason: "embedded message failed validation", cause: err, } } } } switch m.LimitType.(type) { case *FaultRateLimit_FixedLimit_: { tmp := m.GetFixedLimit() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "FixedLimit", reason: "embedded message failed validation", cause: err, } } } } case *FaultRateLimit_HeaderLimit_: { tmp := m.GetHeaderLimit() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "HeaderLimit", reason: "embedded message failed validation", cause: err, } } } } default: return FaultRateLimitValidationError{ field: "LimitType", reason: "value is required", } } return nil }
go
func (m *FaultRateLimit) 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 FaultRateLimitValidationError{ field: "Percentage", reason: "embedded message failed validation", cause: err, } } } } switch m.LimitType.(type) { case *FaultRateLimit_FixedLimit_: { tmp := m.GetFixedLimit() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "FixedLimit", reason: "embedded message failed validation", cause: err, } } } } case *FaultRateLimit_HeaderLimit_: { tmp := m.GetHeaderLimit() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return FaultRateLimitValidationError{ field: "HeaderLimit", reason: "embedded message failed validation", cause: err, } } } } default: return FaultRateLimitValidationError{ field: "LimitType", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "FaultRateLimit", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetPercentage", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interfa...
// Validate checks the field values on FaultRateLimit with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "FaultRateLimit", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/fault/v2/fault.pb.validate.go#L163-L228
train
envoyproxy/go-control-plane
envoy/config/filter/fault/v2/fault.pb.validate.go
Validate
func (m *FaultRateLimit_FixedLimit) Validate() error { if m == nil { return nil } if m.GetLimitKbps() < 1 { return FaultRateLimit_FixedLimitValidationError{ field: "LimitKbps", reason: "value must be greater than or equal to 1", } } return nil }
go
func (m *FaultRateLimit_FixedLimit) Validate() error { if m == nil { return nil } if m.GetLimitKbps() < 1 { return FaultRateLimit_FixedLimitValidationError{ field: "LimitKbps", reason: "value must be greater than or equal to 1", } } return nil }
[ "func", "(", "m", "*", "FaultRateLimit_FixedLimit", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetLimitKbps", "(", ")", "<", "1", "{", "return", "FaultRateLimit_FixedLimitVal...
// Validate checks the field values on FaultRateLimit_FixedLimit with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "FaultRateLimit_FixedLimit", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/fault/v2/fault.pb.validate.go#L354-L367
train
envoyproxy/go-control-plane
envoy/service/auth/v2/external_auth.pb.validate.go
Validate
func (m *CheckRequest) Validate() error { if m == nil { return nil } { tmp := m.GetAttributes() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckRequestValidationError{ field: "Attributes", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *CheckRequest) Validate() error { if m == nil { return nil } { tmp := m.GetAttributes() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckRequestValidationError{ field: "Attributes", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "CheckRequest", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetAttributes", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface...
// Validate checks the field values on CheckRequest with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "CheckRequest", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/auth/v2/external_auth.pb.validate.go#L39-L60
train
envoyproxy/go-control-plane
envoy/service/auth/v2/external_auth.pb.validate.go
Validate
func (m *DeniedHttpResponse) Validate() error { if m == nil { return nil } if m.GetStatus() == nil { return DeniedHttpResponseValidationError{ field: "Status", reason: "value is required", } } { tmp := m.GetStatus() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeniedHttpResponseValidationError{ field: "Status", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeniedHttpResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for Body return nil }
go
func (m *DeniedHttpResponse) Validate() error { if m == nil { return nil } if m.GetStatus() == nil { return DeniedHttpResponseValidationError{ field: "Status", reason: "value is required", } } { tmp := m.GetStatus() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeniedHttpResponseValidationError{ field: "Status", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetHeaders() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeniedHttpResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for Body return nil }
[ "func", "(", "m", "*", "DeniedHttpResponse", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetStatus", "(", ")", "==", "nil", "{", "return", "DeniedHttpResponseValidationError",...
// Validate checks the field values on DeniedHttpResponse with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "DeniedHttpResponse", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/auth/v2/external_auth.pb.validate.go#L119-L169
train
envoyproxy/go-control-plane
envoy/service/auth/v2/external_auth.pb.validate.go
Validate
func (m *OkHttpResponse) 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 OkHttpResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *OkHttpResponse) 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 OkHttpResponseValidationError{ field: fmt.Sprintf("Headers[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "OkHttpResponse", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetHeaders", "(", ")", "{", "_", ",", "_", "...
// Validate checks the field values on OkHttpResponse with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "OkHttpResponse", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/auth/v2/external_auth.pb.validate.go#L230-L256
train
envoyproxy/go-control-plane
envoy/service/auth/v2/external_auth.pb.validate.go
Validate
func (m *CheckResponse) Validate() error { if m == nil { return nil } { tmp := m.GetStatus() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "Status", reason: "embedded message failed validation", cause: err, } } } } switch m.HttpResponse.(type) { case *CheckResponse_DeniedResponse: { tmp := m.GetDeniedResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "DeniedResponse", reason: "embedded message failed validation", cause: err, } } } } case *CheckResponse_OkResponse: { tmp := m.GetOkResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "OkResponse", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *CheckResponse) Validate() error { if m == nil { return nil } { tmp := m.GetStatus() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "Status", reason: "embedded message failed validation", cause: err, } } } } switch m.HttpResponse.(type) { case *CheckResponse_DeniedResponse: { tmp := m.GetDeniedResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "DeniedResponse", reason: "embedded message failed validation", cause: err, } } } } case *CheckResponse_OkResponse: { tmp := m.GetOkResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CheckResponseValidationError{ field: "OkResponse", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "CheckResponse", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetStatus", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", ...
// Validate checks the field values on CheckResponse with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "CheckResponse", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/auth/v2/external_auth.pb.validate.go#L315-L374
train
envoyproxy/go-control-plane
envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.validate.go
Validate
func (m *IPTagging) Validate() error { if m == nil { return nil } if _, ok := IPTagging_RequestType_name[int32(m.GetRequestType())]; !ok { return IPTaggingValidationError{ field: "RequestType", reason: "value must be one of the defined enum values", } } if len(m.GetIpTags()) < 1 { return IPTaggingValidationError{ field: "IpTags", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetIpTags() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return IPTaggingValidationError{ field: fmt.Sprintf("IpTags[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *IPTagging) Validate() error { if m == nil { return nil } if _, ok := IPTagging_RequestType_name[int32(m.GetRequestType())]; !ok { return IPTaggingValidationError{ field: "RequestType", reason: "value must be one of the defined enum values", } } if len(m.GetIpTags()) < 1 { return IPTaggingValidationError{ field: "IpTags", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetIpTags() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return IPTaggingValidationError{ field: fmt.Sprintf("IpTags[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "IPTagging", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "IPTagging_RequestType_name", "[", "int32", "(", "m", ".", "GetRequestType", "("...
// Validate checks the field values on IPTagging with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "IPTagging", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.validate.go#L38-L78
train
envoyproxy/go-control-plane
envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.validate.go
Validate
func (m *IPTagging_IPTag) Validate() error { if m == nil { return nil } // no validation rules for IpTagName for idx, item := range m.GetIpList() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return IPTagging_IPTagValidationError{ field: fmt.Sprintf("IpList[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *IPTagging_IPTag) Validate() error { if m == nil { return nil } // no validation rules for IpTagName for idx, item := range m.GetIpList() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return IPTagging_IPTagValidationError{ field: fmt.Sprintf("IpList[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "IPTagging_IPTag", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for IpTagName", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetIpList", "...
// Validate checks the field values on IPTagging_IPTag with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "IPTagging_IPTag", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/ip_tagging/v2/ip_tagging.pb.validate.go#L137-L165
train
envoyproxy/go-control-plane
envoy/type/matcher/string.pb.validate.go
Validate
func (m *StringMatcher) Validate() error { if m == nil { return nil } switch m.MatchPattern.(type) { case *StringMatcher_Exact: // no validation rules for Exact case *StringMatcher_Prefix: if len(m.GetPrefix()) < 1 { return StringMatcherValidationError{ field: "Prefix", reason: "value length must be at least 1 bytes", } } case *StringMatcher_Suffix: if len(m.GetSuffix()) < 1 { return StringMatcherValidationError{ field: "Suffix", reason: "value length must be at least 1 bytes", } } case *StringMatcher_Regex: if len(m.GetRegex()) > 1024 { return StringMatcherValidationError{ field: "Regex", reason: "value length must be at most 1024 bytes", } } default: return StringMatcherValidationError{ field: "MatchPattern", reason: "value is required", } } return nil }
go
func (m *StringMatcher) Validate() error { if m == nil { return nil } switch m.MatchPattern.(type) { case *StringMatcher_Exact: // no validation rules for Exact case *StringMatcher_Prefix: if len(m.GetPrefix()) < 1 { return StringMatcherValidationError{ field: "Prefix", reason: "value length must be at least 1 bytes", } } case *StringMatcher_Suffix: if len(m.GetSuffix()) < 1 { return StringMatcherValidationError{ field: "Suffix", reason: "value length must be at least 1 bytes", } } case *StringMatcher_Regex: if len(m.GetRegex()) > 1024 { return StringMatcherValidationError{ field: "Regex", reason: "value length must be at most 1024 bytes", } } default: return StringMatcherValidationError{ field: "MatchPattern", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "StringMatcher", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "MatchPattern", ".", "(", "type", ")", "{", "case", "*", "StringMatcher_Exact", ":",...
// Validate checks the field values on StringMatcher with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "StringMatcher", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/type/matcher/string.pb.validate.go#L39-L85
train
envoyproxy/go-control-plane
envoy/type/matcher/string.pb.validate.go
Validate
func (m *ListStringMatcher) Validate() error { if m == nil { return nil } if len(m.GetPatterns()) < 1 { return ListStringMatcherValidationError{ field: "Patterns", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetPatterns() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListStringMatcherValidationError{ field: fmt.Sprintf("Patterns[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *ListStringMatcher) Validate() error { if m == nil { return nil } if len(m.GetPatterns()) < 1 { return ListStringMatcherValidationError{ field: "Patterns", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetPatterns() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListStringMatcherValidationError{ field: fmt.Sprintf("Patterns[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "ListStringMatcher", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetPatterns", "(", ")", ")", "<", "1", "{", "return", "ListStringMatc...
// Validate checks the field values on ListStringMatcher with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ListStringMatcher", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/type/matcher/string.pb.validate.go#L144-L177
train
envoyproxy/go-control-plane
envoy/api/v2/core/config_source.pb.validate.go
Validate
func (m *ApiConfigSource) Validate() error { if m == nil { return nil } if _, ok := ApiConfigSource_ApiType_name[int32(m.GetApiType())]; !ok { return ApiConfigSourceValidationError{ field: "ApiType", reason: "value must be one of the defined enum values", } } for idx, item := range m.GetGrpcServices() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: fmt.Sprintf("GrpcServices[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetRefreshDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: "RefreshDelay", reason: "embedded message failed validation", cause: err, } } } } if d := m.GetRequestTimeout(); d != nil { dur := *d gt := time.Duration(0*time.Second + 0*time.Nanosecond) if dur <= gt { return ApiConfigSourceValidationError{ field: "RequestTimeout", reason: "value must be greater than 0s", } } } { tmp := m.GetRateLimitSettings() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: "RateLimitSettings", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *ApiConfigSource) Validate() error { if m == nil { return nil } if _, ok := ApiConfigSource_ApiType_name[int32(m.GetApiType())]; !ok { return ApiConfigSourceValidationError{ field: "ApiType", reason: "value must be one of the defined enum values", } } for idx, item := range m.GetGrpcServices() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: fmt.Sprintf("GrpcServices[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetRefreshDelay() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: "RefreshDelay", reason: "embedded message failed validation", cause: err, } } } } if d := m.GetRequestTimeout(); d != nil { dur := *d gt := time.Duration(0*time.Second + 0*time.Nanosecond) if dur <= gt { return ApiConfigSourceValidationError{ field: "RequestTimeout", reason: "value must be greater than 0s", } } } { tmp := m.GetRateLimitSettings() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ApiConfigSourceValidationError{ field: "RateLimitSettings", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "ApiConfigSource", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "ApiConfigSource_ApiType_name", "[", "int32", "(", "m", ".", "GetApiType", ...
// Validate checks the field values on ApiConfigSource with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ApiConfigSource", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/config_source.pb.validate.go#L39-L116
train
envoyproxy/go-control-plane
envoy/api/v2/core/config_source.pb.validate.go
Validate
func (m *RateLimitSettings) Validate() error { if m == nil { return nil } { tmp := m.GetMaxTokens() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitSettingsValidationError{ field: "MaxTokens", reason: "embedded message failed validation", cause: err, } } } } if wrapper := m.GetFillRate(); wrapper != nil { if wrapper.GetValue() <= 0 { return RateLimitSettingsValidationError{ field: "FillRate", reason: "value must be greater than 0", } } } return nil }
go
func (m *RateLimitSettings) Validate() error { if m == nil { return nil } { tmp := m.GetMaxTokens() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitSettingsValidationError{ field: "MaxTokens", reason: "embedded message failed validation", cause: err, } } } } if wrapper := m.GetFillRate(); wrapper != nil { if wrapper.GetValue() <= 0 { return RateLimitSettingsValidationError{ field: "FillRate", reason: "value must be greater than 0", } } } return nil }
[ "func", "(", "m", "*", "RateLimitSettings", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetMaxTokens", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "inter...
// Validate checks the field values on RateLimitSettings with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RateLimitSettings", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/config_source.pb.validate.go#L242-L274
train
envoyproxy/go-control-plane
envoy/api/v2/core/config_source.pb.validate.go
Validate
func (m *ConfigSource) Validate() error { if m == nil { return nil } { tmp := m.GetInitialFetchTimeout() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "InitialFetchTimeout", reason: "embedded message failed validation", cause: err, } } } } switch m.ConfigSourceSpecifier.(type) { case *ConfigSource_Path: // no validation rules for Path case *ConfigSource_ApiConfigSource: { tmp := m.GetApiConfigSource() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "ApiConfigSource", reason: "embedded message failed validation", cause: err, } } } } case *ConfigSource_Ads: { tmp := m.GetAds() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "Ads", reason: "embedded message failed validation", cause: err, } } } } default: return ConfigSourceValidationError{ field: "ConfigSourceSpecifier", reason: "value is required", } } return nil }
go
func (m *ConfigSource) Validate() error { if m == nil { return nil } { tmp := m.GetInitialFetchTimeout() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "InitialFetchTimeout", reason: "embedded message failed validation", cause: err, } } } } switch m.ConfigSourceSpecifier.(type) { case *ConfigSource_Path: // no validation rules for Path case *ConfigSource_ApiConfigSource: { tmp := m.GetApiConfigSource() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "ApiConfigSource", reason: "embedded message failed validation", cause: err, } } } } case *ConfigSource_Ads: { tmp := m.GetAds() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConfigSourceValidationError{ field: "Ads", reason: "embedded message failed validation", cause: err, } } } } default: return ConfigSourceValidationError{ field: "ConfigSourceSpecifier", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "ConfigSource", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetInitialFetchTimeout", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "...
// Validate checks the field values on ConfigSource with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ConfigSource", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/config_source.pb.validate.go#L335-L403
train
envoyproxy/go-control-plane
envoy/data/core/v2alpha/health_check_event.pb.validate.go
Validate
func (m *HealthCheckEjectUnhealthy) Validate() error { if m == nil { return nil } if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { return HealthCheckEjectUnhealthyValidationError{ field: "FailureType", reason: "value must be one of the defined enum values", } } return nil }
go
func (m *HealthCheckEjectUnhealthy) Validate() error { if m == nil { return nil } if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { return HealthCheckEjectUnhealthyValidationError{ field: "FailureType", reason: "value must be one of the defined enum values", } } return nil }
[ "func", "(", "m", "*", "HealthCheckEjectUnhealthy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "HealthCheckFailureType_name", "[", "int32", "(", "m", ".", "GetFa...
// Validate checks the field values on HealthCheckEjectUnhealthy with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HealthCheckEjectUnhealthy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/core/v2alpha/health_check_event.pb.validate.go#L243-L256
train
envoyproxy/go-control-plane
envoy/data/core/v2alpha/health_check_event.pb.validate.go
Validate
func (m *HealthCheckFailure) Validate() error { if m == nil { return nil } if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { return HealthCheckFailureValidationError{ field: "FailureType", reason: "value must be one of the defined enum values", } } // no validation rules for FirstCheck return nil }
go
func (m *HealthCheckFailure) Validate() error { if m == nil { return nil } if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { return HealthCheckFailureValidationError{ field: "FailureType", reason: "value must be one of the defined enum values", } } // no validation rules for FirstCheck return nil }
[ "func", "(", "m", "*", "HealthCheckFailure", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "HealthCheckFailureType_name", "[", "int32", "(", "m", ".", "GetFailureTy...
// Validate checks the field values on HealthCheckFailure with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HealthCheckFailure", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/core/v2alpha/health_check_event.pb.validate.go#L386-L401
train
envoyproxy/go-control-plane
envoy/service/trace/v2/trace_service.pb.validate.go
Validate
func (m *StreamTracesMessage) 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 StreamTracesMessageValidationError{ field: "Identifier", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetSpans() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTracesMessageValidationError{ field: fmt.Sprintf("Spans[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *StreamTracesMessage) 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 StreamTracesMessageValidationError{ field: "Identifier", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetSpans() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return StreamTracesMessageValidationError{ field: fmt.Sprintf("Spans[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "StreamTracesMessage", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetIdentifier", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "in...
// Validate checks the field values on StreamTracesMessage with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "StreamTracesMessage", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/trace/v2/trace_service.pb.validate.go#L106-L147
train
envoyproxy/go-control-plane
envoy/service/trace/v2/trace_service.pb.validate.go
Validate
func (m *StreamTracesMessage_Identifier) Validate() error { if m == nil { return nil } if m.GetNode() == nil { return StreamTracesMessage_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 StreamTracesMessage_IdentifierValidationError{ field: "Node", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *StreamTracesMessage_Identifier) Validate() error { if m == nil { return nil } if m.GetNode() == nil { return StreamTracesMessage_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 StreamTracesMessage_IdentifierValidationError{ field: "Node", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "StreamTracesMessage_Identifier", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetNode", "(", ")", "==", "nil", "{", "return", "StreamTracesMessage_Ident...
// Validate checks the field values on StreamTracesMessage_Identifier with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "StreamTracesMessage_Identifier", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned"...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/trace/v2/trace_service.pb.validate.go#L208-L236
train
envoyproxy/go-control-plane
envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.validate.go
Validate
func (m *ZooKeeperProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return ZooKeeperProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } // no validation rules for AccessLog { tmp := m.GetMaxPacketBytes() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ZooKeeperProxyValidationError{ field: "MaxPacketBytes", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *ZooKeeperProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return ZooKeeperProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } // no validation rules for AccessLog { tmp := m.GetMaxPacketBytes() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ZooKeeperProxyValidationError{ field: "MaxPacketBytes", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "ZooKeeperProxy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetStatPrefix", "(", ")", ")", "<", "1", "{", "return", "ZooKeeperProxyV...
// Validate checks the field values on ZooKeeperProxy with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ZooKeeperProxy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.pb.validate.go#L39-L69
train
envoyproxy/go-control-plane
envoy/data/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *TCPAccessLogEntry) Validate() error { if m == nil { return nil } { tmp := m.GetCommonProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TCPAccessLogEntryValidationError{ field: "CommonProperties", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *TCPAccessLogEntry) Validate() error { if m == nil { return nil } { tmp := m.GetCommonProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TCPAccessLogEntryValidationError{ field: "CommonProperties", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "TCPAccessLogEntry", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetCommonProperties", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// Validate checks the field values on TCPAccessLogEntry with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "TCPAccessLogEntry", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/accesslog/v2/accesslog.pb.validate.go#L43-L64
train
envoyproxy/go-control-plane
envoy/data/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *HTTPAccessLogEntry) Validate() error { if m == nil { return nil } { tmp := m.GetCommonProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ field: "CommonProperties", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ProtocolVersion { tmp := m.GetRequest() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ 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 HTTPAccessLogEntryValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *HTTPAccessLogEntry) Validate() error { if m == nil { return nil } { tmp := m.GetCommonProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ field: "CommonProperties", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ProtocolVersion { tmp := m.GetRequest() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPAccessLogEntryValidationError{ 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 HTTPAccessLogEntryValidationError{ field: "Response", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "HTTPAccessLogEntry", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetCommonProperties", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// Validate checks the field values on HTTPAccessLogEntry with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HTTPAccessLogEntry", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/accesslog/v2/accesslog.pb.validate.go#L125-L178
train
envoyproxy/go-control-plane
envoy/data/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *ResponseFlags) Validate() error { if m == nil { return nil } // no validation rules for FailedLocalHealthcheck // no validation rules for NoHealthyUpstream // no validation rules for UpstreamRequestTimeout // no validation rules for LocalReset // no validation rules for UpstreamRemoteReset // no validation rules for UpstreamConnectionFailure // no validation rules for UpstreamConnectionTermination // no validation rules for UpstreamOverflow // no validation rules for NoRouteFound // no validation rules for DelayInjected // no validation rules for FaultInjected // no validation rules for RateLimited { tmp := m.GetUnauthorizedDetails() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseFlagsValidationError{ field: "UnauthorizedDetails", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for RateLimitServiceError // no validation rules for DownstreamConnectionTermination // no validation rules for UpstreamRetryLimitExceeded // no validation rules for StreamIdleTimeout return nil }
go
func (m *ResponseFlags) Validate() error { if m == nil { return nil } // no validation rules for FailedLocalHealthcheck // no validation rules for NoHealthyUpstream // no validation rules for UpstreamRequestTimeout // no validation rules for LocalReset // no validation rules for UpstreamRemoteReset // no validation rules for UpstreamConnectionFailure // no validation rules for UpstreamConnectionTermination // no validation rules for UpstreamOverflow // no validation rules for NoRouteFound // no validation rules for DelayInjected // no validation rules for FaultInjected // no validation rules for RateLimited { tmp := m.GetUnauthorizedDetails() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ResponseFlagsValidationError{ field: "UnauthorizedDetails", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for RateLimitServiceError // no validation rules for DownstreamConnectionTermination // no validation rules for UpstreamRetryLimitExceeded // no validation rules for StreamIdleTimeout return nil }
[ "func", "(", "m", "*", "ResponseFlags", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for FailedLocalHealthcheck", "// no validation rules for NoHealthyUpstream", "// no validation rules...
// Validate checks the field values on ResponseFlags with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ResponseFlags", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/accesslog/v2/accesslog.pb.validate.go#L540-L593
train
envoyproxy/go-control-plane
envoy/data/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *TLSProperties) Validate() error { if m == nil { return nil } // no validation rules for TlsVersion { tmp := m.GetTlsCipherSuite() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "TlsCipherSuite", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for TlsSniHostname { tmp := m.GetLocalCertificateProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "LocalCertificateProperties", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetPeerCertificateProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "PeerCertificateProperties", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *TLSProperties) Validate() error { if m == nil { return nil } // no validation rules for TlsVersion { tmp := m.GetTlsCipherSuite() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "TlsCipherSuite", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for TlsSniHostname { tmp := m.GetLocalCertificateProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "LocalCertificateProperties", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetPeerCertificateProperties() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSPropertiesValidationError{ field: "PeerCertificateProperties", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "TLSProperties", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for TlsVersion", "{", "tmp", ":=", "m", ".", "GetTlsCipherSuite", "(", ")", "\n\n", ...
// Validate checks the field values on TLSProperties with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "TLSProperties", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/accesslog/v2/accesslog.pb.validate.go#L652-L707
train
envoyproxy/go-control-plane
envoy/data/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *HTTPRequestProperties) Validate() error { if m == nil { return nil } // no validation rules for RequestMethod // no validation rules for Scheme // no validation rules for Authority { tmp := m.GetPort() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPRequestPropertiesValidationError{ field: "Port", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Path // no validation rules for UserAgent // no validation rules for Referer // no validation rules for ForwardedFor // no validation rules for RequestId // no validation rules for OriginalPath // no validation rules for RequestHeadersBytes // no validation rules for RequestBodyBytes // no validation rules for RequestHeaders return nil }
go
func (m *HTTPRequestProperties) Validate() error { if m == nil { return nil } // no validation rules for RequestMethod // no validation rules for Scheme // no validation rules for Authority { tmp := m.GetPort() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPRequestPropertiesValidationError{ field: "Port", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for Path // no validation rules for UserAgent // no validation rules for Referer // no validation rules for ForwardedFor // no validation rules for RequestId // no validation rules for OriginalPath // no validation rules for RequestHeadersBytes // no validation rules for RequestBodyBytes // no validation rules for RequestHeaders return nil }
[ "func", "(", "m", "*", "HTTPRequestProperties", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for RequestMethod", "// no validation rules for Scheme", "// no validation rules for Authori...
// Validate checks the field values on HTTPRequestProperties with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HTTPRequestProperties", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/accesslog/v2/accesslog.pb.validate.go#L766-L811
train
envoyproxy/go-control-plane
envoy/data/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *HTTPResponseProperties) Validate() error { if m == nil { return nil } { tmp := m.GetResponseCode() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPResponsePropertiesValidationError{ field: "ResponseCode", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ResponseHeadersBytes // no validation rules for ResponseBodyBytes // no validation rules for ResponseHeaders // no validation rules for ResponseTrailers // no validation rules for ResponseCodeDetails return nil }
go
func (m *HTTPResponseProperties) Validate() error { if m == nil { return nil } { tmp := m.GetResponseCode() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HTTPResponsePropertiesValidationError{ field: "ResponseCode", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for ResponseHeadersBytes // no validation rules for ResponseBodyBytes // no validation rules for ResponseHeaders // no validation rules for ResponseTrailers // no validation rules for ResponseCodeDetails return nil }
[ "func", "(", "m", "*", "HTTPResponseProperties", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetResponseCode", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", ...
// Validate checks the field values on HTTPResponseProperties with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HTTPResponseProperties", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/accesslog/v2/accesslog.pb.validate.go#L872-L903
train
envoyproxy/go-control-plane
envoy/data/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *TLSProperties_CertificateProperties) Validate() error { if m == nil { return nil } for idx, item := range m.GetSubjectAltName() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSProperties_CertificatePropertiesValidationError{ field: fmt.Sprintf("SubjectAltName[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for Subject return nil }
go
func (m *TLSProperties_CertificateProperties) Validate() error { if m == nil { return nil } for idx, item := range m.GetSubjectAltName() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TLSProperties_CertificatePropertiesValidationError{ field: fmt.Sprintf("SubjectAltName[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for Subject return nil }
[ "func", "(", "m", "*", "TLSProperties_CertificateProperties", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetSubjectAltName", "(", ")", "...
// Validate checks the field values on TLSProperties_CertificateProperties with // the rules defined in the proto definition for this message. If any rules // are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "TLSProperties_CertificateProperties", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "retu...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/accesslog/v2/accesslog.pb.validate.go#L1033-L1061
train
envoyproxy/go-control-plane
envoy/data/accesslog/v2/accesslog.pb.validate.go
Validate
func (m *TLSProperties_CertificateProperties_SubjectAltName) Validate() error { if m == nil { return nil } switch m.San.(type) { case *TLSProperties_CertificateProperties_SubjectAltName_Uri: // no validation rules for Uri case *TLSProperties_CertificateProperties_SubjectAltName_Dns: // no validation rules for Dns } return nil }
go
func (m *TLSProperties_CertificateProperties_SubjectAltName) Validate() error { if m == nil { return nil } switch m.San.(type) { case *TLSProperties_CertificateProperties_SubjectAltName_Uri: // no validation rules for Uri case *TLSProperties_CertificateProperties_SubjectAltName_Dns: // no validation rules for Dns } return nil }
[ "func", "(", "m", "*", "TLSProperties_CertificateProperties_SubjectAltName", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "San", ".", "(", "type", ")", "{", "case", "*", "...
// Validate checks the field values on // TLSProperties_CertificateProperties_SubjectAltName with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "TLSProperties_CertificateProperties_SubjectAltName", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/accesslog/v2/accesslog.pb.validate.go#L1124-L1140
train
envoyproxy/go-control-plane
envoy/type/matcher/value.pb.validate.go
Validate
func (m *ValueMatcher) Validate() error { if m == nil { return nil } switch m.MatchPattern.(type) { case *ValueMatcher_NullMatch_: { tmp := m.GetNullMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "NullMatch", reason: "embedded message failed validation", cause: err, } } } } case *ValueMatcher_DoubleMatch: { tmp := m.GetDoubleMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "DoubleMatch", reason: "embedded message failed validation", cause: err, } } } } case *ValueMatcher_StringMatch: { tmp := m.GetStringMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "StringMatch", reason: "embedded message failed validation", cause: err, } } } } case *ValueMatcher_BoolMatch: // no validation rules for BoolMatch case *ValueMatcher_PresentMatch: // no validation rules for PresentMatch case *ValueMatcher_ListMatch: { tmp := m.GetListMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "ListMatch", reason: "embedded message failed validation", cause: err, } } } } default: return ValueMatcherValidationError{ field: "MatchPattern", reason: "value is required", } } return nil }
go
func (m *ValueMatcher) Validate() error { if m == nil { return nil } switch m.MatchPattern.(type) { case *ValueMatcher_NullMatch_: { tmp := m.GetNullMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "NullMatch", reason: "embedded message failed validation", cause: err, } } } } case *ValueMatcher_DoubleMatch: { tmp := m.GetDoubleMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "DoubleMatch", reason: "embedded message failed validation", cause: err, } } } } case *ValueMatcher_StringMatch: { tmp := m.GetStringMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "StringMatch", reason: "embedded message failed validation", cause: err, } } } } case *ValueMatcher_BoolMatch: // no validation rules for BoolMatch case *ValueMatcher_PresentMatch: // no validation rules for PresentMatch case *ValueMatcher_ListMatch: { tmp := m.GetListMatch() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ValueMatcherValidationError{ field: "ListMatch", reason: "embedded message failed validation", cause: err, } } } } default: return ValueMatcherValidationError{ field: "MatchPattern", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "ValueMatcher", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "MatchPattern", ".", "(", "type", ")", "{", "case", "*", "ValueMatcher_NullMatch_", "...
// Validate checks the field values on ValueMatcher with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ValueMatcher", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/type/matcher/value.pb.validate.go#L39-L129
train
envoyproxy/go-control-plane
envoy/type/matcher/value.pb.validate.go
Validate
func (m *ListMatcher) Validate() error { if m == nil { return nil } switch m.MatchPattern.(type) { case *ListMatcher_OneOf: { tmp := m.GetOneOf() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListMatcherValidationError{ field: "OneOf", reason: "embedded message failed validation", cause: err, } } } } default: return ListMatcherValidationError{ field: "MatchPattern", reason: "value is required", } } return nil }
go
func (m *ListMatcher) Validate() error { if m == nil { return nil } switch m.MatchPattern.(type) { case *ListMatcher_OneOf: { tmp := m.GetOneOf() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListMatcherValidationError{ field: "OneOf", reason: "embedded message failed validation", cause: err, } } } } default: return ListMatcherValidationError{ field: "MatchPattern", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "ListMatcher", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "MatchPattern", ".", "(", "type", ")", "{", "case", "*", "ListMatcher_OneOf", ":", "...
// Validate checks the field values on ListMatcher with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ListMatcher", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/type/matcher/value.pb.validate.go#L188-L221
train
envoyproxy/go-control-plane
envoy/service/discovery/v2/hds.pb.validate.go
Validate
func (m *HealthCheckRequest) Validate() error { if m == nil { return nil } { tmp := m.GetNode() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestValidationError{ field: "Node", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetCapability() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestValidationError{ field: "Capability", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *HealthCheckRequest) Validate() error { if m == nil { return nil } { tmp := m.GetNode() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestValidationError{ field: "Node", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetCapability() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestValidationError{ field: "Capability", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "HealthCheckRequest", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetNode", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface...
// Validate checks the field values on HealthCheckRequest with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HealthCheckRequest", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/discovery/v2/hds.pb.validate.go#L107-L143
train
envoyproxy/go-control-plane
envoy/service/discovery/v2/hds.pb.validate.go
Validate
func (m *EndpointHealth) Validate() error { if m == nil { return nil } { tmp := m.GetEndpoint() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointHealthValidationError{ field: "Endpoint", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for HealthStatus return nil }
go
func (m *EndpointHealth) Validate() error { if m == nil { return nil } { tmp := m.GetEndpoint() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointHealthValidationError{ field: "Endpoint", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for HealthStatus return nil }
[ "func", "(", "m", "*", "EndpointHealth", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetEndpoint", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface...
// Validate checks the field values on EndpointHealth with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "EndpointHealth", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/discovery/v2/hds.pb.validate.go#L204-L227
train
envoyproxy/go-control-plane
envoy/service/discovery/v2/hds.pb.validate.go
Validate
func (m *EndpointHealthResponse) Validate() error { if m == nil { return nil } for idx, item := range m.GetEndpointsHealth() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointHealthResponseValidationError{ field: fmt.Sprintf("EndpointsHealth[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *EndpointHealthResponse) Validate() error { if m == nil { return nil } for idx, item := range m.GetEndpointsHealth() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return EndpointHealthResponseValidationError{ field: fmt.Sprintf("EndpointsHealth[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "EndpointHealthResponse", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetEndpointsHealth", "(", ")", "{", "_", ...
// Validate checks the field values on EndpointHealthResponse with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "EndpointHealthResponse", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/discovery/v2/hds.pb.validate.go#L286-L312
train
envoyproxy/go-control-plane
envoy/service/discovery/v2/hds.pb.validate.go
Validate
func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { if m == nil { return nil } switch m.RequestType.(type) { case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: { tmp := m.GetHealthCheckRequest() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestOrEndpointHealthResponseValidationError{ field: "HealthCheckRequest", reason: "embedded message failed validation", cause: err, } } } } case *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse: { tmp := m.GetEndpointHealthResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestOrEndpointHealthResponseValidationError{ field: "EndpointHealthResponse", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { if m == nil { return nil } switch m.RequestType.(type) { case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: { tmp := m.GetHealthCheckRequest() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestOrEndpointHealthResponseValidationError{ field: "HealthCheckRequest", reason: "embedded message failed validation", cause: err, } } } } case *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse: { tmp := m.GetEndpointHealthResponse() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckRequestOrEndpointHealthResponseValidationError{ field: "EndpointHealthResponse", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "HealthCheckRequestOrEndpointHealthResponse", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "RequestType", ".", "(", "type", ")", "{", "case", "*", "...
// Validate checks the field values on // HealthCheckRequestOrEndpointHealthResponse with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HealthCheckRequestOrEndpointHealthResponse", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/discovery/v2/hds.pb.validate.go#L373-L417
train
envoyproxy/go-control-plane
envoy/service/discovery/v2/hds.pb.validate.go
Validate
func (m *LocalityEndpoints) 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 LocalityEndpointsValidationError{ field: "Locality", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetEndpoints() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityEndpointsValidationError{ field: fmt.Sprintf("Endpoints[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *LocalityEndpoints) 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 LocalityEndpointsValidationError{ field: "Locality", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetEndpoints() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return LocalityEndpointsValidationError{ field: fmt.Sprintf("Endpoints[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "LocalityEndpoints", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetLocality", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interf...
// Validate checks the field values on LocalityEndpoints with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "LocalityEndpoints", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/discovery/v2/hds.pb.validate.go#L479-L520
train
envoyproxy/go-control-plane
envoy/service/discovery/v2/hds.pb.validate.go
Validate
func (m *ClusterHealthCheck) Validate() error { if m == nil { return nil } // no validation rules for ClusterName for idx, item := range m.GetHealthChecks() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterHealthCheckValidationError{ field: fmt.Sprintf("HealthChecks[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetLocalityEndpoints() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterHealthCheckValidationError{ field: fmt.Sprintf("LocalityEndpoints[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *ClusterHealthCheck) Validate() error { if m == nil { return nil } // no validation rules for ClusterName for idx, item := range m.GetHealthChecks() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterHealthCheckValidationError{ field: fmt.Sprintf("HealthChecks[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } for idx, item := range m.GetLocalityEndpoints() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ClusterHealthCheckValidationError{ field: fmt.Sprintf("LocalityEndpoints[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "ClusterHealthCheck", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for ClusterName", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetHealthC...
// Validate checks the field values on ClusterHealthCheck with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "ClusterHealthCheck", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/discovery/v2/hds.pb.validate.go#L581-L629
train
envoyproxy/go-control-plane
envoy/service/discovery/v2/hds.pb.validate.go
Validate
func (m *HealthCheckSpecifier) Validate() error { if m == nil { return nil } for idx, item := range m.GetClusterHealthChecks() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckSpecifierValidationError{ field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckSpecifierValidationError{ field: "Interval", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *HealthCheckSpecifier) Validate() error { if m == nil { return nil } for idx, item := range m.GetClusterHealthChecks() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckSpecifierValidationError{ field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } { tmp := m.GetInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return HealthCheckSpecifierValidationError{ field: "Interval", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "HealthCheckSpecifier", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetClusterHealthChecks", "(", ")", "{", "_",...
// Validate checks the field values on HealthCheckSpecifier with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "HealthCheckSpecifier", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/service/discovery/v2/hds.pb.validate.go#L690-L731
train
envoyproxy/go-control-plane
envoy/config/filter/http/router/v2/router.pb.validate.go
Validate
func (m *Router) Validate() error { if m == nil { return nil } { tmp := m.GetDynamicStats() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouterValidationError{ field: "DynamicStats", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for StartChildSpan for idx, item := range m.GetUpstreamLog() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouterValidationError{ field: fmt.Sprintf("UpstreamLog[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for SuppressEnvoyHeaders return nil }
go
func (m *Router) Validate() error { if m == nil { return nil } { tmp := m.GetDynamicStats() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouterValidationError{ field: "DynamicStats", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for StartChildSpan for idx, item := range m.GetUpstreamLog() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RouterValidationError{ field: fmt.Sprintf("UpstreamLog[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for SuppressEnvoyHeaders return nil }
[ "func", "(", "m", "*", "Router", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetDynamicStats", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface", ...
// Validate checks the field values on Router with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Router", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/http/router/v2/router.pb.validate.go#L38-L83
train
envoyproxy/go-control-plane
envoy/api/v2/core/address.pb.validate.go
Validate
func (m *Pipe) Validate() error { if m == nil { return nil } if len(m.GetPath()) < 1 { return PipeValidationError{ field: "Path", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *Pipe) Validate() error { if m == nil { return nil } if len(m.GetPath()) < 1 { return PipeValidationError{ field: "Path", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "Pipe", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetPath", "(", ")", ")", "<", "1", "{", "return", "PipeValidationError", "{", ...
// Validate checks the field values on Pipe with the rules defined in the proto // definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Pipe", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/address.pb.validate.go#L38-L51
train
envoyproxy/go-control-plane
envoy/api/v2/core/address.pb.validate.go
Validate
func (m *SocketAddress) Validate() error { if m == nil { return nil } if _, ok := SocketAddress_Protocol_name[int32(m.GetProtocol())]; !ok { return SocketAddressValidationError{ field: "Protocol", reason: "value must be one of the defined enum values", } } if len(m.GetAddress()) < 1 { return SocketAddressValidationError{ field: "Address", reason: "value length must be at least 1 bytes", } } // no validation rules for ResolverName // no validation rules for Ipv4Compat switch m.PortSpecifier.(type) { case *SocketAddress_PortValue: if m.GetPortValue() > 65535 { return SocketAddressValidationError{ field: "PortValue", reason: "value must be less than or equal to 65535", } } case *SocketAddress_NamedPort: // no validation rules for NamedPort default: return SocketAddressValidationError{ field: "PortSpecifier", reason: "value is required", } } return nil }
go
func (m *SocketAddress) Validate() error { if m == nil { return nil } if _, ok := SocketAddress_Protocol_name[int32(m.GetProtocol())]; !ok { return SocketAddressValidationError{ field: "Protocol", reason: "value must be one of the defined enum values", } } if len(m.GetAddress()) < 1 { return SocketAddressValidationError{ field: "Address", reason: "value length must be at least 1 bytes", } } // no validation rules for ResolverName // no validation rules for Ipv4Compat switch m.PortSpecifier.(type) { case *SocketAddress_PortValue: if m.GetPortValue() > 65535 { return SocketAddressValidationError{ field: "PortValue", reason: "value must be less than or equal to 65535", } } case *SocketAddress_NamedPort: // no validation rules for NamedPort default: return SocketAddressValidationError{ field: "PortSpecifier", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "SocketAddress", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "_", ",", "ok", ":=", "SocketAddress_Protocol_name", "[", "int32", "(", "m", ".", "GetProtocol", "...
// Validate checks the field values on SocketAddress with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "SocketAddress", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/address.pb.validate.go#L110-L156
train
envoyproxy/go-control-plane
envoy/api/v2/core/address.pb.validate.go
Validate
func (m *TcpKeepalive) Validate() error { if m == nil { return nil } { tmp := m.GetKeepaliveProbes() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveProbes", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetKeepaliveTime() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveTime", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetKeepaliveInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveInterval", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *TcpKeepalive) Validate() error { if m == nil { return nil } { tmp := m.GetKeepaliveProbes() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveProbes", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetKeepaliveTime() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveTime", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetKeepaliveInterval() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return TcpKeepaliveValidationError{ field: "KeepaliveInterval", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "TcpKeepalive", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetKeepaliveProbes", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "inte...
// Validate checks the field values on TcpKeepalive with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "TcpKeepalive", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/address.pb.validate.go#L215-L266
train
envoyproxy/go-control-plane
envoy/api/v2/core/address.pb.validate.go
Validate
func (m *BindConfig) 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 BindConfigValidationError{ field: "SourceAddress", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetFreebind() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: "Freebind", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetSocketOptions() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: fmt.Sprintf("SocketOptions[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *BindConfig) 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 BindConfigValidationError{ field: "SourceAddress", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetFreebind() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: "Freebind", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetSocketOptions() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return BindConfigValidationError{ field: fmt.Sprintf("SocketOptions[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "BindConfig", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetSourceAddress", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interfac...
// Validate checks the field values on BindConfig with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "BindConfig", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/address.pb.validate.go#L324-L380
train
envoyproxy/go-control-plane
envoy/api/v2/core/address.pb.validate.go
Validate
func (m *Address) Validate() error { if m == nil { return nil } switch m.Address.(type) { case *Address_SocketAddress: { tmp := m.GetSocketAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddressValidationError{ field: "SocketAddress", reason: "embedded message failed validation", cause: err, } } } } case *Address_Pipe: { tmp := m.GetPipe() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddressValidationError{ field: "Pipe", reason: "embedded message failed validation", cause: err, } } } } default: return AddressValidationError{ field: "Address", reason: "value is required", } } return nil }
go
func (m *Address) Validate() error { if m == nil { return nil } switch m.Address.(type) { case *Address_SocketAddress: { tmp := m.GetSocketAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddressValidationError{ field: "SocketAddress", reason: "embedded message failed validation", cause: err, } } } } case *Address_Pipe: { tmp := m.GetPipe() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return AddressValidationError{ field: "Pipe", reason: "embedded message failed validation", cause: err, } } } } default: return AddressValidationError{ field: "Address", reason: "value is required", } } return nil }
[ "func", "(", "m", "*", "Address", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "switch", "m", ".", "Address", ".", "(", "type", ")", "{", "case", "*", "Address_SocketAddress", ":", "{", ...
// Validate checks the field values on Address with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Address", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/address.pb.validate.go#L438-L488
train
envoyproxy/go-control-plane
envoy/api/v2/core/address.pb.validate.go
Validate
func (m *CidrRange) Validate() error { if m == nil { return nil } if len(m.GetAddressPrefix()) < 1 { return CidrRangeValidationError{ field: "AddressPrefix", reason: "value length must be at least 1 bytes", } } if wrapper := m.GetPrefixLen(); wrapper != nil { if wrapper.GetValue() > 128 { return CidrRangeValidationError{ field: "PrefixLen", reason: "value must be less than or equal to 128", } } } return nil }
go
func (m *CidrRange) Validate() error { if m == nil { return nil } if len(m.GetAddressPrefix()) < 1 { return CidrRangeValidationError{ field: "AddressPrefix", reason: "value length must be at least 1 bytes", } } if wrapper := m.GetPrefixLen(); wrapper != nil { if wrapper.GetValue() > 128 { return CidrRangeValidationError{ field: "PrefixLen", reason: "value must be less than or equal to 128", } } } return nil }
[ "func", "(", "m", "*", "CidrRange", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetAddressPrefix", "(", ")", ")", "<", "1", "{", "return", "CidrRangeValidati...
// Validate checks the field values on CidrRange with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "CidrRange", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/core/address.pb.validate.go#L546-L570
train
envoyproxy/go-control-plane
envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go
Validate
func (m *RedisProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return RedisProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } // no validation rules for Cluster if m.GetSettings() == nil { return RedisProxyValidationError{ field: "Settings", reason: "value is required", } } { tmp := m.GetSettings() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "Settings", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for LatencyInMicros { tmp := m.GetPrefixRoutes() if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "PrefixRoutes", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *RedisProxy) Validate() error { if m == nil { return nil } if len(m.GetStatPrefix()) < 1 { return RedisProxyValidationError{ field: "StatPrefix", reason: "value length must be at least 1 bytes", } } // no validation rules for Cluster if m.GetSettings() == nil { return RedisProxyValidationError{ field: "Settings", reason: "value is required", } } { tmp := m.GetSettings() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "Settings", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for LatencyInMicros { tmp := m.GetPrefixRoutes() if v, ok := interface{}(&tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxyValidationError{ field: "PrefixRoutes", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "RedisProxy", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetStatPrefix", "(", ")", ")", "<", "1", "{", "return", "RedisProxyValidatio...
// Validate checks the field values on RedisProxy with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RedisProxy", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go#L38-L92
train
envoyproxy/go-control-plane
envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go
Validate
func (m *RedisProxy_ConnPoolSettings) Validate() error { if m == nil { return nil } if m.GetOpTimeout() == nil { return RedisProxy_ConnPoolSettingsValidationError{ field: "OpTimeout", reason: "value is required", } } // no validation rules for EnableHashtagging // no validation rules for EnableRedirection // no validation rules for MaxBufferSizeBeforeFlush { tmp := m.GetBufferFlushTimeout() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_ConnPoolSettingsValidationError{ field: "BufferFlushTimeout", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *RedisProxy_ConnPoolSettings) Validate() error { if m == nil { return nil } if m.GetOpTimeout() == nil { return RedisProxy_ConnPoolSettingsValidationError{ field: "OpTimeout", reason: "value is required", } } // no validation rules for EnableHashtagging // no validation rules for EnableRedirection // no validation rules for MaxBufferSizeBeforeFlush { tmp := m.GetBufferFlushTimeout() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RedisProxy_ConnPoolSettingsValidationError{ field: "BufferFlushTimeout", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "RedisProxy_ConnPoolSettings", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "m", ".", "GetOpTimeout", "(", ")", "==", "nil", "{", "return", "RedisProxy_ConnPoolSett...
// Validate checks the field values on RedisProxy_ConnPoolSettings with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RedisProxy_ConnPoolSettings", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", ...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go#L151-L185
train
envoyproxy/go-control-plane
envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go
Validate
func (m *RedisProxy_PrefixRoutes) Validate() error { if m == nil { return nil } 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 RedisProxy_PrefixRoutesValidationError{ field: fmt.Sprintf("Routes[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for CaseInsensitive // no validation rules for CatchAllCluster return nil }
go
func (m *RedisProxy_PrefixRoutes) Validate() error { if m == nil { return nil } 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 RedisProxy_PrefixRoutesValidationError{ field: fmt.Sprintf("Routes[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for CaseInsensitive // no validation rules for CatchAllCluster return nil }
[ "func", "(", "m", "*", "RedisProxy_PrefixRoutes", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "for", "idx", ",", "item", ":=", "range", "m", ".", "GetRoutes", "(", ")", "{", "_", ",", ...
// Validate checks the field values on RedisProxy_PrefixRoutes with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RedisProxy_PrefixRoutes", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "."...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go#L247-L277
train
envoyproxy/go-control-plane
envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go
Validate
func (m *RedisProxy_PrefixRoutes_Route) Validate() error { if m == nil { return nil } if len(m.GetPrefix()) < 1 { return RedisProxy_PrefixRoutes_RouteValidationError{ field: "Prefix", reason: "value length must be at least 1 bytes", } } // no validation rules for RemovePrefix if len(m.GetCluster()) < 1 { return RedisProxy_PrefixRoutes_RouteValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *RedisProxy_PrefixRoutes_Route) Validate() error { if m == nil { return nil } if len(m.GetPrefix()) < 1 { return RedisProxy_PrefixRoutes_RouteValidationError{ field: "Prefix", reason: "value length must be at least 1 bytes", } } // no validation rules for RemovePrefix if len(m.GetCluster()) < 1 { return RedisProxy_PrefixRoutes_RouteValidationError{ field: "Cluster", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "RedisProxy_PrefixRoutes_Route", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetPrefix", "(", ")", ")", "<", "1", "{", "return", "Redi...
// Validate checks the field values on RedisProxy_PrefixRoutes_Route with the // rules defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RedisProxy_PrefixRoutes_Route", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned",...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.validate.go#L338-L360
train
envoyproxy/go-control-plane
envoy/api/v2/ratelimit/ratelimit.pb.validate.go
Validate
func (m *RateLimitDescriptor) Validate() error { if m == nil { return nil } if len(m.GetEntries()) < 1 { return RateLimitDescriptorValidationError{ field: "Entries", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetEntries() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitDescriptorValidationError{ field: fmt.Sprintf("Entries[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *RateLimitDescriptor) Validate() error { if m == nil { return nil } if len(m.GetEntries()) < 1 { return RateLimitDescriptorValidationError{ field: "Entries", reason: "value must contain at least 1 item(s)", } } for idx, item := range m.GetEntries() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return RateLimitDescriptorValidationError{ field: fmt.Sprintf("Entries[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "RateLimitDescriptor", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetEntries", "(", ")", ")", "<", "1", "{", "return", "RateLimitDesc...
// Validate checks the field values on RateLimitDescriptor with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RateLimitDescriptor", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/ratelimit/ratelimit.pb.validate.go#L39-L72
train
envoyproxy/go-control-plane
envoy/api/v2/ratelimit/ratelimit.pb.validate.go
Validate
func (m *RateLimitDescriptor_Entry) Validate() error { if m == nil { return nil } if len(m.GetKey()) < 1 { return RateLimitDescriptor_EntryValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } } if len(m.GetValue()) < 1 { return RateLimitDescriptor_EntryValidationError{ field: "Value", reason: "value length must be at least 1 bytes", } } return nil }
go
func (m *RateLimitDescriptor_Entry) Validate() error { if m == nil { return nil } if len(m.GetKey()) < 1 { return RateLimitDescriptor_EntryValidationError{ field: "Key", reason: "value length must be at least 1 bytes", } } if len(m.GetValue()) < 1 { return RateLimitDescriptor_EntryValidationError{ field: "Value", reason: "value length must be at least 1 bytes", } } return nil }
[ "func", "(", "m", "*", "RateLimitDescriptor_Entry", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "if", "len", "(", "m", ".", "GetKey", "(", ")", ")", "<", "1", "{", "return", "RateLimitDe...
// Validate checks the field values on RateLimitDescriptor_Entry with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "RateLimitDescriptor_Entry", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "...
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/api/v2/ratelimit/ratelimit.pb.validate.go#L133-L153
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/transport.pb.validate.go
Validate
func (m *Connection) Validate() error { if m == nil { return nil } { tmp := m.GetLocalAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConnectionValidationError{ field: "LocalAddress", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRemoteAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConnectionValidationError{ field: "RemoteAddress", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *Connection) Validate() error { if m == nil { return nil } { tmp := m.GetLocalAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConnectionValidationError{ field: "LocalAddress", reason: "embedded message failed validation", cause: err, } } } } { tmp := m.GetRemoteAddress() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ConnectionValidationError{ field: "RemoteAddress", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "Connection", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetLocalAddress", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface...
// Validate checks the field values on Connection with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "Connection", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/transport.pb.validate.go#L38-L74
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/transport.pb.validate.go
Validate
func (m *SocketEvent) Validate() error { if m == nil { return nil } { tmp := m.GetTimestamp() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Timestamp", reason: "embedded message failed validation", cause: err, } } } } switch m.EventSelector.(type) { case *SocketEvent_Read_: { tmp := m.GetRead() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Read", reason: "embedded message failed validation", cause: err, } } } } case *SocketEvent_Write_: { tmp := m.GetWrite() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Write", reason: "embedded message failed validation", cause: err, } } } } case *SocketEvent_Closed_: { tmp := m.GetClosed() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Closed", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *SocketEvent) Validate() error { if m == nil { return nil } { tmp := m.GetTimestamp() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Timestamp", reason: "embedded message failed validation", cause: err, } } } } switch m.EventSelector.(type) { case *SocketEvent_Read_: { tmp := m.GetRead() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Read", reason: "embedded message failed validation", cause: err, } } } } case *SocketEvent_Write_: { tmp := m.GetWrite() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Write", reason: "embedded message failed validation", cause: err, } } } } case *SocketEvent_Closed_: { tmp := m.GetClosed() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEventValidationError{ field: "Closed", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "SocketEvent", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetTimestamp", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface",...
// Validate checks the field values on SocketEvent with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned.
[ "Validate", "checks", "the", "field", "values", "on", "SocketEvent", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/transport.pb.validate.go#L133-L209
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/transport.pb.validate.go
Validate
func (m *SocketBufferedTrace) Validate() error { if m == nil { return nil } // no validation rules for TraceId { tmp := m.GetConnection() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketBufferedTraceValidationError{ field: "Connection", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetEvents() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketBufferedTraceValidationError{ field: fmt.Sprintf("Events[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for ReadTruncated // no validation rules for WriteTruncated return nil }
go
func (m *SocketBufferedTrace) Validate() error { if m == nil { return nil } // no validation rules for TraceId { tmp := m.GetConnection() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketBufferedTraceValidationError{ field: "Connection", reason: "embedded message failed validation", cause: err, } } } } for idx, item := range m.GetEvents() { _, _ = idx, item { tmp := item if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketBufferedTraceValidationError{ field: fmt.Sprintf("Events[%v]", idx), reason: "embedded message failed validation", cause: err, } } } } } // no validation rules for ReadTruncated // no validation rules for WriteTruncated return nil }
[ "func", "(", "m", "*", "SocketBufferedTrace", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "// no validation rules for TraceId", "{", "tmp", ":=", "m", ".", "GetConnection", "(", ")", "\n\n", "...
// Validate checks the field values on SocketBufferedTrace with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "SocketBufferedTrace", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/transport.pb.validate.go#L268-L315
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/transport.pb.validate.go
Validate
func (m *SocketStreamedTraceSegment) Validate() error { if m == nil { return nil } // no validation rules for TraceId switch m.MessagePiece.(type) { case *SocketStreamedTraceSegment_Connection: { tmp := m.GetConnection() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketStreamedTraceSegmentValidationError{ field: "Connection", reason: "embedded message failed validation", cause: err, } } } } case *SocketStreamedTraceSegment_Event: { tmp := m.GetEvent() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketStreamedTraceSegmentValidationError{ field: "Event", reason: "embedded message failed validation", cause: err, } } } } } return nil }
go
func (m *SocketStreamedTraceSegment) Validate() error { if m == nil { return nil } // no validation rules for TraceId switch m.MessagePiece.(type) { case *SocketStreamedTraceSegment_Connection: { tmp := m.GetConnection() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketStreamedTraceSegmentValidationError{ field: "Connection", reason: "embedded message failed validation", cause: err, } } } } case *SocketStreamedTraceSegment_Event: { tmp := m.GetEvent() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketStreamedTraceSegmentValidationError{ field: "Event", reason: "embedded message failed validation", cause: err, } } } } } return nil }
[ "func", "(", "m", "*", "SocketStreamedTraceSegment", ")", "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 SocketStreamedTraceSegment 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", "SocketStreamedTraceSegment", "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/transport.pb.validate.go#L376-L422
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/transport.pb.validate.go
Validate
func (m *SocketEvent_Read) Validate() error { if m == nil { return nil } { tmp := m.GetData() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEvent_ReadValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, } } } } return nil }
go
func (m *SocketEvent_Read) Validate() error { if m == nil { return nil } { tmp := m.GetData() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEvent_ReadValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, } } } } return nil }
[ "func", "(", "m", "*", "SocketEvent_Read", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetData", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface",...
// Validate checks the field values on SocketEvent_Read with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "SocketEvent_Read", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/transport.pb.validate.go#L483-L504
train
envoyproxy/go-control-plane
envoy/data/tap/v2alpha/transport.pb.validate.go
Validate
func (m *SocketEvent_Write) Validate() error { if m == nil { return nil } { tmp := m.GetData() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEvent_WriteValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for EndStream return nil }
go
func (m *SocketEvent_Write) Validate() error { if m == nil { return nil } { tmp := m.GetData() if v, ok := interface{}(tmp).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return SocketEvent_WriteValidationError{ field: "Data", reason: "embedded message failed validation", cause: err, } } } } // no validation rules for EndStream return nil }
[ "func", "(", "m", "*", "SocketEvent_Write", ")", "Validate", "(", ")", "error", "{", "if", "m", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "{", "tmp", ":=", "m", ".", "GetData", "(", ")", "\n\n", "if", "v", ",", "ok", ":=", "interface"...
// Validate checks the field values on SocketEvent_Write with the rules defined // in the proto definition for this message. If any rules are violated, an // error is returned.
[ "Validate", "checks", "the", "field", "values", "on", "SocketEvent_Write", "with", "the", "rules", "defined", "in", "the", "proto", "definition", "for", "this", "message", ".", "If", "any", "rules", "are", "violated", "an", "error", "is", "returned", "." ]
9ffbaf293221f9fef735838632a9109d00aa2f4c
https://github.com/envoyproxy/go-control-plane/blob/9ffbaf293221f9fef735838632a9109d00aa2f4c/envoy/data/tap/v2alpha/transport.pb.validate.go#L563-L586
train