Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { Model string Platform string MacAddress string Hostname string Firmware string IPAddresses map[string][]string UpSince time.Time Essid string WirelessMode string LastSeenAt time.Time FirstSeenAt time.Time }
Device descibes an UBNT device found on the local network
func (*Device) Merge ¶
Merge updates this instance with the values of the other (by copying the data), so that references to this instance are kept intact
func (*Device) RecentlySeen ¶
RecentlySeen tells you, whether you have seen this device in the given time period
type Discover ¶
type Discover struct { NotifyHandler NotifyHandler // contains filtered or unexported fields }
func AutoDiscover ¶
func AutoDiscover(notify NotifyHandler, interfaceNames ...string) (d *Discover, err error)
AutoDiscover starts the UBNT auto discovery mechanism. It returns a notifier channel which receives newly discovered devices (i.e. a device already seen won't be send again). You can stop the discovery by closing the quit channel.
type NotifyHandler ¶
type NotifyHandler func(*Device)
type Packet ¶
Packet holds information about a UBNT Discovery response
func ParsePacket ¶
ParsePacket tries to parse UPD packet data into a Packet
type Tag ¶
type Tag struct { ID TagID // contains filtered or unexported fields }
Tag describes a key value pair
func (*Tag) StringInto ¶
StringInto tries to update the given string reference with a type asserted value (it doesn't perform an update, if the type assertion fails)
type TagDescription ¶
type TagDescription struct {
// contains filtered or unexported fields
}
TagDescription annotates some meta information to a TagID