ntfy-server/webpush/types.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
489 B
Go
Raw Permalink Normal View History

2026-02-16 20:02:19 -05:00
package webpush
import "heckel.io/ntfy/v2/log"
// Subscription represents a web push subscription.
type Subscription struct {
ID string
Endpoint string
Auth string
P256dh string
UserID string
}
// Context returns the logging context for the subscription.
func (w *Subscription) Context() log.Context {
return map[string]any{
"web_push_subscription_id": w.ID,
"web_push_subscription_user_id": w.UserID,
"web_push_subscription_endpoint": w.Endpoint,
}
}