-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathusermsg.go
54 lines (50 loc) · 1.26 KB
/
usermsg.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
package wechat
import (
"encoding/xml"
)
type (
// WxMsg 混合用户消息,业务判断的主体
WxMsg struct {
XMLName xml.Name `xml:"xml"`
ToUserName string
FromUserName string
CreateTime int64
MsgId int64
MsgType string
Content string // text
AgentID int // corp
PicUrl string // image
MediaId string // image/voice/video/shortvideo
Format string // voice
Recognition string // voice
ThumbMediaId string // video
LocationX float32 `xml:"Latitude"` // location
LocationY float32 `xml:"Longitude"` // location
Precision float32 // LOCATION
Scale int // location
Label string // location
Title string // link
Description string // link
Url string // link
Event string // event
EventKey string // event
SessionFrom string // event|user_enter_tempsession
Ticket string
FileKey string
FileMd5 string
FileTotalLen string
TaskId string
ScanCodeInfo struct {
ScanType string
ScanResult string
}
}
// WxMsgEnc 加密的用户消息
WxMsgEnc struct {
XMLName xml.Name `xml:"xml"`
ToUserName string
AgentID int
Encrypt string
AgentType string
}
)