-
Notifications
You must be signed in to change notification settings - Fork 1
/
zz_generated.runtimedoc.go
83 lines (76 loc) · 1.5 KB
/
zz_generated.runtimedoc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
Package statuserror GENERATED BY gengo:runtimedoc
DON'T EDIT THIS FILE
*/
package statuserror
// nolint:deadcode,unused
func runtimeDoc(v any, names ...string) ([]string, bool) {
if c, ok := v.(interface {
RuntimeDoc(names ...string) ([]string, bool)
}); ok {
return c.RuntimeDoc(names...)
}
return nil, false
}
func (v ErrorField) RuntimeDoc(names ...string) ([]string, bool) {
if len(names) > 0 {
switch names[0] {
case "Field":
return []string{
"field path",
"prop.slice[2].a",
}, true
case "Msg":
return []string{
"msg",
}, true
case "In":
return []string{
"location",
"eq. body, query, header, path, formData",
}, true
}
return nil, false
}
return []string{}, true
}
func (ErrorFields) RuntimeDoc(names ...string) ([]string, bool) {
return []string{}, true
}
func (v StatusErr) RuntimeDoc(names ...string) ([]string, bool) {
if len(names) > 0 {
switch names[0] {
case "Code":
return []string{
"http code",
}, true
case "Key":
return []string{
"key of err",
}, true
case "Msg":
return []string{
"msg of err",
}, true
case "Desc":
return []string{
"desc of err",
}, true
case "CanBeTalkError":
return []string{
"can be task error",
"for client to should error msg to end user",
}, true
case "Sources":
return []string{
"error tracing",
}, true
case "ErrorFields":
return []string{
"error in where fields",
}, true
}
return nil, false
}
return []string{}, true
}