fcm

package
v0.16.5-beta1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: GPL-3.0 Imports: 14 Imported by: 5

Documentation

Overview

Package fcm implements push notification plugin for Google FCM backend. Push notifications for Android, iOS and web clients are sent through Google's Firebase Cloud Messaging service. Package fcm is push notification plugin using Google FCM. https://firebase.google.com/docs/cloud-messaging

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareNotifications added in v0.16.5

func PrepareNotifications(rcpt *push.Receipt, config *AndroidConfig) []messageData

PrepareNotifications creates notification payloads ready to be posted to push notification server for the provided receipt.

Types

type AndroidConfig added in v0.16.5

type AndroidConfig struct {
	Enabled bool `json:"enabled,omitempty"`

	// Configs for specific push types.
	Msg androidPayload `json:"msg,omitempty"`
	Sub androidPayload `json:"msg,omitempty"`
	// contains filtered or unexported fields
}

Configuration of AndroidNotification payload.

type Handler

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

Handler represents the push handler; implements push.PushHandler interface.

func (Handler) Init

func (Handler) Init(jsonconf string) error

Init initializes the push handler

func (Handler) IsReady

func (Handler) IsReady() bool

IsReady checks if the push handler has been initialized.

func (Handler) Push

func (Handler) Push() chan<- *push.Receipt

Push returns a channel that the server will use to send messages to. If the adapter blocks, the message will be dropped.

func (Handler) Stop

func (Handler) Stop()

Stop shuts down the handler

Jump to

Keyboard shortcuts

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