Version: v0.13.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2018 License: MIT Imports: 12 Imported by: 0



Package pushpackage creates website push packages and wallet pass packages.



This section is empty.


This section is empty.


This section is empty.


type Package

type Package struct {
	// contains filtered or unexported fields

Package for website push package or wallet pass package.

func New

func New(w io.Writer) Package

New push package will be written to w.

func (*Package) Copy

func (p *Package) Copy(name string, r io.Reader)

Copy reader to the push package.

func (*Package) EncodeJSON

func (p *Package) EncodeJSON(name string, e interface{})

EncodeJSON to the push package.

func (*Package) Error

func (p *Package) Error() error

Error that occurred while adding files to the push package.

func (*Package) File

func (p *Package) File(name, src string)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL