/
response.go
44 lines (40 loc) · 1.51 KB
/
response.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
package bilidanmaku
type responseDanmuConf struct {
Code int `json:"code"`
Msg string `json:"msg"`
Message string `json:"message"`
Data responseDanmuConfData `json:"data"`
}
type responseDanmuConfData struct {
RefreshRowFactor float64 `json:"refresh_row_factor"`
RefreshRate int `json:"refresh_rate"`
MaxDelay int `json:"max_delay"`
Port int `json:"port"`
Host string `json:"host"`
HostServerList []responseDanmuConfDataServer `json:"host_server_list"`
ServerList []responseDanmuConfDataServer `json:"server_list"`
Token string `json:"token"`
}
type responseDanmuConfDataServer struct {
Host string `json:"host"`
Port int `json:"port"`
WssPort int `json:"wss_port,omitempty"`
WsPort int `json:"ws_port,omitempty"`
}
type roomInitResult struct {
Code int `json:"code"`
Data struct {
Encrypted bool `json:"encrypted"`
HiddenTill int `json:"hidden_till"`
IsHidden bool `json:"is_hidden"`
IsLocked bool `json:"is_locked"`
LockTill int `json:"lock_till"`
NeedP2p int `json:"need_p2p"`
PwdVerified bool `json:"pwd_verified"`
RoomID int `json:"room_id"`
ShortID int `json:"short_id"`
UID int `json:"uid"`
} `json:"data",omitempty`
Message string `json:"message"`
Msg string `json:"msg"`
}