All notable changes to webpush-go will be documented in this file.
- Update the
Keys
struct definition to storeAuth
as[16]byte
andP256dh
as*ecdh.PublicKey
Keys
can no longer be compared with==
; use(*Keys.Equal)
instead- The JSON representation has not changed and is backwards and forwards compatible with v1
DecodeSubscriptionKeys
is a helper to decode base64-encoded auth and p256dh parameters into aKeys
, with validation
- Update the
VAPIDKeys
struct to contain a(*ecdsa.PrivateKey)
VAPIDKeys
can no longer be compared with==
; use(*VAPIDKeys).Equal
instead- The JSON representation is now a JSON string containing the PEM of the PKCS8-encoded private key
- To parse the legacy representation (raw bytes of the private key encoded in base64), use
DecodeLegacyVAPIDPrivateKey
- Renamed
SendNotificationWithContext
toSendNotification
, removing the earlierSendNotification
API. (Passcontext.Background()
as the context to restore the former behavior.)