Documentation
¶
Overview ¶
Package model provides data types used throughout the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
ID int64
NetID int64
Name string
OS string
Addr []net.Addr
BigHead bool
LastSeen time.Time
}
Device is a computer - in the most inclusive sense of the word - that is connected to an IP network. It has zero or more IP addresses, a name, and is considered a BigHead if it is a *REAL* computer, which by my definition is one you can do some coding on (i.e. smartphones, tablets, smart TVs, etc. are NOT BigHeads).
func (*Device) AddrStr ¶
AddrStr returns a string representation of the receiver's addresses that is also valid JSON.
func (*Device) DefaultAddr ¶
DefaultAddr returns the first IP address, stringified.
type DiskFree ¶ added in v0.2.0
DiskFree captures the percentage of free disk space on the root filesystem of a Device.
type Network ¶
Network represents a range of IP addresses where Devices may reside.
func NewNetwork ¶
NewNetwork creates a fresh Network with the given address and description.
type Updates ¶
Updates is a set of available Updates on a given Device at a certain point in time.
func (*Updates) UpdatesPending ¶
UpdatesPending returns true if the list of AvailableUpdates contains at least one element.