Documentation
¶
Overview ¶
Package pushpackage creates website push packages and wallet pass packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
Package for website push package or wallet pass package.
func (*Package) EncodeJSON ¶
EncodeJSON to the push package.
func (*Package) File ¶
File writes a file to the push package.
NOTE: Name is a relative path. Only forward slashes are allowed.
func (*Package) Sign ¶
func (p *Package) Sign(cert tls.Certificate, wwdr *x509.Certificate) error
Sign the package and close. Passbook needs Apple's intermediate WWDR certificate.
type Website ¶
type Website struct {
// Website Name shown in the Notification Center.
Name string `json:"websiteName"`
// Website Push ID (eg. web.com.domain)
PushID string `json:"websitePushID"`
// Websites that can request permission from the user.
AllowedDomains []string `json:"allowedDomains"`
// http(s) URL for clicked notifications with %@ placeholders.
URLFormatString string `json:"urlFormatString"`
// A 16+ character string to identify the user.
AuthenticationToken string `json:"authenticationToken"`
// Location of your web service. Must be HTTPS.
// Don't include a trailing slash.
WebServiceURL string `json:"webServiceURL"`
}
Website JSON for creating a push package.
Click to show internal directories.
Click to hide internal directories.