push

package
v0.0.0-...-4a248c4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is the struct containing the firebase app and methods for interacting with messaging

func NewService

func NewService(ctx context.Context, firebaseProjectID string, queries *sqlc.Queries) (*Service, error)

NewService returns a new instance of the push service

func (*Service) PushNotificationToEveryone

func (s *Service) PushNotificationToEveryone(ctx context.Context, notification common.Notification) error

PushNotificationToEveryone pushes a notification to every registered device

func (*Service) SendNotificationToDevices

func (s *Service) SendNotificationToDevices(ctx context.Context, devices []common.Device, notification common.Notification) error

SendNotificationToDevices sends a push notification to the specified tokens

Jump to

Keyboard shortcuts

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