Categorygithub.com/magaldima/push-go
modulepackage
1.1.0
Repository: https://github.com/magaldima/push-go.git
Documentation: pkg.go.dev

# README

push-go

A Go implementation of the Web Push API for sending push notifications to web browsers.

Features

  • Implements the Web Push Protocol
  • Supports VAPID authentication
  • Handles encryption and payload encoding
  • Easy-to-use API for sending notifications

Installation

To install the package, use go get github.com/magaldima/push-go:

# Functions

GenerateVAPIDKeys will create a private and public VAPID key pair.
SendNotification calls SendNotificationWithContext with default context for backwards-compatibility.
SendNotificationWithContext sends a push notification to a subscription's endpoint Message Encryption for Web Push, and VAPID protocols.

# Constants

No description provided by the author
UrgencyHigh admits device state: low battery.
UrgencyLow requires device state: on either power or Wi-Fi.
UrgencyNormal excludes device state: low battery.
UrgencyVeryLow requires device state: on power and Wi-Fi.

# Variables

No description provided by the author

# Structs

Keys are the base64 encoded values from PushSubscription.getKey().
Options are config and extra params needed to send a notification.
Subscription represents a PushSubscription object from the Push API.

# Type aliases

Urgency indicates to the push service how important a message is to the user.