Documentation ¶
Overview ¶
Package payload serializes a JSON payload to push.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APS ¶
type APS struct { // Alert dictionary. Alert Alert // Badge to display on the app icon. // Set to badge.Preserve (default), badge.Clear // or a specific value with badge.New(n). Badge badge.Badge // The name of a sound file to play as an alert. Sound string // Content available apps launched in the background or resumed... ContentAvailable bool // Category identifier for custom actions in iOS 8 or newer. Category string }
APS is Apple's reserved namespace.
func (*APS) Map ¶
Map returns the APS payload as a map that you can customize before serializing it to JSON. TODO: Make this map implement json.Marshaler for use with Service.Push.
func (APS) MarshalJSON ¶
MarshalJSON allows you to json.Marshal(aps) directly.
type Alert ¶
type Alert struct { // Title is a short string shown briefly on Apple Watch in iOS 8.2 or newer. Title string `json:"title,omitempty"` Body string `json:"body,omitempty"` Action string `json:"action,omitempty"` LocKey string `json:"loc-key,omitempty"` LocArgs []string `json:"loc-args,omitempty"` ActionLocKey string `json:"action-loc-key,omitempty"` LaunchImage string `json:"launch-image,omitempty"` }
Alert dictionary.
Click to show internal directories.
Click to hide internal directories.