Documentation ¶
Overview ¶
Package push sends notifications over HTTP/2 to Apple's Push Notification Service.
Index ¶
Constants ¶
View Source
const ( Sandbox = "https://api.sandbox.push.apple.com" Live = "https://api.push.apple.com" )
Apple host locations.
Variables ¶
View Source
var ( ErrBadDeviceToken = errors.New("bad device token") ErrForbidden = errors.New("forbidden, check your certificate") )
Service error responses.
Functions ¶
Types ¶
type Headers ¶
type Headers struct { // ID for the notification. Apple generates one if ommitted. // This should be a UUID with 32 lowercase hexadecimal digits. // TODO: use a UUID type. ID string // Apple will retry delivery until this time. The default behavior only tries once. Expiration time.Time // Allow Apple to group messages to together to reduce power consumption. // By default messages are sent immediately. LowPriority bool // Topic is the bundle ID for your app. Topic string }
Headers sent with a push to control the notification (optional)
Click to show internal directories.
Click to hide internal directories.