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
Click to show internal directories.
Click to hide internal directories.