Documentation
¶
Index ¶
- Constants
- func BuildingID() (string, *nerr.E)
- func CPUInfo() (map[string]interface{}, *nerr.E)
- func CanToggleDHCP() *nerr.E
- func DiskInfo() (map[string]interface{}, *nerr.E)
- func DockerInfo() (map[string]interface{}, *nerr.E)
- func HostInfo() (map[string]interface{}, *nerr.E)
- func Hostname() (string, *nerr.E)
- func IPAddress() (net.IP, *nerr.E)
- func InstallerID() (string, *nerr.E)
- func IsConnectedToInternet() bool
- func MemoryInfo() (map[string]interface{}, *nerr.E)
- func MustBuildingID() string
- func MustHostname() string
- func MustInstallerID() string
- func MustRoomID() string
- func MustSystemID() string
- func NetworkInfo() (map[string]interface{}, *nerr.E)
- func ProcsInfo() (map[string]interface{}, *nerr.E)
- func Reboot() *nerr.E
- func RoomID() (string, *nerr.E)
- func SetInstallerID(id string) *nerr.E
- func SystemID() (string, *nerr.E)
- func ToggleDHCP() *nerr.E
- func UsingDHCP() (bool, *nerr.E)
Constants ¶
const (
// EnvironmentFile is the location of the environment file for the av-control api
EnvironmentFile = "/avcapi/environment"
)
Variables ¶
This section is empty.
Functions ¶
func BuildingID ¶
BuildingID returns the room ID of the pi based on the hostname (everything before the last '-')
func CanToggleDHCP ¶
CanToggleDHCP returns nil if you can toggle DHCP, or an error if you can't
func InstallerID ¶
InstallerID returns the installerID of the pi
func IsConnectedToInternet ¶
func IsConnectedToInternet() bool
IsConnectedToInternet returns true if the device can reach google's servers.
func MustBuildingID ¶
func MustBuildingID() string
MustBuildingID returns the buildingID or panics if it fails
func MustHostname ¶
func MustHostname() string
MustHostname returns the hostname of the device, and panics if it fails
func MustInstallerID ¶
func MustInstallerID() string
MustInstallerID returns the installerID or the pi or panics if it fails
func MustSystemID ¶
func MustSystemID() string
MustSystemID returns the pi hostname of the device, and panics if it isn't set or is invalid
func RoomID ¶
RoomID returns the room ID of the pi based on the hostname (everything before the last '-')
func ToggleDHCP ¶
ToggleDHCP turns dhcp on/off by swapping dhcpcd.conf with dhcpcd.conf.other, a file we created when the pi was setup.
Types ¶
This section is empty.