api

package
v1.24.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckInternetConnection added in v1.21.0

func CheckInternetConnection(interfaceName string) bool

CheckInternetConnection checks if a specified network interface has internet access

func EnableAllSavedNetworks added in v1.24.2

func EnableAllSavedNetworks() error

Types

type ManagementAPI

type ManagementAPI struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(router *mux.Router, config *goconfig.Config, appVersion string) (*ManagementAPI, error)

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 cptv file

func (*ManagementAPI) DisconnectFromWifi added in v1.21.0

func (api *ManagementAPI) DisconnectFromWifi(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) GetAudiobait added in v1.8.0

func (api *ManagementAPI) GetAudiobait(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) 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 cptv file

func (*ManagementAPI) GetRecordings

func (api *ManagementAPI) GetRecordings(w http.ResponseWriter, r *http.Request)

GetRecordings returns a list of cptv files 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) 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) 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 (server *ManagementAPI) ManageHotspot()

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) 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) 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)

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) 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) StartHotspotTimer added in v1.21.0

func (s *ManagementAPI) StartHotspotTimer()

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 (s *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) 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL