package module
v0.0.0-...-0ef0fbe Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2016 License: MIT Imports: 7 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Controller

type Controller struct {
	// contains filtered or unexported fields

func New

func New(url string, site ...string) (o *Controller, err error)

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
	UnauthorizedBy string `json:"unauthorized_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"`

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL