-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtypes.go
77 lines (65 loc) · 1.83 KB
/
types.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
package youdu
type MsgType string
const (
MsgTypeText MsgType = "text"
MsgTypeImage MsgType = "image"
MsgTypeFile MsgType = "file"
MsgTypeMpNews MsgType = "mpnews"
MsgTypeLink MsgType = "link"
MsgTypeExLink MsgType = "exlink"
MsgTypeVoice MsgType = "voice"
MsgTypeVideo MsgType = "video"
MsgTypeSysMsg MsgType = "sysMsg"
)
type MessageText struct {
Content string `json:"content"`
}
type MessageMedia struct {
MediaID string `json:"media_id"`
}
type MessageFile struct {
MediaID string `json:"media_id"`
Name string `json:"name"`
Size int64 `json:"size"`
}
type MessageMpNews struct {
Title string `json:"title"`
MediaID string `json:"media_id"`
Content string `json:"content"`
Digest string `json:"digest,omitempty"`
ShowFront int `json:"showFront,omitempty"`
}
type MessageLink struct {
Title string `json:"title"`
URL string `json:"url"`
Action int `json:"action,omitempty"`
}
type MessageExLink struct {
Title string `json:"title"`
URL string `json:"url"`
MediaID string `json:"media_id"`
Digest string `json:"digest,omitempty"`
}
type MessageSysMessageToAll struct {
OnliyOnline bool `json:"onliyOnline"`
}
type MessageSysMessageSysMsgMsg struct {
Text MessageText `json:"text,omitempty"`
Link MessageLink `json:"link,omitempty"`
}
type MessageSysMessageSysMsg struct {
Title string `json:"title"`
PopDuration int `json:"popDuration,omitempty"`
Msg []MessageSysMessageSysMsgMsg `json:"msg"`
}
type MessagePopWindow struct {
URL string `json:"url"`
Tip string `json:"tip"`
Title string `json:"title"`
Width int `json:"width"`
Height int `json:"height"`
Duration int `json:"duration"`
Position int `json:"position"`
NoticeID string `json:"notice_id"`
PopMode int `json:"pop_mode"`
}