Documentation ¶
Index ¶
- Variables
- type Client
- 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
- type GetClientListResp
- type GetModemInfoResp
- type GetNetworkStatusResp
- type Modem
- type RouterClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnexpected = errors.New("unexpected")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewFromPassword ¶
NewFromPassword will do auth and build a new regular Client.
func (*Client) GetClientList ¶
func (c *Client) GetClientList(ctx context.Context) (*GetClientListResp, error)
func (*Client) GetModemInfo ¶
func (c *Client) GetModemInfo(ctx context.Context) (*GetModemInfoResp, error)
func (*Client) GetNetworkStatus ¶
func (c *Client) GetNetworkStatus(ctx context.Context) (*GetNetworkStatusResp, error)
type GetClientListResp ¶
type GetClientListResp struct {
Clients []RouterClient `json:"clients"`
}
type GetModemInfoResp ¶
type GetNetworkStatusResp ¶
type Modem ¶
type Modem struct { Ports []string `json:"ports"` ModemID int `json:"modem_id"` DataPort string `json:"data_port"` ControlPort string `json:"control_port"` QmiPort string `json:"qmi_port"` Name string `json:"name"` Imei string `json:"IMEI"` Bus string `json:"bus"` HwVersion string `json:"hw_version"` SimNum string `json:"sim_num"` Mnc string `json:"mnc"` Mcc string `json:"mcc"` Carrier string `json:"carrier"` Up string `json:"up"` SIMStatus int `json:"SIM_status"` Operators []string `json:"operators"` }
type RouterClient ¶
type RouterClient struct { Remote bool `json:"remote"` Mac string `json:"mac"` Favorite bool `json:"favorite"` IP string `json:"ip"` Up string `json:"up"` Down string `json:"down"` TotalUp string `json:"total_up"` TotalDown string `json:"total_down"` QosUp string `json:"qos_up"` QosDown string `json:"qos_down"` Blocked bool `json:"blocked"` Iface string `json:"iface"` Name string `json:"name"` OnlineTime string `json:"online_time"` Alive string `json:"alive"` NewOnline bool `json:"new_online"` Online bool `json:"online"` Vendor string `json:"vendor"` Node string `json:"node"` }
Click to show internal directories.
Click to hide internal directories.