Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) AuthorizeGuest ¶
func (c *Controller) AuthorizeGuest(mac string, time time.Duration) (err error)
authorize guest access for a given mac
func (*Controller) GetClients ¶
func (c *Controller) GetClients() ([]UnifiClient, error)
get list of all clients within last 24 hours
func (*Controller) Login ¶
func (c *Controller) Login(user string, pass string) (err error)
Login, required before any other function will work, unifi uses cookies that are saved in memory
func (*Controller) SetTransport ¶
func (c *Controller) SetTransport(t *http.Transport)
type UnifiClient ¶
type UnifiClient struct { Expired bool `json:"expired"` Mac string `json"mac"` ApMac string `json"ap_mac"` Start int `json:"start"` End int `json:"end"` Duration int `json:"duration"` Channel int `json:"channel"` Hostname string `json:"hostname"` AuthorizedBy string `json:"authorized_by"` // voucher/api/none Radio string `json:"radio"` RoamCount int `json:"roam_count"` RxBytes int `json:"rx_bytes"` TxBytes int `json:"tx_bytes"` }
type UnifiClientResult ¶
type UnifiClientResult struct {
Data []UnifiClient `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.