pushkit

package
v1.1.7-0...-d08fa44 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Development = "gateway.sandbox.push.apple.com:2195"
	Production  = "gateway.push.apple.com:2195"
)

Variables

View Source
var (
	ErrExpired = errors.New("certificate has expired or is not yet valid")
)

Functions

func Decode

func Decode(p12 []byte, password string) (tls.Certificate, error)

Decode and verify an in memory .p12 certificate (DER binary format).

func DoPushKit

func DoPushKit(p12Cert string, token string, payload map[string]string)

func Load

func Load(filename, password string) (tls.Certificate, error)

Load a .p12 certificate from disk.

Types

type PushKit

type PushKit struct {
	FileName string
	Pwd      string
	// contains filtered or unexported fields
}

func InitPushKit

func InitPushKit(filename, pwd string, isDebug bool) (*PushKit, error)

func (*PushKit) Push

func (p *PushKit) Push(token string, data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL