-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathspec.go
50 lines (42 loc) · 1.15 KB
/
spec.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
package spec
type Spec struct {
Requests []*RequestSpec `json:"requests"`
Notifications []*NotificationSpec `json:"notifications"`
StructTypes []*StructTypeSpec `json:"structTypes"`
EnumTypes []*EnumTypeSpec `json:"enumTypes"`
}
type RequestSpec struct {
Method string `json:"method"`
Doc string `json:"doc"`
Caller string `json:"caller"`
Params *StructSpec `json:"params"`
Result *StructSpec `json:"result"`
}
type StructTypeSpec struct {
Name string `json:"name"`
Doc string `json:"doc"`
Fields []*FieldSpec `json:"fields"`
}
type EnumTypeSpec struct {
Name string `json:"name"`
Doc string `json:"doc"`
Values []*EnumValueSpec `json:"values"`
}
type EnumValueSpec struct {
Name string `json:"name"`
Doc string `json:"doc"`
Value string `json:"value"`
}
type StructSpec struct {
Fields []*FieldSpec `json:"fields"`
}
type FieldSpec struct {
Name string `json:"name"`
Doc string `json:"doc"`
Type string `json:"type"`
}
type NotificationSpec struct {
Method string `json:"method"`
Doc string `json:"doc"`
Params *StructSpec `json:"params"`
}