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