pushpackage

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2016 License: MIT Imports: 12 Imported by: 0

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 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
y or Y : Canonical URL