-
Notifications
You must be signed in to change notification settings - Fork 96
/
respgrpctest.go
131 lines (115 loc) · 3.98 KB
/
respgrpctest.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
package view
import (
"time"
"github.com/douyu/juno/pkg/model/db"
)
type (
RespListGRPCProto []ListGrpcProtoItem
ListGrpcProtoItem struct {
ID uint `json:"id"`
AppName string `json:"app_name"`
FileName string `json:"file_name"`
PackageName string `json:"package_name"`
}
RespDetailGrpcMethod struct {
ID uint `json:"id"`
AppName string `json:"app_name"`
Proto struct {
ID uint `json:"id"`
FileName string `json:"file_name"`
PackageName string `json:"package_name"`
} `json:"proto"`
Service struct {
ID uint `json:"id"`
Name string `json:"name"`
} `json:"service"`
Name string `json:"name"`
Comment string `json:"comment"`
InputType interface{} `json:"input_type"`
OutputType interface{} `json:"output_type"`
}
RespGrpcAppServiceTreeItem struct {
AppName string `json:"app_name"`
Services []RespGrpcServiceItem `json:"services"`
}
RespGrpcServiceItem struct {
ID uint `json:"id"`
FileName string `json:"proto_name"`
PackageName string `json:"package_name"`
ProtoID uint `json:"proto_id"`
Name string `json:"name"`
}
RespGrpcServiceMethodItem struct {
ID uint `json:"id"`
FileName string `json:"proto_name"`
PackageName string `json:"package_name"`
ProtoID uint `json:"proto_id"`
Name string `json:"name"`
Methods []RespListMethodUseCaseItem `json:"methods"`
}
RespListMethodUseCaseItem struct {
GrpcMethodItem
UseCases []GrpcUseCaseItem `json:"use_cases"`
}
GrpcMethodItem struct {
ID uint `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
}
GrpcUseCaseItem struct {
ID uint `json:"id"`
Name string `json:"name"`
Input string `json:"input"`
Metadata db.ProtoMetadata `json:"metadata"`
}
GrpcUseCaseDetail struct {
ID uint `json:"id"`
MethodID uint `json:"method_id"`
Uid uint `json:"uid"`
Name string `json:"name"`
Input string `json:"input"`
Metadata db.ProtoMetadata `json:"metadata"`
AppName string `json:"app_name"`
ServiceName string `json:"service_name"`
MethodName string `json:"method_name"`
Script string `json:"script"`
}
GrpcResponse struct {
Error string `json:"error"`
Status string `json:"status"`
TimeCost int64 `json:"time_cost"`
Output string `json:"output"`
Logs db.MapStringString `json:"logs"`
TestPassed bool `json:"test_passed"`
}
GrpcHistoryListItem struct {
ID uint `json:"id"`
MethodID uint `json:"method_id"`
MethodName string `json:"method_name"`
Status string `json:"status"`
Error string `json:"error"`
TimeCost int64 `json:"time_cost"`
TestPassed bool `json:"test_passed"`
CreatedAt time.Time `json:"created_at"`
}
GrpcHistoryItem struct {
ID uint `json:"id"`
MethodID uint `json:"method_id"`
AppName string `json:"app_name"`
ServiceName string `json:"service_name"`
MethodName string `json:"method_name"`
Input string `json:"input"`
Metadata db.ProtoMetadata `json:"metadata"`
Output string `json:"output"`
Status string `json:"status"`
Error string `json:"error"`
TimeCost int64 `json:"time_cost"`
Addr string `json:"addr"`
TestPassed bool `json:"test_passed"`
CreatedAt time.Time `json:"created_at"`
}
RespGrpcHistoryList struct {
Pagination Pagination `json:"pagination"`
List []GrpcHistoryListItem `json:"list"`
}
)