Documentation ¶
Index ¶
- type Client
- type Controller
- func (c *Controller) GetClients() ([]Client, error)
- func (c *Controller) GetControllerInfo() error
- func (c *Controller) GetDevices() ([]Device, error)
- func (c *Controller) GetDhcpReservations() ([]DhcpReservation, error)
- func (c *Controller) GetNetworks() ([]OmadaNetwork, error)
- func (c *Controller) Login(user string, pass string) error
- func (c *Controller) SetSite(site string) error
- type ControllerInfo
- type Device
- type DhcpReservation
- type GetNetworksResponse
- type LoginBody
- type LoginResponse
- type OmadaNetwork
- type Sites
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
func New ¶
func New(baseURL string) Controller
func (*Controller) GetClients ¶
func (c *Controller) GetClients() ([]Client, error)
func (*Controller) GetControllerInfo ¶
func (c *Controller) GetControllerInfo() error
func (*Controller) GetDevices ¶
func (c *Controller) GetDevices() ([]Device, error)
func (*Controller) GetDhcpReservations ¶ added in v0.4.1
func (c *Controller) GetDhcpReservations() ([]DhcpReservation, error)
func (*Controller) GetNetworks ¶
func (c *Controller) GetNetworks() ([]OmadaNetwork, error)
func (*Controller) SetSite ¶ added in v0.4.0
func (c *Controller) SetSite(site string) error
type ControllerInfo ¶
type ControllerInfo struct { ErrorCode int `json:"errorCode"` Msg string `json:"msg"` Result struct { ControllerVer string `json:"controllerVer"` APIVer string `json:"apiVer"` Configured bool `json:"configured"` Type int `json:"type"` SupportApp bool `json:"supportApp"` OmadacID string `json:"omadacId"` } `json:"result"` }
type Device ¶
type Device struct { Type string `json:"type"` Mac string `json:"mac"` Name string `json:"name"` Model string `json:"model"` CompoundModel string `json:"compoundModel"` ShowModel string `json:"showModel"` ModelVersion string `json:"modelVersion"` FirmwareVersion string `json:"firmwareVersion"` Version string `json:"version"` HwVersion string `json:"hwVersion"` IP string `json:"ip"` Uptime string `json:"uptime"` UptimeLong int `json:"uptimeLong"` StatusCategory int `json:"statusCategory"` Status int `json:"status"` AdoptFailType int `json:"adoptFailType"` LastSeen int64 `json:"lastSeen"` NeedUpgrade bool `json:"needUpgrade"` FwDownload bool `json:"fwDownload"` CPUUtil int `json:"cpuUtil"` MemUtil int `json:"memUtil"` Download int64 `json:"download"` Upload int64 `json:"upload"` Site string `json:"site"` Location struct { MapID string `json:"mapId"` PosX float64 `json:"posX"` PosY float64 `json:"posY"` InstallType int `json:"installType"` Height float64 `json:"height"` Located bool `json:"located"` } `json:"location,omitempty"` ClientNum int `json:"clientNum"` Compatible int `json:"compatible"` LocateEnable bool `json:"locateEnable"` Sn string `json:"sn"` CombinedGateway bool `json:"combinedGateway"` WirelessLinked bool `json:"wirelessLinked,omitempty"` DeviceMisc struct { Support5G bool `json:"support5g"` Support5G2 bool `json:"support5g2"` Support6G bool `json:"support6g"` Support11Ac bool `json:"support11ac"` SupportLag bool `json:"supportLag"` SupportMesh int `json:"supportMesh"` CustomizeRegion int `json:"customizeRegion"` MinPower2G int `json:"minPower2G"` MaxPower2G int `json:"maxPower2G"` MinPower5G int `json:"minPower5G"` MaxPower5G int `json:"maxPower5G"` SupportChannelLimit bool `json:"supportChannelLimit"` SupportDfs int `json:"supportDfs"` SupportRoaming int `json:"supportRoaming"` } `json:"deviceMisc,omitempty"` DevCap struct { SupportPa int `json:"supportPa"` MeshChainNum int `json:"meshChainNum"` SupportOFDMA2G bool `json:"supportOFDMA2g"` SupportOFDMA5G bool `json:"supportOFDMA5g"` SupportOFDMA5G2 bool `json:"supportOFDMA5g2"` SupportOFDMA6G bool `json:"supportOFDMA6g"` SupportMeshPriority bool `json:"supportMeshPriority"` SupportL3Access bool `json:"supportL3Access"` } `json:"devCap,omitempty"` WlanGroup string `json:"wlanGroup,omitempty"` Override string `json:"override,omitempty"` Bssids []string `json:"bssids,omitempty"` RadioSetting2G struct { RadioEnable bool `json:"radioEnable"` ChannelWidth string `json:"channelWidth"` Channel string `json:"channel"` TxPower int `json:"txPower"` TxPowerLevel int `json:"txPowerLevel"` } `json:"radioSetting2g,omitempty"` RadioSetting5G struct { RadioEnable bool `json:"radioEnable"` ChannelWidth string `json:"channelWidth"` Channel string `json:"channel"` TxPower int `json:"txPower"` TxPowerLevel int `json:"txPowerLevel"` } `json:"radioSetting5g,omitempty"` Wp2G struct { ActualChannel string `json:"actualChannel"` MaxTxRate int `json:"maxTxRate"` TxPower int `json:"txPower"` Region int `json:"region"` BandWidth string `json:"bandWidth"` RdMode string `json:"rdMode"` TxUtil int `json:"txUtil"` RxUtil int `json:"rxUtil"` InterUtil int `json:"interUtil"` } `json:"wp2g,omitempty"` Wp5G struct { ActualChannel string `json:"actualChannel"` MaxTxRate int `json:"maxTxRate"` TxPower int `json:"txPower"` Region int `json:"region"` BandWidth string `json:"bandWidth"` RdMode string `json:"rdMode"` TxUtil int `json:"txUtil"` RxUtil int `json:"rxUtil"` InterUtil int `json:"interUtil"` } `json:"wp5g,omitempty"` TxRate int `json:"txRate,omitempty"` RxRate int `json:"rxRate,omitempty"` ClientNum2G int `json:"clientNum2g,omitempty"` ClientNum5G int `json:"clientNum5g,omitempty"` ClientNum5G2 int `json:"clientNum5g2,omitempty"` ClientNum6G int `json:"clientNum6g,omitempty"` UserNum int `json:"userNum,omitempty"` GuestNum int `json:"guestNum,omitempty"` Hop int `json:"hop,omitempty"` Downlink int `json:"downlink,omitempty"` AnyPoeEnable bool `json:"anyPoeEnable,omitempty"` LicenseStatusStr string `json:"licenseStatusStr"` Uplink string `json:"uplink,omitempty"` LoopbackNum int `json:"loopbackNum,omitempty"` Loop string `json:"loop,omitempty"` PoeRemain float64 `json:"poeRemain,omitempty"` FanStatus int `json:"fanStatus,omitempty"` PoeSupport bool `json:"poeSupport,omitempty"` DnsName string }
type DhcpReservation ¶ added in v0.4.1
type DhcpReservation struct { ID string `json:"id"` Description string `json:"description,omitempty"` NetID string `json:"netId"` Mac string `json:"mac"` IP string `json:"ip"` Status bool `json:"status"` NetName string `json:"netName"` ExportToIPMacBinding bool `json:"exportToIpMacBinding"` ClientName string `json:"clientName"` }
type GetNetworksResponse ¶
type LoginResponse ¶
type OmadaNetwork ¶
Click to show internal directories.
Click to hide internal directories.