fcm

package
v0.0.0-...-83e654d Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuccessFCMResponse = `` /* 208-byte string literal not displayed */

	ErrorFCMResponse = `` /* 277-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func CreateFcmSender

func CreateFcmSender(body string, doneC chan bool, to time.Duration) (connector.Sender, error)

func New

func New(router router.Router, sender connector.Sender, config Config) (connector.ResponsiveConnector, error)

New creates a new *fcm and returns it as an connector.ResponsiveConnector

func NewSender

func NewSender(apiKey string) *sender

func NewSenderWithMock

func NewSenderWithMock(gcmSender gcm.Sender) *sender

Types

type Config

type Config struct {
	Enabled              *bool
	APIKey               *string
	Workers              *int
	Endpoint             *string
	Prefix               *string
	IntervalMetrics      *bool
	AfterMessageDelivery protocol.MessageDeliveryCallback
}

Config is used for configuring the Firebase Cloud Messaging component.

type FCMSender

type FCMSender func(message *gcm.Message) (*gcm.Response, error)

func (FCMSender) Send

func (fcms FCMSender) Send(message *gcm.Message) (*gcm.Response, error)

Jump to

Keyboard shortcuts

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