Documentation ¶
Index ¶
- Variables
- func GetActivityInRange(rw http.ResponseWriter, req *http.Request)
- func GetAllActivity(rw http.ResponseWriter, req *http.Request)
- func ShowUI(rw http.ResponseWriter, req *http.Request)
- type ActivityRequest
- type ConfigAPI
- func (c *ConfigAPI) GetAllConfig(rw http.ResponseWriter, req *http.Request)
- func (c *ConfigAPI) GetConfigItem(rw http.ResponseWriter, req *http.Request)
- func (c *ConfigAPI) RemoveConfigItem(rw http.ResponseWriter, req *http.Request)
- func (c *ConfigAPI) SetAllConfigItems(rw http.ResponseWriter, req *http.Request)
- func (c *ConfigAPI) SetConfigItem(rw http.ResponseWriter, req *http.Request)
- type CurrentState
- type ErrorResponse
- type Hub
- type SystemAPI
- type WifiUpdateRequest
- type WifiUpdateResponse
- type WsHandler
Constants ¶
This section is empty.
Variables ¶
var ( // BuildVersion contains the version information for the app BuildVersion = "Unknown" // CommitID is the git commitId for the app. It's filled in as // part of the automated build CommitID string // ApplicationStartTime is the start time of the app ApplicationStartTime = time.Now() )
Functions ¶
func GetActivityInRange ¶ added in v1.0.42
func GetActivityInRange(rw http.ResponseWriter, req *http.Request)
GetActivityInRange gets activity for the appliance for a given time range
func GetAllActivity ¶ added in v1.0.42
func GetAllActivity(rw http.ResponseWriter, req *http.Request)
GetAllActivity gets activity for the appliance for a given time range
Types ¶
type ActivityRequest ¶ added in v1.0.35
ActivityRequest represents an API request for activity
type ConfigAPI ¶ added in v1.0.80
type ConfigAPI struct { // Updated signals when the configuration has been updated Updated chan bool }
ConfigAPI represents the configuration API routes
func (*ConfigAPI) GetAllConfig ¶ added in v1.0.80
func (c *ConfigAPI) GetAllConfig(rw http.ResponseWriter, req *http.Request)
GetAllConfig gets all configuration and returns it in JSON format.
func (*ConfigAPI) GetConfigItem ¶ added in v1.0.80
func (c *ConfigAPI) GetConfigItem(rw http.ResponseWriter, req *http.Request)
GetConfigItem gets a single configuration and returns it in JSON format. If the item can't be found, returns an empty config item
func (*ConfigAPI) RemoveConfigItem ¶ added in v1.0.80
func (c *ConfigAPI) RemoveConfigItem(rw http.ResponseWriter, req *http.Request)
RemoveConfigItem removes a single config item
func (*ConfigAPI) SetAllConfigItems ¶ added in v1.0.80
func (c *ConfigAPI) SetAllConfigItems(rw http.ResponseWriter, req *http.Request)
SetAllConfigItems adds or updates multiple config items and returns all config items in JSON format
func (*ConfigAPI) SetConfigItem ¶ added in v1.0.80
func (c *ConfigAPI) SetConfigItem(rw http.ResponseWriter, req *http.Request)
SetConfigItem adds or updates a single config item and returns the new item in JSON format
type CurrentState ¶ added in v1.0.35
type CurrentState struct { ServerStartTime time.Time `json:"starttime"` ApplicationVersion string `json:"appversion"` DeviceRunning bool `json:"devicerunning"` DeviceID string `json:"deviceId"` }
CurrentState describes the current running state of the application
type ErrorResponse ¶ added in v1.0.35
ErrorResponse represents an API response
type Hub ¶ added in v1.0.58
type Hub struct { // Inbound messages from the connections. Broadcast chan []byte // contains filtered or unexported fields }
Hub is used to manage and coordinate websocket connections
type SystemAPI ¶ added in v1.0.99
type SystemAPI struct { // Reboot signals when the machine should be rebooted Reboot chan bool }
SystemAPI represents the system API routes
func (*SystemAPI) GetCurrentState ¶ added in v1.0.99
func (s *SystemAPI) GetCurrentState(rw http.ResponseWriter, req *http.Request)
GetCurrentState gets the current running state of the application
func (*SystemAPI) UpdateWifi ¶ added in v1.0.99
func (s *SystemAPI) UpdateWifi(rw http.ResponseWriter, req *http.Request)
UpdateWifi updates the wifi credentials for the machine
type WifiUpdateRequest ¶ added in v1.0.93
WifiUpdateRequest describes the request to update the Wifi credentials
type WifiUpdateResponse ¶ added in v1.0.93
type WifiUpdateResponse struct { Status int `json:"status"` Description string `json:"description"` }
WifiUpdateResponse describes the response to update the Wifi credentials