mock

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeServiceFcm

type FakeServiceFcm struct {
	SendNotificationFn func(
		ctx context.Context,
		registrationTokens []string,
		data map[string]string,
		notification *firebasetools.FirebaseSimpleNotificationInput,
		android *firebasetools.FirebaseAndroidConfigInput,
		ios *firebasetools.FirebaseAPNSConfigInput,
		web *firebasetools.FirebaseWebpushConfigInput,
	) (bool, error)

	NotificationsFn func(
		ctx context.Context,
		registrationToken string,
		newerThan time.Time,
		limit int,
	) ([]*dto.SavedNotification, error)

	SendFCMByPhoneOrEmailFn func(
		ctx context.Context,
		phoneNumber *string,
		email *string,
		data map[string]interface{},
		notification firebasetools.FirebaseSimpleNotificationInput,
		android *firebasetools.FirebaseAndroidConfigInput,
		ios *firebasetools.FirebaseAPNSConfigInput,
		web *firebasetools.FirebaseWebpushConfigInput,
	) (bool, error)
}

FakeServiceFcm simulates the behavior of our FCM push implementation

func (*FakeServiceFcm) Notifications added in v0.0.17

func (f *FakeServiceFcm) Notifications(
	ctx context.Context,
	registrationToken string,
	newerThan time.Time,
	limit int,
) ([]*dto.SavedNotification, error)

Notifications is a mock of the Notifications method

func (*FakeServiceFcm) SendFCMByPhoneOrEmail added in v0.0.17

SendFCMByPhoneOrEmail is a mock of the SendFCMByPhoneOrEmail method

func (*FakeServiceFcm) SendNotification added in v0.0.17

SendNotification is a mock of the SendNotification method

Jump to

Keyboard shortcuts

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