-
Notifications
You must be signed in to change notification settings - Fork 9
/
defs.go
44 lines (37 loc) · 978 Bytes
/
defs.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
package defs
// HomePage 替换到home页面模版上的对象name
type HomePage struct {
Name string
}
// UserPage 替换到user页面模版上的对象name
type UserPage struct {
Name string
}
// APIBody api 透传用
type APIBody struct {
URL string `json:"url"`
Method string `json:"method"`
ReqBody string `json:"req_body"`
}
// // Err 错误结构
// type Err struct {
// Error string `json:"error"`
// ErrorCode string `json:"error_code"`
// }
// var (
// // ErrorRequestNotRecognized 没有认证错误
// ErrorRequestNotRecognized = Err{
// Error: "api not recognized, bad request",
// ErrorCode: "001",
// }
// // ErrorRequestBodyParseFailed 请求页面body解析错误
// ErrorRequestBodyParseFailed = Err{
// Error: "request body is not correct",
// ErrorCode: "002",
// }
// // ErrorInternalFaults 内部错误
// ErrorInternalFaults = Err{
// Error: "internal server errror",
// ErrorCode: "003",
// }
// )