alerts

package
v0.0.0-...-9bd9899 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotificationTypeAlert    = "ALERT"
	NotificationTypeReminder = "REMINDER"
)

Functions

func Init

func Init()

func SetHumidityAlertSettings

func SetHumidityAlertSettings(controllerID string, boxID int, as HumidityAlertSettings) error

func SetTemperatureAlertSettings

func SetTemperatureAlertSettings(controllerID string, boxID int, as TemperatureAlertSettings) error

Types

type HumidityAlertSettings

type HumidityAlertSettings struct {
	MinNight float64 `json:"minNight"`
	MinDay   float64 `json:"minDay"`

	MaxNight float64 `json:"maxNight"`
	MaxDay   float64 `json:"maxDay"`
}

func GetHumidityAlertSettings

func GetHumidityAlertSettings(controllerID string, boxID int) (*HumidityAlertSettings, error)

type NotificationDataAlert

type NotificationDataAlert struct {
	notifications.NotificationBaseData

	PlantID uuid.UUID `json:"plantID"`
}

func NewNotificationDataAlert

func NewNotificationDataAlert(title, body, imageUrl string, plantID uuid.UUID) (NotificationDataAlert, messaging.Notification)

func (NotificationDataAlert) ToMap

func (n NotificationDataAlert) ToMap() map[string]string

type TemperatureAlertSettings

type TemperatureAlertSettings struct {
	MinNight float64 `json:"minNight"`
	MinDay   float64 `json:"minDay"`

	MaxNight float64 `json:"maxNight"`
	MaxDay   float64 `json:"maxDay"`
}

func GetTemperatureAlertSettings

func GetTemperatureAlertSettings(controllerID string, boxID int) (*TemperatureAlertSettings, error)

Jump to

Keyboard shortcuts

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