conversion

package
v1.0.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidIncomingDataType    = errors.New("invalid incoming data type")
	ErrInvalidOutgoingDataType    = errors.New("invalid outgoing data type")
	ErrInvalidIncomingPayloadData = errors.New("invalid incoming payload data")
	ErrEmptyEncryptedPayload      = errors.New("encrypted push without encrypted data")
	ErrNotSupportedAlertPush      = errors.New("alerting pushes are not supported for FCM")
)

Functions

func ErrorByIncomingMessage

func ErrorByIncomingMessage(body *api.PushBody) error

func PeerTypeProtobufToMPS

func PeerTypeProtobufToMPS(peerType api.PeerType) int

func RequestPbToAns

func RequestPbToAns(in *api.PushBody, supportsVoIP, allowAlerts bool, topic, sound *string) (*ans.Request, error)

func RequestPbToFcm

func RequestPbToFcm(in *api.PushBody, allowAlerts bool) (*fcm.Message, error)

func RequestPbToGcm

func RequestPbToGcm(in *api.PushBody, allowAlerts bool) (*gcm.Request, error)

Types

type Config

type Config struct {
	AllowAlerts bool   `mapstructure:"allow-alerts"`
	Sound       string `mapstructure:"sound"`
	Topic       string `mapstructure:"topic"`
}

Jump to

Keyboard shortcuts

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