Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust Dns_Tbl parser #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 47 additions & 41 deletions collector/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,48 +116,54 @@ type StationStatusReponse struct {
Data *StationStatusData `json:"data"`
}

type DNSTable struct {
Id string `json:"__id"`
Type string `json:"Type"`
Dns string `json:"dns"`
}

type StationStatusData struct {
DateAndTime string `json:"dateandtime"`
FirewallStatus string `json:"firewallstatus"`
LanIpv4 string `json:"lanipv4"`
LanMode string `json:"LanMode"`
LanGateway string `json:"langateway"`
LanDHCPstatus string `json:"lanDHCPstatus"`
LanMAC string `json:"lanMAC"`
LanPortStatus4 string `json:"lanportstatus_4"`
LanPortSpeed4 string `json:"lanportspeed_4"`
LanPortStatus1 string `json:"lanportstatus_1"`
LanPortSpeed1 string `json:"lanportspeed_1"`
LanPortStatus2 string `json:"lanportstatus_2"`
LanPortSpeed2 string `json:"lanportspeed_2"`
LanPortStatus3 string `json:"lanportstatus_3"`
LanPortSpeed3 string `json:"lanportspeed_3"`
WifiStatus string `json:"wifistatus"`
Channel string `json:"channel"`
Bandwidth string `json:"bandwidth"`
MaxSpeed string `json:"maxspeed"`
Ssid string `json:"ssid"`
MacAddress string `json:"macaddress"`
Security string `json:"security"`
WifiStatus5 string `json:"wifistatus_5"`
Channel5 string `json:"channel_5"`
Bandwidth5 string `json:"bandwidth_5"`
MaxSpeed5 string `json:"maxspeed_5"`
Ssid5 string `json:"ssid_5"`
MacAddress5 string `json:"macaddress_5"`
Security5 string `json:"security_5"`
DnsEntries string `json:"DnsEntries"`
AFTR string `json:"AFTR"`
Serialnumber string `json:"serialnumber"`
FirmwareVersion string `json:"firmwareversion"`
HardwareType string `json:"hardwaretype"`
Uptime string `json:"uptime"`
InternetIpv4 string `json:"internetipv4"`
DnsTbl []string `json:"Dns_Tbl"`
DelegatedPrefix string `json:"DelegatedPrefix"`
DNSTblRT []string `json:"DNSTblRT"`
IPAddressRT []string `json:"IPAddressRT"`
IpPrefixClass string `json:"IpPrefixClass"`
DateAndTime string `json:"dateandtime"`
FirewallStatus string `json:"firewallstatus"`
LanIpv4 string `json:"lanipv4"`
LanMode string `json:"LanMode"`
LanGateway string `json:"langateway"`
LanDHCPstatus string `json:"lanDHCPstatus"`
LanMAC string `json:"lanMAC"`
LanPortStatus4 string `json:"lanportstatus_4"`
LanPortSpeed4 string `json:"lanportspeed_4"`
LanPortStatus1 string `json:"lanportstatus_1"`
LanPortSpeed1 string `json:"lanportspeed_1"`
LanPortStatus2 string `json:"lanportstatus_2"`
LanPortSpeed2 string `json:"lanportspeed_2"`
LanPortStatus3 string `json:"lanportstatus_3"`
LanPortSpeed3 string `json:"lanportspeed_3"`
WifiStatus string `json:"wifistatus"`
Channel string `json:"channel"`
Bandwidth string `json:"bandwidth"`
MaxSpeed string `json:"maxspeed"`
Ssid string `json:"ssid"`
MacAddress string `json:"macaddress"`
Security string `json:"security"`
WifiStatus5 string `json:"wifistatus_5"`
Channel5 string `json:"channel_5"`
Bandwidth5 string `json:"bandwidth_5"`
MaxSpeed5 string `json:"maxspeed_5"`
Ssid5 string `json:"ssid_5"`
MacAddress5 string `json:"macaddress_5"`
Security5 string `json:"security_5"`
DnsEntries string `json:"DnsEntries"`
AFTR string `json:"AFTR"`
Serialnumber string `json:"serialnumber"`
FirmwareVersion string `json:"firmwareversion"`
HardwareType string `json:"hardwaretype"`
Uptime string `json:"uptime"`
InternetIpv4 string `json:"internetipv4"`
DnsTbl []DNSTable `json:"Dns_Tbl"`
DelegatedPrefix string `json:"DelegatedPrefix"`
DNSTblRT []string `json:"DNSTblRT"`
IPAddressRT []string `json:"IPAddressRT"`
IpPrefixClass string `json:"IpPrefixClass"`
}

type CallLog struct {
Expand Down