-
Notifications
You must be signed in to change notification settings - Fork 174
/
responseMenuGet.go
58 lines (47 loc) · 1.53 KB
/
responseMenuGet.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
package response
import "github.com/ArtisanCloud/PowerWeChat/v3/src/kernel/response"
type SubButton struct {
Type string `json:"type"`
Name string `json:"name"`
URL string `json:"url,omitempty"`
AppID string `json:"appid,omitempty"`
PagePath string `json:"pagepath,omitempty"`
Key string `json:"key,omitempty"`
}
type Button struct {
Type string `json:"type"`
Name string `json:"name"`
Key string `json:"key"`
SubButtons []*SubButton `json:"sub_button"`
}
type Menu struct {
Buttons []*Button `json:"button"`
MenuID int `json:"menuid"`
}
type MatchRule struct {
GroupID int `json:"group_id"`
Sex int `json:"sex"`
Country string `json:"country"`
Province string `json:"province"`
City string `json:"city"`
ClientPlatformType int `json:"client_platform_type"`
}
type ConditionalMenu struct {
Buttons []*Button `json:"button"`
MatchRule *MatchRule `json:"matchrule"`
MenuID int `json:"menuid"`
}
type ResponseMenuGet struct {
*response.ResponseOfficialAccount
Menus *Menu `json:"menu"`
ConditionalMenus []*ConditionalMenu `json:"conditionalmenu"`
}
// ----------------------------------------------------------------------
type SelfMenuInfo struct {
Buttons []*Button `json:"button"`
}
type ResponseCurrentSelfMenu struct {
*response.ResponseOfficialAccount
IsMenuOpen int `json:"is_menu_open"`
SelfMenuInfo *SelfMenuInfo `json:"selfmenu_info"`
}