Documentation ¶
Index ¶
- func EncodePassword(username, password, csrfParam, csrfToken string) string
- type Client
- func (c *Client) GetBroadcastedWifiNetworks(ctx context.Context) ([]WifiNetwork, error)
- func (c *Client) GetConnectedDeviceCount(ctx context.Context) (*DeviceCount, error)
- func (c *Client) GetDeviceInfo(ctx context.Context) (*DeviceInfo, error)
- func (c *Client) GetInternetDiagnosis(ctx context.Context) (*InternetDiagnosis, error)
- func (c *Client) GetLANStatistics(ctx context.Context) ([]LANStatistics, error)
- func (c *Client) GetUMTSStatistics(ctx context.Context) (*UMTSStatistics, error)
- func (c *Client) GetWifiStatistics(ctx context.Context) ([]WifiStatistics, error)
- func (c *Client) ListDHCPReservation(ctx context.Context) ([]DHCPReservation, error)
- func (c *Client) ListKnownLANDevices(ctx context.Context) ([]LANDevice, error)
- func (c *Client) Login(ctx context.Context, username, password string) error
- func (c *Client) SessionID() string
- type ClientOption
- type DHCPReservation
- type DeviceCount
- type DeviceInfo
- type InternetDiagnosis
- type LANDevice
- type LANStatistics
- type UMTSStatistics
- type WifiNetwork
- type WifiStatistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePassword ¶
Types ¶
type Client ¶
func (*Client) GetBroadcastedWifiNetworks ¶
func (c *Client) GetBroadcastedWifiNetworks(ctx context.Context) ([]WifiNetwork, error)
func (*Client) GetConnectedDeviceCount ¶
func (c *Client) GetConnectedDeviceCount(ctx context.Context) (*DeviceCount, error)
func (*Client) GetDeviceInfo ¶
func (c *Client) GetDeviceInfo(ctx context.Context) (*DeviceInfo, error)
func (*Client) GetInternetDiagnosis ¶
func (c *Client) GetInternetDiagnosis(ctx context.Context) (*InternetDiagnosis, error)
func (*Client) GetLANStatistics ¶
func (c *Client) GetLANStatistics(ctx context.Context) ([]LANStatistics, error)
func (*Client) GetUMTSStatistics ¶
func (c *Client) GetUMTSStatistics(ctx context.Context) (*UMTSStatistics, error)
func (*Client) GetWifiStatistics ¶
func (c *Client) GetWifiStatistics(ctx context.Context) ([]WifiStatistics, error)
func (*Client) ListDHCPReservation ¶
func (c *Client) ListDHCPReservation(ctx context.Context) ([]DHCPReservation, error)
func (*Client) ListKnownLANDevices ¶
type ClientOption ¶ added in v0.0.3
type ClientOption func(*Client)
func WithHTTPRoundTriper ¶ added in v0.0.4
func WithHTTPRoundTriper(rt http.RoundTripper) ClientOption
type DHCPReservation ¶
type DHCPReservation struct { Addr string `json:"Yiaddr"` // e.g. "192.168.1.41" ID string `json:"ID"` // e.g. "InternetGatewayDevice.LANDevice.1.LANHostConfigManagement.DHCPStaticAddress.5." ActualName string `json:"ActualName"` // e.g. "bar_Ethernet" Chaddr string `json:"Chaddr"` // e.g. "AA:BB:CC:DD:EE:FF" Enable bool `json:"Enable"` // e.g. true }
type DeviceCount ¶
type DeviceCount struct { ActiveDeviceNumbers int64 `json:"ActiveDeviceNumbers"` // e.g. 15 DatacardNumber int64 `json:"DatacardNumber"` // e.g. 0 LANActiveNumber int64 `json:"LanActiveNumber"` // e.g. 5 PhoneNumber int64 `json:"PhoneNumber"` // e.g. 2 PrinterNumbers int64 `json:"PrinterNumbers"` // e.g. 0 USBNumbers int64 `json:"UsbNumbers"` // e.g. 0 UserNumber int64 `json:"UserNumber"` // e.g. 2 }
type DeviceInfo ¶
type DeviceInfo struct { DeviceName string `json:"DeviceName"` // e.g. "HG659" SerialNumber string `json:"SerialNumber"` // e.g. "J3N8W10123456789" ManufacturerOUI string `json:"ManufacturerOUI"` // e.g. "00E0FC" UpTime int64 `json:"UpTime"` // e.g. 3697479 SoftwareVersion string `json:"SoftwareVersion"` // e.g. "V100R00123456789" HardwareVersion string `json:"HardwareVersion"` // e.g. "VER.B" }
type InternetDiagnosis ¶
type InternetDiagnosis struct { ConnectionStatus string `json:"ConnectionStatus"` // e.g. "Connected" DNSServers string `json:"DNSServers"` // e.g. "" DefaultGateway string `json:"DefaultGateway"` // e.g. "" DownMaxBitRate string `json:"DownMaxBitRate"` // e.g. "1000" DuplexMode string `json:"DuplexMode"` // e.g. "Full" ErrReason string `json:"ErrReason"` // e.g. "Success" ExternalIPAddress string `json:"ExternalIPAddress"` // e.g. "" HasInternetWan bool `json:"HasInternetWan"` // e.g. true LinkStatus string `json:"LinkStatus"` // e.g. "Up" MACAddress string `json:"MACAddress"` // e.g. "" MaxBitRate string `json:"MaxBitRate"` // e.g. "1000" Status string `json:"Status"` // e.g. "Connected" StatusCode string `json:"StatusCode"` // e.g. "Connected" UpMaxBitRate string `json:"UpMaxBitRate"` // e.g. "1000" Uptime int64 `json:"Uptime"` // e.g. 350840 WANAccessType string `json:"WANAccessType"` // e.g. "Ethernet" IPv4Enable bool `json:"X_IPv4Enable"` // e.g. true IPv6Address string `json:"X_IPv6Address"` // e.g. "" IPv6AddressingType string `json:"X_IPv6AddressingType"` // e.g. "SLAAC" IPv6ConnectionStatus string `json:"X_IPv6ConnectionStatus"` // e.g. "Pending Disconnect" IPv6DNSServers string `json:"X_IPv6DNSServers"` // e.g. "" IPv6DefaultGateway string `json:"X_IPv6DefaultGateway"` // e.g. "" IPv6Enable bool `json:"X_IPv6Enable"` // e.g. false IPv6PrefixLength int64 `json:"X_IPv6PrefixLength"` // e.g. 0 IPv6PrefixList string `json:"X_IPv6PrefixList"` // e.g. "" }
type LANDevice ¶
type LANDevice struct { Active bool `json:"Active"` // e.g. true QOSClassID string `json:"QosclassID"` // e.g. "" DeviceMaxDownloadRate int64 `json:"DeviceMaxDownLoadRate"` // e.g. 0 HostName string `json:"HostName"` // e.g. "Foo_Wireless" Active46 bool `json:"Active46"` // e.g. true LeaseTime int64 `json:"LeaseTime"` // e.g. 14867 ID string `json:"ID"` // e.g. "InternetGatewayDevice.LANDevice.1.Hosts.Host.1." IPv6Addrs []any `json:"Ipv6Addrs"` // e.g. [] ClassQueue int64 `json:"ClassQueue"` // e.g. -1 Layer2Interface string `json:"Layer2Interface"` // e.g. "SSID1" ActualName string `json:"ActualName"` // e.g. "" IPAddress string `json:"IPAddress"` // e.g. "192.168.1.12" PolicerID string `json:"PolicerID"` // e.g. "" Domain string `json:"domain"` // e.g. "InternetGatewayDevice.LANDevice.1.WLANConfiguration.1" DeviceDownRateEnable bool `json:"DeviceDownRateEnable"` // e.g. false MACAddress string `json:"MACAddress"` // e.g. "AA:BB:CC:DD:EE:FF" ParentControlEnable bool `json:"ParentControlEnable"` // e.g. false MACFilterID string `json:"MacFilterID"` // e.g. "" AddressSource string `json:"AddressSource"` // e.g. "DHCP" V6Active bool `json:"V6Active"` // e.g. false IconType string `json:"IconType"` // e.g. "" IPv6Address string `json:"IPv6Address"` // e.g. "" VendorClassID string `json:"VendorClassID"` // e.g. "android-dhcp-13" }
type LANStatistics ¶
type LANStatistics struct { ReceiveBytes int64 `json:"receivebytes"` // e.g. 1115521851 SendBytes int64 `json:"sendbytes"` // e.g. 532335628 ReceivePacket int64 `json:"receivepacket"` // e.g. 7775540 SendDiscard int64 `json:"senddiscard"` // e.g. 0 SendError int64 `json:"senderror"` // e.g. 0 ID string `json:"ID"` // e.g. "LAN1" ReceiveError int64 `json:"receiveerror"` // e.g. 0 ReceiveDiscard int64 `json:"receivediscard"` // e.g. 0 SendPacket int64 `json:"sendpacket"` // e.g. 30813230 }
type UMTSStatistics ¶
type UMTSStatistics struct { BytesReceived int64 `json:"BytesReceived"` // e.g. 0 UpstreamRate string `json:"UpstreamRate"` // e.g. "0.000000" PacketsSent int64 `json:"PacketsSent"` // e.g. 0 BytesSent int64 `json:"BytesSent"` // e.g. 0 PacketsReceived int64 `json:"PacketsReceived"` // e.g. 0 HasDatacard bool `json:"HasDatacard"` // e.g. false DownstreamRate string `json:"DownstreamRate"` // e.g. "0.000000" }
type WifiNetwork ¶
type WifiStatistics ¶
type WifiStatistics struct { ReceiveBytes int64 `json:"receivebytes"` // e.g. 1432834374 SendBytes int64 `json:"sendbytes"` // e.g. 3297610140 WifiMode string `json:"wifimode"` // e.g. "5GHz" SendDiscard int64 `json:"senddiscard"` // e.g. 0 SendError int64 `json:"senderror"` // e.g. 19046 Name string `json:"name"` // e.g. "Blah" ReceivePacket int64 `json:"receivepacket"` // e.g. 160109751 SendPacket int64 `json:"sendpacket"` // e.g. 403167409 ReceiveDiscard int64 `json:"receivediscard"` // e.g. 0 ReceiveError int64 `json:"receiveerror"` // e.g. 0 }
Click to show internal directories.
Click to hide internal directories.