browser

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBrowserPushKeys

func GenerateBrowserPushKeys() (string, string, error)

GenerateBrowserPushKeys will create the VAPID keys required for web push notifications.

Types

type Browser

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

Browser is an instance of the Browser service.

func New

func New(datastore *data.Datastore, publicKey, privateKey string) (*Browser, error)

New will create a new instance of the Browser service.

func (*Browser) Send

func (b *Browser) Send(
	subscription string,
	title string,
	body string,
) (bool, error)

Send will send a browser push notification to the given subscription.

Jump to

Keyboard shortcuts

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