notify

package
v0.0.0-...-276f924 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP = "http"
	MQTT = "mqtt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	Title    string `json:"title"`
	Body     string `json:"body"`
	Topic    string `json:"topic"`
	SentFrom string `json:"sentFrom"`
	Source   string `json:"source"`
}

type Notifier

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

func NewNotifier

func NewNotifier(config *config.Config, client *mqtt.Client) *Notifier

func (*Notifier) SendNotificationToAll

func (n *Notifier) SendNotificationToAll(notification Notification)

func (*Notifier) SendNotificationToTopic

func (n *Notifier) SendNotificationToTopic(notification Notification)

Jump to

Keyboard shortcuts

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