push

package module
v0.0.0-...-e1bfb01 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

README

Zero-push

Zero-Push is a Berty component used to send push notifications from a server without a central token repository.

berty.techTwitterGitHub

🚧 Work in progress 🚧

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAndParsePrivateKey

func LoadAndParsePrivateKey(path string) (*rsa.PrivateKey, error)

Types

type Dispatcher

type Dispatcher interface {
	CanDispatch(*proto.PushDestination) bool
	Dispatch(*proto.PushData, *proto.PushDestination) error
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(tokenDecrypter crypto.Decrypter, dispatchers ...Dispatcher) *Manager

func (*Manager) Decrypt

func (m *Manager) Decrypt(msg []byte) (plaintext []byte, err error)

func (*Manager) Dispatch

func (m *Manager) Dispatch(pushData *proto.PushData, pushDestination *proto.PushDestination) error

func (*Manager) PushTo

func (m *Manager) PushTo(ctx context.Context, pushAttrs *proto.PushData) error

Directories

Path Synopsis
cmd
proto
providers
fcm

Jump to

Keyboard shortcuts

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