-
Notifications
You must be signed in to change notification settings - Fork 156
/
wx.go
71 lines (55 loc) · 1.8 KB
/
wx.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
package response
type ResponseBase struct {
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
}
type ResponseWork struct {
ResponseBase
ErrCode int `json:"errcode,omitempty"`
ErrMSG string `json:"errmsg,omitempty"`
}
type ResponsePayment struct {
ResponseBase
ReturnCode string `xml:"return_code,omitempty" json:"return_code"`
ReturnMSG string `xml:"return_msg,omitempty" json:"return_msg,omitempty"`
ResultCode string `xml:"result_code,omitempty" json:"result_code"` // 是 String(16) SUCCESS/FAIL
ErrCode string `xml:"err_code,omitempty" json:"err_code,omitempty"` // 否 String(32) SYSTEMERROR--系统错误
ErrMSG string `xml:"errmsg,omitempty" json:"errmsg,omitempty"`
ErrCodeDes string `xml:"err_code_des,omitempty" json:"err_code_des,omitempty"`
}
type ResponseMiniProgram struct {
ResponseBase
Msg string `json:"msg,omitempty"` // 小程序直播的部分接口会把错误提示抛在msg字段
ErrCode int `json:"errcode,omitempty"`
ErrMSG string `json:"errmsg,omitempty"`
ResultCode string `json:"resultcode,omitempty"`
ResultMSG string `json:"resultmsg,omitempty"`
}
type ResponseOfficialAccount struct {
ResponseBase
ErrCode int `json:"errcode,omitempty"`
ErrMSG string `json:"errmsg,omitempty"`
ResultCode string `json:"resultcode,omitempty"`
ResultMSG string `json:"resultmsg,omitempty"`
}
type ResponseOpenPlatform struct {
ResponseBase
ErrCode int `json:"errcode,omitempty"`
ErrMSG string `json:"errmsg,omitempty"`
}
const (
TYPE_RAW = "raw"
TYPE_MAP = "map"
TYPE_ARRAY = "array"
)
//
//func (res *ResponseWork) GetBody() *http.ResponseWriter {
// return nil
//}
//func (res *ResponseWork) GetHeaders() *http.ResponseWriter {
// return nil
//}
//
//func (res *ResponseWork) GetStatusCode() int {
// return 200
//}