fcm

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoConfig is returned when no configuration is provided.
	ErrNoConfig = errors.New("fcm: no configuration provided")
	// ErrNoDeviceTokens is returned when no device tokens are provided.
	ErrNoDeviceTokens = errors.New("fcm: no device tokens provided")
)

Functions

This section is empty.

Types

type FCM

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

FCM is a notifier for Firebase Cloud Messaging.

func New

func New(client fcmClient, opts ...Opt) *FCM

New creates a new FCM.

func (*FCM) Notify

func (f *FCM) Notify(ctx context.Context, title, message string, config ...notify.Config) error

Notify sends a notification with the given title and message.

type Opt

type Opt func(*FCM)

Opt is a functional option for configuring FCM.

Jump to

Keyboard shortcuts

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