Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for sending requests to the Deco-m4 API
func (*Client) Authenticate ¶
Authenticate will generate the keys needed for the communication with the router.
func (*Client) ClientList ¶
func (c *Client) ClientList() (*ClientListResp, error)
ClientList returns the list of connected devices
func (*Client) Custom ¶
func (c *Client) Custom(path string, params EndpointArgs, body []byte) (interface{}, error)
Custom lets you make a custom request
func (*Client) Performance ¶
Performance returns the current cpu and mem usage.
type ClientListResp ¶
type ClientListResp struct {
ErrorCode int `json:"error_code"`
Result struct {
ClientList []struct {
AccessHost string `json:"access_host"`
ClientMesh bool `json:"client_mesh"`
ClientType string `json:"client_type"`
ConnectionType string `json:"band5"`
DownSpeed uint `json:"down_speed"`
EnablePriority bool `json:"enable_priority"`
Interface string `json:"interface"`
IP string `json:"ip"`
MAC string `json:"mac"`
Name string `json:"name"`
Online bool `json:"online"`
OwnerID string `json:"owner_id"`
RemainTime uint `json:"remain_time"`
SpaceID string `json:"space_id"`
UpSpeed uint `json:"up_speed"`
WireType string `json:"wire_type"`
} `json:"client_list"`
} `json:"result"`
}
ClientListResp is the structure of the client_list endpoint
type EndpointArgs ¶
type EndpointArgs struct {
// contains filtered or unexported fields
}
EndpointArgs holds the url params to be sent
Click to show internal directories.
Click to hide internal directories.