Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Get ¶
type Get struct {
IDs []jmap.ID `json:"ids,omitempty"`
Properties []string `json:"properties,omitempty"`
}
Get push subscription details https://www.rfc-editor.org/rfc/rfc8620.html#section-7.2.1
type GetResponse ¶
type GetResponse struct {
List []*PushSubscription `json:"list,omitempty"`
NotFound []jmap.ID `json:"notFound,omitempty"`
}
type Key ¶
type Key struct {
// The public key, base64 encoded
Public string `json:"p256dh"`
// The authentication secret, base64 encoded
Auth string `json:"auth"`
}
A Push Subscription Encryption key. This key must be a P-256 ECDH key
type PushSubscription ¶
type PushSubscription struct {
ID jmap.ID `json:"id,omitempty"`
DeviceClientID string `json:"deviceClientId,omitempty"`
URL string `json:"url,omitempty"`
Keys *Key `json:"keys,omitempty"`
VerificationCode string `json:"verificationCode,omitempty"`
Expires *time.Time `json:"expires,omitempty"`
Types []string `json:"types,omitempty"`
}
Server side push notification https://www.rfc-editor.org/rfc/rfc8620.html#section-7.2
type Set ¶
type Set struct {
Create map[jmap.ID]*PushSubscription `json:"create,omitempty"`
Update map[jmap.ID]*jmap.Patch `json:"update,omitempty"`
Destroy []jmap.ID `json:"destroy,omitempty"`
}
Modify push subscription details https://www.rfc-editor.org/rfc/rfc8620.html#section-7.2.2
type SetResponse ¶
type SetResponse struct {
Created map[jmap.ID]*PushSubscription `json:"created,omitempty"`
Updated map[jmap.ID]*PushSubscription `json:"updated,omitempty"`
Destroyed []jmap.ID `json:"destroyed,omitempty"`
NotCreated map[jmap.ID]*jmap.SetError `json:"notCreated,omitempty"`
NotUpdated map[jmap.ID]*jmap.SetError `json:"notUpdated,omitempty"`
NotDestroyed map[jmap.ID]*jmap.SetError `json:"notDestroyed,omitempty"`
}
type Verification ¶
type Verification struct {
// The MUST be "PushVerification"
Type string `json:"@type,omitempty"`
// The ID of the Push Subscription that was created
SubscriptionID string `json:"pushSubscriptionId,omitempty"`
// The verification code to add to the subscription
Code string `json:"verificationCode,omitempty"`
}
A PushVerification object is sent by the server to the created Subscriptions' URL.
Click to show internal directories.
Click to hide internal directories.