notifications

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BrowserPushNotification represents a push notification for a browser.
	BrowserPushNotification = "BROWSER_PUSH_NOTIFICATION"
)

Variables

This section is empty.

Functions

func AddNotification

func AddNotification(channel, destination string) error

AddNotification saves a new user notification destination.

func GetNotificationDestinationsForChannel

func GetNotificationDestinationsForChannel(channel string) ([]string, error)

GetNotificationDestinationsForChannel will return a collection of destinations to notify for a given channel.

func RemoveNotificationForChannel

func RemoveNotificationForChannel(channel, destination string) error

RemoveNotificationForChannel removes a notification destination.

func Setup

func Setup(datastore *data.Datastore)

Setup will perform any pre-use setup for the notifier.

Types

type Notifier

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

Notifier is an instance of the live stream notifier.

func New

func New(datastore *data.Datastore) (*Notifier, error)

New creates a new instance of the Notifier.

func (*Notifier) Notify

func (n *Notifier) Notify()

Notify will fire the different notification channels.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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