github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/extensions/quic/proof_source/v3/proof_source.pb.validate.go (about) 1 // Code generated by protoc-gen-validate. DO NOT EDIT. 2 // source: envoy/extensions/quic/proof_source/v3/proof_source.proto 3 4 package envoy_extensions_quic_proof_source_v3 5 6 import ( 7 "bytes" 8 "errors" 9 "fmt" 10 "net" 11 "net/mail" 12 "net/url" 13 "regexp" 14 "strings" 15 "time" 16 "unicode/utf8" 17 18 "google.golang.org/protobuf/types/known/anypb" 19 ) 20 21 // ensure the imports are used 22 var ( 23 _ = bytes.MinRead 24 _ = errors.New("") 25 _ = fmt.Print 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 29 _ = net.IPv4len 30 _ = time.Duration(0) 31 _ = (*url.URL)(nil) 32 _ = (*mail.Address)(nil) 33 _ = anypb.Any{} 34 ) 35 36 // Validate checks the field values on ProofSourceConfig with the rules defined 37 // in the proto definition for this message. If any rules are violated, an 38 // error is returned. 39 func (m *ProofSourceConfig) Validate() error { 40 if m == nil { 41 return nil 42 } 43 44 return nil 45 } 46 47 // ProofSourceConfigValidationError is the validation error returned by 48 // ProofSourceConfig.Validate if the designated constraints aren't met. 49 type ProofSourceConfigValidationError struct { 50 field string 51 reason string 52 cause error 53 key bool 54 } 55 56 // Field function returns field value. 57 func (e ProofSourceConfigValidationError) Field() string { return e.field } 58 59 // Reason function returns reason value. 60 func (e ProofSourceConfigValidationError) Reason() string { return e.reason } 61 62 // Cause function returns cause value. 63 func (e ProofSourceConfigValidationError) Cause() error { return e.cause } 64 65 // Key function returns key value. 66 func (e ProofSourceConfigValidationError) Key() bool { return e.key } 67 68 // ErrorName returns error name. 69 func (e ProofSourceConfigValidationError) ErrorName() string { 70 return "ProofSourceConfigValidationError" 71 } 72 73 // Error satisfies the builtin error interface 74 func (e ProofSourceConfigValidationError) Error() string { 75 cause := "" 76 if e.cause != nil { 77 cause = fmt.Sprintf(" | caused by: %v", e.cause) 78 } 79 80 key := "" 81 if e.key { 82 key = "key for " 83 } 84 85 return fmt.Sprintf( 86 "invalid %sProofSourceConfig.%s: %s%s", 87 key, 88 e.field, 89 e.reason, 90 cause) 91 } 92 93 var _ error = ProofSourceConfigValidationError{} 94 95 var _ interface { 96 Field() string 97 Reason() string 98 Key() bool 99 Cause() error 100 ErrorName() string 101 } = ProofSourceConfigValidationError{}