Versions in this module Expand all Collapse all v1 v1.0.0 Nov 21, 2023 Changes in this version + const MaxRecordSize + var ErrMaxPadExceeded = errors.New("payload has exceeded the maximum length") + func GenerateVAPIDKeys() (privateKey, publicKey string, err error) + func SendNotification(message []byte, s *Subscription, options *Options) (*http.Response, error) + func SendNotificationWithContext(ctx context.Context, message []byte, s *Subscription, options *Options) (*http.Response, error) + type HTTPClient interface + Do func(*http.Request) (*http.Response, error) + type Keys struct + Auth string + P256dh string + type Options struct + HTTPClient HTTPClient + RecordSize uint32 + Subscriber string + TTL int + Topic string + Urgency Urgency + VAPIDPrivateKey string + VAPIDPublicKey string + VapidExpiration time.Time + type Subscription struct + Endpoint string + Keys Keys + type Urgency string + const UrgencyHigh + const UrgencyLow + const UrgencyNormal + const UrgencyVeryLow