Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultTTL = 4 * 7 * 24 * 60 * 60
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subscription ¶
type Subscription struct { Endpoint string `json:"endpoint"` Keys SubscriptionKeys `json:"keys"` }
type SubscriptionKeys ¶
type VapidDetails ¶
type VapidKeys ¶
func GenerateVapidKeys ¶
type WebPushClient ¶
type WebPushClient struct {
// contains filtered or unexported fields
}
func DefaultWebPushClient ¶
func DefaultWebPushClient() *WebPushClient
func NewWebPushClient ¶
func NewWebPushClient(httpClient HTTPClient, jwtSigner auth.WebPushJwtSigner, encoder ece.WebPushEncoder) *WebPushClient
func (*WebPushClient) Send ¶
func (c *WebPushClient) Send(payload []byte, info *WebPushInfo, options *WebPushOptions) (*http.Response, error)
type WebPushInfo ¶
type WebPushInfo struct { Subscription Subscription VapidDetails VapidDetails }
type WebPushOptions ¶
Click to show internal directories.
Click to hide internal directories.