/
define.go
112 lines (96 loc) · 2.75 KB
/
define.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
package module
/**
* @PROJECT_NAME wechat
* @author Moqi
* @date 2021-05-20 14:02
* @Email:str@li.cm
**/
type mapInterface map[string]interface{}
type User struct {
Session string `json:"session,omitempty"`
Openid string `json:"openid,omitempty"`
Appid string `json:"appid,omitempty"`
Unionid string `json:"unionid,omitempty"`
Status bool `json:"status,omitempty"`
}
type Session struct {
Openid string `json:"openid"`
SessionKey string `json:"session_key"`
Unionid string `json:"unionid"`
Errcode int `json:"errcode"`
ErrMsg string `json:"errmsg"`
}
type Response struct {
Errcode int `json:"errcode"`
ErrMsg string `json:"errmsg"`
}
type Template struct {
Touser string `json:"touser,omitempty"`
TemplateId string `json:"template_id,omitempty"`
Page string `json:"page,omitempty"`
Data interface{} `json:"data,omitempty"`
}
type Subscribe struct {
Touser string `json:"touser,omitempty"`
TemplateId string `json:"template_id,omitempty"`
Page string `json:"page,omitempty"`
Data interface{} `json:"data,omitempty"`
}
type CheckMedia struct {
MediaUrl string `json:"media_url"`
MediaType int `json:"media_type"`
}
// line_color Object {"r":0,"g":0,"b":0}
type Acode struct {
Scene string `json:"scene,omitempty"`
Page string `json:"page,omitempty"`
Width int `json:"width,omitempty"`
AutoColor bool `json:"auto_color,omitempty"`
LineColor interface{} `json:"line_color,omitempty"`
IsHyaline bool `json:"is_hyaline,omitempty"`
}
type Text struct {
Content string `json:"content"`
}
type SubscribeAdd struct {
Tid string `json:"tid,omitempty"`
KidList []int `json:"kidList,omitempty"`
SceneDesc string `json:"sceneDesc,omitempty"`
}
type TextResponse struct {
Errcode int `json:"errcode"`
ErrMsg string `json:"errmsg"`
}
type SendText struct {
Touser string `json:"touser"`
Msgtype string `json:"msgtype"`
Text struct {
Content string `json:"content"`
} `json:"text"`
}
type SendImage struct {
Touser string `json:"touser"`
Msgtype string `json:"msgtype"`
Image struct {
MediaId string `json:"media_id"`
} `json:"image"`
}
type SendLink struct {
Touser string `json:"touser"`
Msgtype string `json:"msgtype"`
Link struct {
Title string `json:"title"`
Description string `json:"description"`
Url string `json:"url"`
ThumbUrl string `json:"thumb_url"`
} `json:"link"`
}
type SendMini struct {
Touser string `json:"touser"`
Msgtype string `json:"msgtype"`
Miniprogrampage struct {
Title string `json:"title"`
Pagepath string `json:"pagepath"`
ThumbMediaId string `json:"thumb_media_id"`
} `json:"miniprogrampage"`
}