Documentation
¶
Overview ¶
Package push is the web-push (VAPID) notification sink. It degrades to a no-op until keys are configured, so a fresh install never fails on it.
The payload is encrypted with RFC 8291 aes128gcm and authorised with an RFC 8292 VAPID JWT. Implemented directly on crypto/* rather than pulling a dependency: it is ~120 lines and the alternative is another module to audit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sender ¶
type Sender struct {
PrivateKey string // base64url raw P-256 scalar
PublicKey string // base64url uncompressed P-256 point
Email string
Client *http.Client
Log *slog.Logger
}
Sender holds the VAPID identity.
type Subscription ¶
Subscription is a browser's push endpoint plus its encryption keys.