fcm

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package fcm provides an in-memory mock implementation of GCP Firebase Cloud Messaging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

Mock is an in-memory mock implementation of GCP Firebase Cloud Messaging.

func New

func New(opts *config.Options) *Mock

New creates a new FCM mock with the given configuration options.

func (*Mock) CreateTopic

func (m *Mock) CreateTopic(_ context.Context, cfg driver.TopicConfig) (*driver.TopicInfo, error)

CreateTopic creates a new FCM topic.

func (*Mock) DeleteTopic

func (m *Mock) DeleteTopic(_ context.Context, id string) error

DeleteTopic deletes an FCM topic by name.

func (*Mock) GetTopic

func (m *Mock) GetTopic(_ context.Context, id string) (*driver.TopicInfo, error)

GetTopic retrieves information about an FCM topic.

func (*Mock) ListSubscriptions

func (m *Mock) ListSubscriptions(_ context.Context, topicID string) ([]driver.SubscriptionInfo, error)

ListSubscriptions lists all subscriptions for an FCM topic.

func (*Mock) ListTopics

func (m *Mock) ListTopics(_ context.Context) ([]driver.TopicInfo, error)

ListTopics lists all FCM topics.

func (*Mock) Publish

func (m *Mock) Publish(ctx context.Context, input driver.PublishInput) (*driver.PublishOutput, error)

Publish publishes a message to an FCM topic.

func (*Mock) SetMonitoring

func (m *Mock) SetMonitoring(mon mondriver.Monitoring)

SetMonitoring sets the monitoring backend for auto-metric generation.

func (*Mock) Subscribe

Subscribe creates a subscription to an FCM topic.

func (*Mock) Unsubscribe

func (m *Mock) Unsubscribe(_ context.Context, subscriptionID string) error

Unsubscribe removes a subscription.

Jump to

Keyboard shortcuts

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