utils

package
v0.0.0-...-3a2ea49 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatteryHasPowerSupply

func BatteryHasPowerSupply() (bool, error)

func GetAndSend

func GetAndSend(configFileName string) (bool, error)

func SendDataToServer

func SendDataToServer(data Indicator, serverURL string) error

Types

type Config

type Config struct {
	LocationID   string `json:"location_id"`
	LocationName string `json:"location_name"`
	ServerURL    string `json:"server_url"`
}

type Indicator

type Indicator struct {
	ElectricityStatus bool   `json:"estatus"`
	LocationName      string `json:"location_name"`
	LocationID        string `json:"location_id"`
	CurrentTime       string `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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