forked from addcnos/youdu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
65 lines (54 loc) · 1.51 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
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"`
}