api

package
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManagementAPI

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

func NewAPI

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

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

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

GetConfig will return the config settings and the defaults

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) 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) 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) 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) 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) RestartService added in v1.8.0

func (api *ManagementAPI) RestartService(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) 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) 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

Jump to

Keyboard shortcuts

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