Versions in this module Expand all Collapse all v0 v0.1.0 Feb 6, 2023 Changes in this version + var ErrUnauthorized = errors.New("unauthorized") + var ErrUnexpected = errors.New("unexpected") + type Client struct + func New(addr, token string) (*Client, error) + func NewFromPassword(ctx context.Context, addr, password string) (*Client, error) + func (c *Client) GetClientList(ctx context.Context) (*GetClientListResp, error) + func (c *Client) GetModemInfo(ctx context.Context) (*GetModemInfoResp, error) + func (c *Client) GetNetworkStatus(ctx context.Context) (*GetNetworkStatusResp, error) + func (c *Client) GetPublicIP(ctx context.Context) (string, error) + func (c *Client) ModemTurnOff(ctx context.Context) error + func (c *Client) ModemTurnOn(ctx context.Context) error + func (c *Client) ModemTurnOnAuto(ctx context.Context) error + func (c *Client) Token() string + type Code int + const CodeBadToken + type GetClientListResp struct + Clients []RouterClient + type GetModemInfoResp struct + HintModifyWifiChannel int + Modems []Modem + Passthrough bool + type GetNetworkStatusResp struct + Reachable bool + RebootFlag bool + type Modem struct + Bus string + Carrier string + ControlPort string + DataPort string + HwVersion string + Imei string + Mcc string + Mnc string + ModemID int + Name string + Operators []string + Ports []string + QmiPort string + SIMStatus int + SimNum string + Up string + type RouterClient struct + Alive string + Blocked bool + Down string + Favorite bool + IP string + Iface string + Mac string + Name string + NewOnline bool + Node string + Online bool + OnlineTime string + QosDown string + QosUp string + Remote bool + TotalDown string + TotalUp string + Up string + Vendor string