mock

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeServiceMessaging

type FakeServiceMessaging struct {
	NotifyFn func(
		ctx context.Context,
		topicID string,
		uid string,
		flavour feedlib.Flavour,
		payload feedlib.Element,
		metadata map[string]interface{},
	) error

	// Ask the notification service about the topics that it knows about
	TopicIDsFn func() []string

	SubscriptionIDsFn func() map[string]string

	ReverseSubscriptionIDsFn func() map[string]string
	PushFn                   func(
		ctx context.Context,
		sender string,
		payload firebasetools.SendNotificationPayload,
	) error
}

FakeServiceMessaging is a mock implementation of the "messaging" service

func (*FakeServiceMessaging) Notify

func (f *FakeServiceMessaging) Notify(
	ctx context.Context,
	topicID string,
	uid string,
	flavour feedlib.Flavour,
	payload feedlib.Element,
	metadata map[string]interface{},
) error

Notify Sends a message to a topic

func (*FakeServiceMessaging) Push added in v0.0.21

Push sends push notifications

func (*FakeServiceMessaging) ReverseSubscriptionIDs

func (f *FakeServiceMessaging) ReverseSubscriptionIDs() map[string]string

ReverseSubscriptionIDs get Reverse Subscription IDs

func (*FakeServiceMessaging) SubscriptionIDs

func (f *FakeServiceMessaging) SubscriptionIDs() map[string]string

SubscriptionIDs gets subscription IDs

func (*FakeServiceMessaging) TopicIDs

func (f *FakeServiceMessaging) TopicIDs() []string

TopicIDs gets topic IDs

Jump to

Keyboard shortcuts

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