-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructs.go
47 lines (44 loc) · 1.13 KB
/
structs.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
package main
type longpollUpdate struct {
Ts string `json:"ts"`
Updates []updateObject `json:"updates"`
}
type updateObject struct {
Type string `json:"type"`
Object message `json:"object"`
GroupID int `json:"group_id"`
Secret string `json:"secret"`
}
type failedLP struct {
Failed int `json:"failed"`
Ts int `json:"ts"`
}
type message struct {
ID int `json:"id"`
UserID int `json:"user_id"`
FromID int `json:"from_id"`
Date int `json:"date"`
ReadState int `json:"read_state"`
Out int `json:"out"`
Title string `json:"title"`
Body string `json:"body"`
Attachments []struct {
Type string `json:"type "`
} `json:"attachments"`
FwdMessages []message `json:"fwd_messages"`
}
type longpollResponse struct {
Response *struct {
Key string `json:"key"`
Server string `json:"server"`
Ts int `json:"ts"`
} `json:"response"`
Error *struct {
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
RequestParams []struct {
Key string `json:"key"`
Value string `json:"value"`
} `json:"request_params"`
} `json:"error"`
}