omada-api/model/ap_info.go

41 lines
1.5 KiB
Go
Raw Normal View History

2025-02-01 17:38:29 +01:00
package model
import "encoding/json"
type ApInfo struct {
Type string `json:"type"`
MacAddress string `json:"mac"`
Name string `json:"name"`
IP string `json:"ip"`
IPv6 []string `json:"ipv6List"`
WlanGroupID string `json:"wlanId"`
WirelessUplinkInfo *ApWirelessUplinkInfo `json:"wirelessUplink"`
Model string `json:"model"`
FirmwareVersion string `json:"firmwareVersion"`
CpuUtil int `json:"cpuUtil"`
MemUtil int `json:"memoryUtil"`
UptimeSeconds int `json:"uptimeLong"`
}
func (i ApInfo) String() string {
data, _ := json.MarshalIndent(i, "", "\t")
return string(data)
}
type ApWirelessUplinkInfo struct {
UplinkMacAddress string `json:"uplinkMac"`
Name string `json:"name"`
Channel int `json:"channel"`
SignalStrengh int `json:"rssi"`
SignalNoiseRatio int `json:"snr"`
TransferRate string `json:"txRate"`
TransferRateMbps int `json:"txRateInt"`
ReceiveRate string `json:"rxRate"`
ReceiveRateMbps int `json:"rxRateInt"`
UpBytes int `json:"upBytes"`
DownBytes int `json:"downBytes"`
UpPackets int `json:"upPackets"`
DownPackets int `json:"downPackets"`
Activity int `json:"activity"`
}