pushworker

package
v0.0.0-...-3e1c22f Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeliverPush

func DeliverPush(ctx context.Context, m PubSubMessage) error

DeliverPush consumes a Pub/Sub message and delivers push notification via firebase cloud messaging.

Types

type PubSubMessage

type PubSubMessage struct {
	Data []byte `json:"data"`
}

PubSubMessage is the payload of a Pub/Sub event.

type PushNotification

type PushNotification struct {
	FCMToken  string            `json:"fcm_token"`
	Title     string            `json:"title"`
	Body      string            `json:"body"`
	Data      map[string]string `json:"data"`
	Topic     string            `json:"topic"`
	Condition string            `json:"condition"`
}

PushNotification represents push notification.

Jump to

Keyboard shortcuts

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