/
struct.go
199 lines (185 loc) · 5.55 KB
/
struct.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
package api
type LoginReq struct {
Username string `json:"username"`
Password string `json:"passwd"`
Pass string `json:"pass"`
}
type LoginResp struct {
ErrMsg string `json:"ErrMsg"`
Result int `json:"Result"`
}
type CallReq struct {
FuncName string `json:"func_name"`
Action string `json:"action"`
Param interface{} `json:"param,omitempty"`
}
type CallResp struct {
ErrMsg string `json:"ErrMsg"`
Result int `json:"Result"`
}
type WebUserShowResp struct {
CallResp
}
type CustomISPShowResp struct {
CallResp
Data struct {
Total int `json:"total"`
Data []struct {
ID int `json:"id"`
Name string `json:"name"`
IPGroup string `json:"ipgroup"`
Comment string `json:"comment"`
Time string `json:"time"`
} `json:"data"`
} `json:"Data"`
}
type CustomISPDelResp struct {
CallResp
}
type CustomISPAddResp struct {
CallResp
}
type StreamDomainShowResp struct {
CallResp
Data struct {
Total int `json:"total"`
Data []struct {
ID int `json:"id"`
Interface string `json:"interface"`
SrcAddr string `json:"src_addr"`
Enabled string `json:"enabled"`
Week string `json:"week"`
Comment string `json:"comment"`
Domain string `json:"domain"`
Time string `json:"time"`
} `json:"data"`
} `json:"Data"`
}
type StreamDomainDelResp struct {
CallResp
}
type StreamDomainAddResp struct {
CallResp
}
type HomepageShowSysStatResp struct {
CallResp
Data struct {
SysStat struct {
Cpu []string `json:"cpu"`
CpuTemp []int `json:"cputemp"`
Freq []string `json:"freq"`
GWid string `json:"gwid"`
Hostname string `json:"hostname"`
LinkStatus int `json:"link_status"`
Memory struct {
Total int64 `json:"total"`
Available int64 `json:"available"`
Free int64 `json:"free"`
Cached int64 `json:"cached"`
Buffers int64 `json:"buffers"`
Used string `json:"used"`
} `json:"memory"`
OnlineUser struct {
Count int `json:"count"`
Count2G int `json:"count_2g"`
Count5G int `json:"count_5g"`
CountWired int `json:"count_wired"`
CountWireless int `json:"count_wireless"`
} `json:"online_user"`
Stream struct {
ConnectNum int `json:"connect_num"`
Upload int `json:"upload"`
Download int `json:"download"`
TotalUp int64 `json:"total_up"`
TotalDown int64 `json:"total_down"`
} `json:"stream"`
Uptime int `json:"uptime"`
VerInfo struct {
ModelName string `json:"modelname"`
VerString string `json:"verstring"`
Version string `json:"version"`
BuildDate int64 `json:"build_date"`
Arch string `json:"arch"`
SysBit string `json:"sysbit"`
VerFlags string `json:"verflags"`
IsEnterprise int `json:"is_enterprise"`
SupportI18N int `json:"support_i18n"`
SupportLcd int `json:"support_lcd"`
} `json:"verinfo"`
} `json:"sysstat"`
AcStatus struct {
ApCount int `json:"ap_count"`
ApOnline int `json:"ap_online"`
} `json:"ac_status"`
} `json:"Data"`
}
type MonitorLanIPShowResp struct {
CallResp
Data struct {
Data []struct {
ApName string `json:"apname"`
AcGid int `json:"ac_gid"`
Mac string `json:"mac"`
LinkAddr string `json:"link_addr"`
Hostname string `json:"hostname"`
DTalkName string `json:"dtalk_name"`
DownRate string `json:"downrate"`
Reject int `json:"reject"`
Uprate string `json:"uprate"`
Signal string `json:"signal"`
ClientType string `json:"client_type"`
Bssid string `json:"bssid"`
AuthType int `json:"auth_type"`
WebID int `json:"webid"`
Comment string `json:"comment"`
Username string `json:"username"`
PPPType string `json:"ppptype"`
ApMac string `json:"apmac"`
Upload int `json:"upload"`
Ssid string `json:"ssid"`
Frequencies string `json:"frequencies"`
Uptime string `json:"uptime"`
Id int `json:"id"`
IpAddrInt int64 `json:"ip_addr_int"`
ConnectNum int `json:"connect_num"`
IpAddr string `json:"ip_addr"`
Download int `json:"download"`
TotalUp int64 `json:"total_up"`
TotalDown int64 `json:"total_down"`
ClientDevice string `json:"client_device"`
Timestamp int `json:"timestamp"`
} `json:"data"`
} `json:"Data"`
}
type MonitorIFaceShowResp struct {
CallResp
Data struct {
IFaceCheck []struct {
Id int `json:"id"`
Interface string `json:"interface"`
ParentInterface string `json:"parent_interface"`
IpAddr string `json:"ip_addr"`
Gateway string `json:"gateway"`
Internet string `json:"internet"`
UpdateTime string `json:"updatetime"`
AutoSwitch string `json:"auto_switch"`
Result string `json:"result"`
ErrMsg string `json:"errmsg"`
Comment string `json:"comment"`
} `json:"iface_check"`
IFaceStream []struct {
Interface string `json:"interface"`
Comment string `json:"comment"`
IpAddr string `json:"ip_addr"`
ConnectNum string `json:"connect_num"`
Upload int `json:"upload"`
Download int `json:"download"`
TotalUp int64 `json:"total_up"`
TotalDown int64 `json:"total_down"`
UpDropped int `json:"updropped"`
DownDropped int `json:"downdropped"`
UpPacked int `json:"uppacked"`
DownPacked int `json:"downpacked"`
} `json:"iface_stream"`
} `json:"Data"`
}