...
1
2
3
4 package envoy_service_endpoint_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 "github.com/golang/protobuf/ptypes"
19 )
20
21
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 _ = ptypes.DynamicAny{}
34 )
35
36
37
38 func (m *EdsDummy) Validate() error {
39 if m == nil {
40 return nil
41 }
42
43 return nil
44 }
45
46
47
48 type EdsDummyValidationError struct {
49 field string
50 reason string
51 cause error
52 key bool
53 }
54
55
56 func (e EdsDummyValidationError) Field() string { return e.field }
57
58
59 func (e EdsDummyValidationError) Reason() string { return e.reason }
60
61
62 func (e EdsDummyValidationError) Cause() error { return e.cause }
63
64
65 func (e EdsDummyValidationError) Key() bool { return e.key }
66
67
68 func (e EdsDummyValidationError) ErrorName() string { return "EdsDummyValidationError" }
69
70
71 func (e EdsDummyValidationError) Error() string {
72 cause := ""
73 if e.cause != nil {
74 cause = fmt.Sprintf(" | caused by: %v", e.cause)
75 }
76
77 key := ""
78 if e.key {
79 key = "key for "
80 }
81
82 return fmt.Sprintf(
83 "invalid %sEdsDummy.%s: %s%s",
84 key,
85 e.field,
86 e.reason,
87 cause)
88 }
89
90 var _ error = EdsDummyValidationError{}
91
92 var _ interface {
93 Field() string
94 Reason() string
95 Key() bool
96 Cause() error
97 ErrorName() string
98 } = EdsDummyValidationError{}
99
View as plain text