Documentation ¶
Index ¶
- func CheckInternetConnection(interfaceName string) bool
- type BatteryReading
- type ManagementAPI
- func (api *ManagementAPI) AudioRecordingStatus(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) CheckModemInternetConnection(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) CheckSaltConnection(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) CheckWifiInternetConnection(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) ClearConfigSection(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) ConnectToWifi(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) DeleteEvents(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) DeleteRecording(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) DeleteWifiNetwork(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) DisconnectFromWifi(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) DownloadAudioFile(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) EnableHotspot(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) EnableWifi(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) ForgetWifiNetwork(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetAudioRecording(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetAudioRecordings(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetAudiobait(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetBattery(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetClock(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetClockTC2(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetConfig(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetConnectionStatus(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetCurrentWifiNetwork(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetDeviceInfo(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetEventKeys(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetEvents(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetLocation(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetModem(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetNetworkInterfaces(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetRecording(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetRecordings(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetSaltAutoUpdate(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetSaltGrains(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetSaltUpdateState(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetSavedWifiNetworks(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetServiceLogs(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetServiceStatus(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetSignalStrength(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetTestVideos(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetVersion(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) GetWifiNetworks(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) ManageHotspot()
- func (api *ManagementAPI) ModemStayOnFor(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) PlayAudiobaitSound(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) PlayTestSound(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) PlayTestVideo(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) PostClock(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) PostClockTC2(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) PostSaltAutoUpdate(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) PostWifiNetwork(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) Reboot(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) Reregister(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) ReregisterAuthorized(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) RestartService(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) SaveWifiNetwork(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) ScanWifiNetwork(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) SetAPN(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) SetAudioRecording(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) SetConfig(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) SetLocation(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) SetSaltGrains(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) StartSaltUpdate(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) StopHotspotTimer()
- func (api *ManagementAPI) TakeSnapshot(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) TakeSnapshotRecording(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) TakeTestAudioRecording(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) TriggerTrap(w http.ResponseWriter, r *http.Request)
- func (api *ManagementAPI) UploadLogs(w http.ResponseWriter, r *http.Request)
- type VideoRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckInternetConnection ¶ added in v1.21.0
CheckInternetConnection checks if a specified network interface has internet access
Types ¶
type BatteryReading ¶ added in v1.21.0
type ManagementAPI ¶
type ManagementAPI struct {
// contains filtered or unexported fields
}
func (*ManagementAPI) AudioRecordingStatus ¶ added in v1.25.0
func (api *ManagementAPI) AudioRecordingStatus(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) CheckModemInternetConnection ¶ added in v1.21.0
func (api *ManagementAPI) CheckModemInternetConnection(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) CheckSaltConnection ¶ added in v1.7.0
func (api *ManagementAPI) CheckSaltConnection(w http.ResponseWriter, r *http.Request)
CheckSaltConnection will try to ping the salt server and return the response
func (*ManagementAPI) CheckWifiInternetConnection ¶ added in v1.21.0
func (api *ManagementAPI) CheckWifiInternetConnection(w http.ResponseWriter, r *http.Request)
Check Wifi Connection
func (*ManagementAPI) ClearConfigSection ¶
func (api *ManagementAPI) ClearConfigSection(w http.ResponseWriter, r *http.Request)
ClearConfigSection will delete the config from a section so the default values will be used.
func (*ManagementAPI) ConnectToWifi ¶ added in v1.21.0
func (api *ManagementAPI) ConnectToWifi(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) DeleteEvents ¶
func (api *ManagementAPI) DeleteEvents(w http.ResponseWriter, r *http.Request)
DeleteEvent takes an array of event keys ([]uint64) and will delete all given events.
func (*ManagementAPI) DeleteRecording ¶
func (api *ManagementAPI) DeleteRecording(w http.ResponseWriter, r *http.Request)
DeleteRecording deletes the given recording file id
func (*ManagementAPI) DeleteWifiNetwork ¶ added in v1.21.0
func (api *ManagementAPI) DeleteWifiNetwork(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) DisconnectFromWifi ¶ added in v1.21.0
func (api *ManagementAPI) DisconnectFromWifi(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) DownloadAudioFile ¶ added in v1.21.0
func (api *ManagementAPI) DownloadAudioFile(w http.ResponseWriter, r *http.Request)
DownloadAudioFile downloads an audio file
func (*ManagementAPI) EnableHotspot ¶ added in v1.21.0
func (api *ManagementAPI) EnableHotspot(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) EnableWifi ¶ added in v1.21.0
func (api *ManagementAPI) EnableWifi(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) ForgetWifiNetwork ¶ added in v1.24.2
func (api *ManagementAPI) ForgetWifiNetwork(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetAudioRecording ¶ added in v1.25.0
func (api *ManagementAPI) GetAudioRecording(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetAudioRecordings ¶ added in v1.34.0
func (api *ManagementAPI) GetAudioRecordings(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetAudiobait ¶ added in v1.8.0
func (api *ManagementAPI) GetAudiobait(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetBattery ¶ added in v1.21.0
func (api *ManagementAPI) GetBattery(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetClock ¶
func (api *ManagementAPI) GetClock(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetClockTC2 ¶ added in v1.21.0
func (api *ManagementAPI) GetClockTC2(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetConfig ¶
func (api *ManagementAPI) GetConfig(w http.ResponseWriter, r *http.Request)
GetConfig will return the config settings and the defaults
func (*ManagementAPI) GetConnectionStatus ¶ added in v1.21.0
func (api *ManagementAPI) GetConnectionStatus(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetCurrentWifiNetwork ¶ added in v1.21.0
func (api *ManagementAPI) GetCurrentWifiNetwork(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetDeviceInfo ¶
func (api *ManagementAPI) GetDeviceInfo(w http.ResponseWriter, r *http.Request)
GetDeviceInfo returns information about this device
func (*ManagementAPI) GetEventKeys ¶
func (api *ManagementAPI) GetEventKeys(w http.ResponseWriter, r *http.Request)
GetEventKeys will return an array of the event keys on the device
func (*ManagementAPI) GetEvents ¶
func (api *ManagementAPI) GetEvents(w http.ResponseWriter, r *http.Request)
GetEvents takes an array of keys ([]uint64) and will return a JSON of the results.
func (*ManagementAPI) GetLocation ¶ added in v1.15.0
func (api *ManagementAPI) GetLocation(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetModem ¶ added in v1.18.0
func (api *ManagementAPI) GetModem(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetNetworkInterfaces ¶ added in v1.21.0
func (api *ManagementAPI) GetNetworkInterfaces(w http.ResponseWriter, r *http.Request)
Network API
func (*ManagementAPI) GetRecording ¶
func (api *ManagementAPI) GetRecording(w http.ResponseWriter, r *http.Request)
GetRecording downloads a recordings
func (*ManagementAPI) GetRecordings ¶
func (api *ManagementAPI) GetRecordings(w http.ResponseWriter, r *http.Request)
GetRecordings returns a list of recordings in a array.
func (*ManagementAPI) GetSaltAutoUpdate ¶ added in v1.9.0
func (api *ManagementAPI) GetSaltAutoUpdate(w http.ResponseWriter, r *http.Request)
GetSaltAutoUpdate will check if salt auto update is enabled
func (*ManagementAPI) GetSaltGrains ¶ added in v1.34.0
func (api *ManagementAPI) GetSaltGrains(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetSaltUpdateState ¶ added in v1.7.2
func (api *ManagementAPI) GetSaltUpdateState(w http.ResponseWriter, r *http.Request)
GetSaltUpdateState will get the salt update status
func (*ManagementAPI) GetSavedWifiNetworks ¶ added in v1.24.2
func (api *ManagementAPI) GetSavedWifiNetworks(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetServiceLogs ¶ added in v1.8.0
func (api *ManagementAPI) GetServiceLogs(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetServiceStatus ¶ added in v1.8.0
func (api *ManagementAPI) GetServiceStatus(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetSignalStrength ¶
func (api *ManagementAPI) GetSignalStrength(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetTestVideos ¶ added in v1.21.0
func (api *ManagementAPI) GetTestVideos(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetVersion ¶
func (api *ManagementAPI) GetVersion(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) GetWifiNetworks ¶ added in v1.21.0
func (api *ManagementAPI) GetWifiNetworks(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) ManageHotspot ¶ added in v1.21.0
func (api *ManagementAPI) ManageHotspot()
func (*ManagementAPI) ModemStayOnFor ¶ added in v1.21.0
func (api *ManagementAPI) ModemStayOnFor(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) PlayAudiobaitSound ¶ added in v1.8.0
func (api *ManagementAPI) PlayAudiobaitSound(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) PlayTestSound ¶ added in v1.8.0
func (api *ManagementAPI) PlayTestSound(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) PlayTestVideo ¶ added in v1.21.0
func (api *ManagementAPI) PlayTestVideo(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) PostClock ¶
func (api *ManagementAPI) PostClock(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) PostClockTC2 ¶ added in v1.21.0
func (api *ManagementAPI) PostClockTC2(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) PostSaltAutoUpdate ¶ added in v1.9.0
func (api *ManagementAPI) PostSaltAutoUpdate(w http.ResponseWriter, r *http.Request)
PostSaltAutoUpdate will set if auto update is enabled or not
func (*ManagementAPI) PostWifiNetwork ¶ added in v1.21.0
func (api *ManagementAPI) PostWifiNetwork(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) Reboot ¶
func (api *ManagementAPI) Reboot(w http.ResponseWriter, r *http.Request)
Reboot will reboot the device after a delay so a response can be sent back
func (*ManagementAPI) Reregister ¶
func (api *ManagementAPI) Reregister(w http.ResponseWriter, r *http.Request)
Reregister can change the devices name and group
func (*ManagementAPI) ReregisterAuthorized ¶ added in v1.24.2
func (api *ManagementAPI) ReregisterAuthorized(w http.ResponseWriter, r *http.Request)
Reregister can change the devices name and group
func (*ManagementAPI) RestartService ¶ added in v1.8.0
func (api *ManagementAPI) RestartService(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) SaveWifiNetwork ¶ added in v1.24.2
func (api *ManagementAPI) SaveWifiNetwork(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) ScanWifiNetwork ¶ added in v1.21.0
func (api *ManagementAPI) ScanWifiNetwork(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) SetAPN ¶ added in v1.25.0
func (api *ManagementAPI) SetAPN(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) SetAudioRecording ¶ added in v1.25.0
func (api *ManagementAPI) SetAudioRecording(w http.ResponseWriter, r *http.Request)
SetAudioRecording is for specifically writing to audio recording setting.
func (*ManagementAPI) SetConfig ¶ added in v1.7.0
func (api *ManagementAPI) SetConfig(w http.ResponseWriter, r *http.Request)
SetConfig is a way of writing new config to the device. It can only update one section at a time
func (*ManagementAPI) SetLocation ¶
func (api *ManagementAPI) SetLocation(w http.ResponseWriter, r *http.Request)
SetLocation is for specifically writing to location setting.
func (*ManagementAPI) SetSaltGrains ¶ added in v1.34.0
func (api *ManagementAPI) SetSaltGrains(w http.ResponseWriter, r *http.Request)
SetSaltGrains handles the HTTP request to set the grains from a JSON payload
func (*ManagementAPI) StartSaltUpdate ¶ added in v1.7.2
func (api *ManagementAPI) StartSaltUpdate(w http.ResponseWriter, r *http.Request)
StartSaltUpdate will start a salt update process if not already running
func (*ManagementAPI) StopHotspotTimer ¶ added in v1.21.0
func (api *ManagementAPI) StopHotspotTimer()
func (*ManagementAPI) TakeSnapshot ¶
func (api *ManagementAPI) TakeSnapshot(w http.ResponseWriter, r *http.Request)
TakeSnapshot will request a new snapshot to be taken by thermal-recorder
func (*ManagementAPI) TakeSnapshotRecording ¶ added in v1.13.0
func (api *ManagementAPI) TakeSnapshotRecording(w http.ResponseWriter, r *http.Request)
TakeSnapshotRecording will request a new snapshot recording to be taken by thermal-recorder
func (*ManagementAPI) TakeTestAudioRecording ¶ added in v1.25.0
func (api *ManagementAPI) TakeTestAudioRecording(w http.ResponseWriter, r *http.Request)
func (*ManagementAPI) TriggerTrap ¶ added in v1.14.0
func (api *ManagementAPI) TriggerTrap(w http.ResponseWriter, r *http.Request)
Trigger trap
func (*ManagementAPI) UploadLogs ¶ added in v1.21.3
func (api *ManagementAPI) UploadLogs(w http.ResponseWriter, r *http.Request)
type VideoRequest ¶ added in v1.21.0
type VideoRequest struct {
Video string `json:"video"`
}