mock

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeInfrastructure

type FakeInfrastructure struct {
	GetFeedFn func(
		ctx context.Context,
		uid *string,
		isAnonymous *bool,
		flavour feedlib.Flavour,
		playMP4 bool,
		persistent feedlib.BooleanFilter,
		status *feedlib.Status,
		visibility *feedlib.Visibility,
		expired *feedlib.BooleanFilter,
		filterParams *helpers.FilterParams,
	) (*domain.Feed, error)

	// getting a the LATEST VERSION of a feed item from a feed
	GetFeedItemFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		itemID string,
	) (*feedlib.Item, error)

	// saving a new feed item
	SaveFeedItemFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		item *feedlib.Item,
	) (*feedlib.Item, error)

	// updating an existing feed item
	UpdateFeedItemFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		item *feedlib.Item,
	) (*feedlib.Item, error)

	// DeleteFeedItem permanently deletes a feed item and it's copies
	DeleteFeedItemFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		itemID string,
	) error

	// getting THE LATEST VERSION OF a nudge from a feed
	GetNudgeFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		nudgeID string,
	) (*feedlib.Nudge, error)

	// saving a new modified nudge
	SaveNudgeFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		nudge *feedlib.Nudge,
	) (*feedlib.Nudge, error)

	// updating an existing nudge
	UpdateNudgeFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		nudge *feedlib.Nudge,
	) (*feedlib.Nudge, error)

	// DeleteNudge permanently deletes a nudge and it's copies
	DeleteNudgeFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		nudgeID string,
	) error

	// getting THE LATEST VERSION OF a single action
	GetActionFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		actionID string,
	) (*feedlib.Action, error)

	// saving a new action
	SaveActionFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		action *feedlib.Action,
	) (*feedlib.Action, error)

	// DeleteAction permanently deletes an action and it's copies
	DeleteActionFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		actionID string,
	) error

	// PostMessage posts a message or a reply to a message/thread
	PostMessageFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		itemID string,
		message *feedlib.Message,
	) (*feedlib.Message, error)

	// GetMessage retrieves THE LATEST VERSION OF a message
	GetMessageFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		itemID string,
		messageID string,
	) (*feedlib.Message, error)

	// DeleteMessage deletes a message
	DeleteMessageFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		itemID string,
		messageID string,
	) error

	// GetMessages retrieves a message
	GetMessagesFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		itemID string,
	) ([]feedlib.Message, error)

	SaveIncomingEventFn func(
		ctx context.Context,
		event *feedlib.Event,
	) error

	SaveOutgoingEventFn func(
		ctx context.Context,
		event *feedlib.Event,
	) error

	GetNudgesFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		status *feedlib.Status,
		visibility *feedlib.Visibility,
		expired *feedlib.BooleanFilter,
	) ([]feedlib.Nudge, error)

	GetActionsFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
	) ([]feedlib.Action, error)

	GetItemsFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		persistent feedlib.BooleanFilter,
		status *feedlib.Status,
		visibility *feedlib.Visibility,
		expired *feedlib.BooleanFilter,
		filterParams *helpers.FilterParams,
	) ([]feedlib.Item, error)

	LabelsFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
	) ([]string, error)

	SaveLabelFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		label string,
	) error

	UnreadPersistentItemsFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
	) (int, error)

	UpdateUnreadPersistentItemsCountFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
	) error

	GetDefaultNudgeByTitleFn func(
		ctx context.Context,
		uid string,
		flavour feedlib.Flavour,
		title string,
	) (*feedlib.Nudge, error)

	SaveTwilioResponseFn func(
		ctx context.Context,
		data dto.Message,
	) error

	SaveNotificationFn func(
		ctx context.Context,
		firestoreClient *firestore.Client,
		notification dto.SavedNotification,
	) error

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

	SaveNPSResponseFn func(
		ctx context.Context,
		response *dto.NPSResponse,
	) error

	SaveTwilioVideoCallbackStatusFn func(
		ctx context.Context,
		data dto.CallbackData,
	) error

	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)

	GetFeedContentFn    func(ctx context.Context, flavour feedlib.Flavour) ([]*domain.GhostCMSPost, error)
	GetFaqsContentFn    func(ctx context.Context, flavour feedlib.Flavour) ([]*domain.GhostCMSPost, error)
	GetLibraryContentFn func(ctx context.Context) ([]*domain.GhostCMSPost, error)

	SendInBlueFn  func(ctx context.Context, subject, text string, to ...string) (string, string, error)
	SendMailgunFn func(
		ctx context.Context,
		subject, text string,
		body *string,
		to ...string,
	) (string, string, error)
	SendEmailFn func(
		ctx context.Context,
		subject, text string,
		body *string,
		to ...string,
	) (string, string, error)
	SimpleEmailFn func(
		ctx context.Context,
		subject, text string,
		body *string,
		to ...string,
	) (string, error)
	SaveOutgoingEmailsFn          func(ctx context.Context, payload *dto.OutgoingEmailsLog) error
	UpdateMailgunDeliveryStatusFn func(
		ctx context.Context,
		payload *dto.MailgunEvent,
	) (*dto.OutgoingEmailsLog, error)
	GenerateEmailTemplateFn func(name string, templateName string) string

	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

	GetEmailAddressesFn            func(ctx context.Context, uids onboarding.UserUIDs) (map[string][]string, error)
	GetPhoneNumbersFn              func(ctx context.Context, uids onboarding.UserUIDs) (map[string][]string, error)
	GetDeviceTokensFn              func(ctx context.Context, uid onboarding.UserUIDs) (map[string][]string, error)
	GetUserProfileFn               func(ctx context.Context, uid string) (*profileutils.UserProfile, error)
	GetUserProfileByPhoneOrEmailFn func(ctx context.Context, payload *dto.RetrieveUserProfileInput) (*profileutils.UserProfile, error)

	GenerateAndSendOTPFn   func(ctx context.Context, msisdn string, appID *string) (string, error)
	SendOTPToEmailFn       func(ctx context.Context, msisdn, email *string, appID *string) (string, error)
	SaveOTPToFirestoreFn   func(otp dto.OTP) error
	VerifyOtpFn            func(ctx context.Context, msisdn, verificationCode *string) (bool, error)
	VerifyEmailOtpFn       func(ctx context.Context, email, verificationCode *string) (bool, error)
	GenerateRetryOTPFn     func(ctx context.Context, msisdn *string, retryStep int, appID *string) (string, error)
	EmailVerificationOtpFn func(ctx context.Context, email *string) (string, error)
	GenerateOTPFn          func(ctx context.Context) (string, error)

	SendToManyFn func(
		ctx context.Context,
		message string,
		to []string,
		from enumutils.SenderID,
	) (*dto.SendMessageResponse, error)

	SendFn func(
		ctx context.Context,
		to, message string,
		from enumutils.SenderID,
	) (*dto.SendMessageResponse, error)

	RecordNPSResponseFn func(ctx context.Context, input dto.NPSInput) (bool, error)

	RoomFn func(ctx context.Context) (*dto.Room, error)

	TwilioAccessTokenFn func(ctx context.Context) (*dto.AccessToken, error)

	SendSMSFn func(ctx context.Context, to string, msg string) error

	UploadFn func(
		ctx context.Context,
		inp profileutils.UploadInput,
	) (*profileutils.Upload, error)

	FindUploadByIDFn func(
		ctx context.Context,
		id string,
	) (*profileutils.Upload, error)

	PhoneNumberVerificationCodeFn func(
		ctx context.Context,
		to string,
		code string,
		marketingMessage string,
	) (bool, error)

	WellnessCardActivationDependantFn func(
		ctx context.Context,
		to string,
		memberName string,
		cardName string,
		marketingMessage string,
	) (bool, error)

	WellnessCardActivationPrincipalFn func(
		ctx context.Context,
		to string,
		memberName string,
		cardName string,
		minorAgeThreshold string,
		marketingMessage string,
	) (bool, error)

	BillNotificationFn func(
		ctx context.Context,
		to string,
		productName string,
		billingPeriod string,
		billAmount string,
		paymentInstruction string,
		marketingMessage string,
	) (bool, error)

	VirtualCardsFn func(
		ctx context.Context,
		to string,
		wellnessCardFamily string,
		virtualCardLink string,
		marketingMessage string,
	) (bool, error)

	VisitStartFn func(
		ctx context.Context,
		to string,
		memberName string,
		benefitName string,
		locationName string,
		startTime string,
		balance string,
		marketingMessage string,
	) (bool, error)

	ClaimNotificationFn func(
		ctx context.Context,
		to string,
		claimReference string,
		claimTypeParenthesized string,
		provider string,
		visitType string,
		claimTime string,
		marketingMessage string,
	) (bool, error)

	PreauthApprovalFn func(
		ctx context.Context,
		to string,
		currency string,
		amount string,
		benefit string,
		provider string,
		member string,
		careContact string,
		marketingMessage string,
	) (bool, error)

	PreauthRequestFn func(
		ctx context.Context,
		to string,
		currency string,
		amount string,
		benefit string,
		provider string,
		requestTime string,
		member string,
		careContact string,
		marketingMessage string,
	) (bool, error)

	SladeOTPFn func(
		ctx context.Context,
		to string,
		name string,
		otp string,
		marketingMessage string,
	) (bool, error)
}

FakeInfrastructure mocks the infrastructure interface

func (*FakeInfrastructure) BillNotification

func (f *FakeInfrastructure) BillNotification(
	ctx context.Context,
	to string,
	productName string,
	billingPeriod string,
	billAmount string,
	paymentInstruction string,
	marketingMessage string,
) (bool, error)

BillNotification ...

func (*FakeInfrastructure) ClaimNotification

func (f *FakeInfrastructure) ClaimNotification(
	ctx context.Context,
	to string,
	claimReference string,
	claimTypeParenthesized string,
	provider string,
	visitType string,
	claimTime string,
	marketingMessage string,
) (bool, error)

ClaimNotification ...

func (*FakeInfrastructure) DeleteAction

func (f *FakeInfrastructure) DeleteAction(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	actionID string,
) error

DeleteAction permanently deletes an action and it's copies

func (*FakeInfrastructure) DeleteFeedItem

func (f *FakeInfrastructure) DeleteFeedItem(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	itemID string,
) error

DeleteFeedItem permanently deletes a feed item and it's copies

func (*FakeInfrastructure) DeleteMessage

func (f *FakeInfrastructure) DeleteMessage(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	itemID string,
	messageID string,
) error

DeleteMessage deletes a message

func (*FakeInfrastructure) DeleteNudge

func (f *FakeInfrastructure) DeleteNudge(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	nudgeID string,
) error

DeleteNudge permanently deletes a nudge and it's copies

func (*FakeInfrastructure) EmailVerificationOtp

func (f *FakeInfrastructure) EmailVerificationOtp(ctx context.Context, email *string) (string, error)

EmailVerificationOtp ...

func (*FakeInfrastructure) FindUploadByID

func (f *FakeInfrastructure) FindUploadByID(
	ctx context.Context,
	id string,
) (*profileutils.Upload, error)

FindUploadByID ...

func (*FakeInfrastructure) GenerateAndSendOTP

func (f *FakeInfrastructure) GenerateAndSendOTP(ctx context.Context, msisdn string, appID *string) (string, error)

GenerateAndSendOTP ...

func (*FakeInfrastructure) GenerateEmailTemplate

func (f *FakeInfrastructure) GenerateEmailTemplate(name string, templateName string) string

GenerateEmailTemplate ...

func (*FakeInfrastructure) GenerateOTP

func (f *FakeInfrastructure) GenerateOTP(ctx context.Context) (string, error)

GenerateOTP ...

func (*FakeInfrastructure) GenerateRetryOTP

func (f *FakeInfrastructure) GenerateRetryOTP(ctx context.Context, msisdn *string, retryStep int, appID *string) (string, error)

GenerateRetryOTP ...

func (*FakeInfrastructure) GetAction

func (f *FakeInfrastructure) GetAction(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	actionID string,
) (*feedlib.Action, error)

GetAction gets THE LATEST VERSION OF a single action

func (*FakeInfrastructure) GetActions

func (f *FakeInfrastructure) GetActions(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
) ([]feedlib.Action, error)

GetActions ...

func (*FakeInfrastructure) GetDefaultNudgeByTitle

func (f *FakeInfrastructure) GetDefaultNudgeByTitle(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	title string,
) (*feedlib.Nudge, error)

GetDefaultNudgeByTitle ...

func (*FakeInfrastructure) GetDeviceTokens

func (f *FakeInfrastructure) GetDeviceTokens(ctx context.Context, uid onboarding.UserUIDs) (map[string][]string, error)

GetDeviceTokens ...

func (*FakeInfrastructure) GetEmailAddresses

func (f *FakeInfrastructure) GetEmailAddresses(ctx context.Context, uids onboarding.UserUIDs) (map[string][]string, error)

GetEmailAddresses ...

func (*FakeInfrastructure) GetFaqsContent

func (f *FakeInfrastructure) GetFaqsContent(ctx context.Context, flavour feedlib.Flavour) ([]*domain.GhostCMSPost, error)

GetFaqsContent ...

func (*FakeInfrastructure) GetFeed

func (f *FakeInfrastructure) GetFeed(
	ctx context.Context,
	uid *string,
	isAnonymous *bool,
	flavour feedlib.Flavour,
	playMP4 bool,
	persistent feedlib.BooleanFilter,
	status *feedlib.Status,
	visibility *feedlib.Visibility,
	expired *feedlib.BooleanFilter,
	filterParams *helpers.FilterParams,
) (*domain.Feed, error)

GetFeed ...

func (*FakeInfrastructure) GetFeedContent

func (f *FakeInfrastructure) GetFeedContent(ctx context.Context, flavour feedlib.Flavour) ([]*domain.GhostCMSPost, error)

GetFeedContent ...

func (*FakeInfrastructure) GetFeedItem

func (f *FakeInfrastructure) GetFeedItem(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	itemID string,
) (*feedlib.Item, error)

GetFeedItem ...

func (*FakeInfrastructure) GetItems

func (f *FakeInfrastructure) GetItems(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	persistent feedlib.BooleanFilter,
	status *feedlib.Status,
	visibility *feedlib.Visibility,
	expired *feedlib.BooleanFilter,
	filterParams *helpers.FilterParams,
) ([]feedlib.Item, error)

GetItems ...

func (*FakeInfrastructure) GetLibraryContent

func (f *FakeInfrastructure) GetLibraryContent(ctx context.Context) ([]*domain.GhostCMSPost, error)

GetLibraryContent ...

func (*FakeInfrastructure) GetMessage

func (f *FakeInfrastructure) GetMessage(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	itemID string,
	messageID string,
) (*feedlib.Message, error)

GetMessage retrieves THE LATEST VERSION OF a message

func (*FakeInfrastructure) GetMessages

func (f *FakeInfrastructure) GetMessages(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	itemID string,
) ([]feedlib.Message, error)

GetMessages retrieves a message

func (*FakeInfrastructure) GetNudge

func (f *FakeInfrastructure) GetNudge(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	nudgeID string,
) (*feedlib.Nudge, error)

GetNudge gets THE LATEST VERSION OF a nudge from a feed

func (*FakeInfrastructure) GetNudges

func (f *FakeInfrastructure) GetNudges(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	status *feedlib.Status,
	visibility *feedlib.Visibility,
	expired *feedlib.BooleanFilter,
) ([]feedlib.Nudge, error)

GetNudges ...

func (*FakeInfrastructure) GetPhoneNumbers

func (f *FakeInfrastructure) GetPhoneNumbers(ctx context.Context, uids onboarding.UserUIDs) (map[string][]string, error)

GetPhoneNumbers ...

func (*FakeInfrastructure) GetUserProfile

func (f *FakeInfrastructure) GetUserProfile(ctx context.Context, uid string) (*profileutils.UserProfile, error)

GetUserProfile ...

func (*FakeInfrastructure) GetUserProfileByPhoneOrEmail

func (f *FakeInfrastructure) GetUserProfileByPhoneOrEmail(ctx context.Context, payload *dto.RetrieveUserProfileInput) (*profileutils.UserProfile, error)

GetUserProfileByPhoneOrEmail ...

func (*FakeInfrastructure) Labels

func (f *FakeInfrastructure) Labels(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
) ([]string, error)

Labels ...

func (*FakeInfrastructure) Notifications

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

Notifications ...

func (*FakeInfrastructure) Notify

func (f *FakeInfrastructure) 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 (*FakeInfrastructure) PhoneNumberVerificationCode

func (f *FakeInfrastructure) PhoneNumberVerificationCode(
	ctx context.Context,
	to string,
	code string,
	marketingMessage string,
) (bool, error)

PhoneNumberVerificationCode ...

func (*FakeInfrastructure) PostMessage

func (f *FakeInfrastructure) PostMessage(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	itemID string,
	message *feedlib.Message,
) (*feedlib.Message, error)

PostMessage posts a message or a reply to a message/thread

func (*FakeInfrastructure) PreauthApproval

func (f *FakeInfrastructure) PreauthApproval(
	ctx context.Context,
	to string,
	currency string,
	amount string,
	benefit string,
	provider string,
	member string,
	careContact string,
	marketingMessage string,
) (bool, error)

PreauthApproval ...

func (*FakeInfrastructure) PreauthRequest

func (f *FakeInfrastructure) PreauthRequest(
	ctx context.Context,
	to string,
	currency string,
	amount string,
	benefit string,
	provider string,
	requestTime string,
	member string,
	careContact string,
	marketingMessage string,
) (bool, error)

PreauthRequest ...

func (*FakeInfrastructure) RecordNPSResponse

func (f *FakeInfrastructure) RecordNPSResponse(ctx context.Context, input dto.NPSInput) (bool, error)

RecordNPSResponse ...

func (*FakeInfrastructure) RetrieveNotification

func (f *FakeInfrastructure) RetrieveNotification(
	ctx context.Context,
	firestoreClient *firestore.Client,
	registrationToken string,
	newerThan time.Time,
	limit int,
) ([]*dto.SavedNotification, error)

RetrieveNotification retrieves a notification

func (*FakeInfrastructure) ReverseSubscriptionIDs

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

ReverseSubscriptionIDs ...

func (*FakeInfrastructure) Room

func (f *FakeInfrastructure) Room(ctx context.Context) (*dto.Room, error)

Room ...

func (*FakeInfrastructure) SaveAction

func (f *FakeInfrastructure) SaveAction(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	action *feedlib.Action,
) (*feedlib.Action, error)

SaveAction saves a new action

func (*FakeInfrastructure) SaveFeedItem

func (f *FakeInfrastructure) SaveFeedItem(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	item *feedlib.Item,
) (*feedlib.Item, error)

SaveFeedItem ...

func (*FakeInfrastructure) SaveIncomingEvent

func (f *FakeInfrastructure) SaveIncomingEvent(
	ctx context.Context,
	event *feedlib.Event,
) error

SaveIncomingEvent ...

func (*FakeInfrastructure) SaveLabel

func (f *FakeInfrastructure) SaveLabel(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	label string,
) error

SaveLabel ...

func (*FakeInfrastructure) SaveNPSResponse

func (f *FakeInfrastructure) SaveNPSResponse(
	ctx context.Context,
	response *dto.NPSResponse,
) error

SaveNPSResponse saves a NPS response

func (*FakeInfrastructure) SaveNotification

func (f *FakeInfrastructure) SaveNotification(
	ctx context.Context,
	firestoreClient *firestore.Client,
	notification dto.SavedNotification,
) error

SaveNotification saves a notification

func (*FakeInfrastructure) SaveNudge

func (f *FakeInfrastructure) SaveNudge(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	nudge *feedlib.Nudge,
) (*feedlib.Nudge, error)

SaveNudge saves a new modified nudge

func (*FakeInfrastructure) SaveOTPToFirestore

func (f *FakeInfrastructure) SaveOTPToFirestore(otp dto.OTP) error

SaveOTPToFirestore ...

func (*FakeInfrastructure) SaveOutgoingEmails

func (f *FakeInfrastructure) SaveOutgoingEmails(ctx context.Context, payload *dto.OutgoingEmailsLog) error

SaveOutgoingEmails ...

func (*FakeInfrastructure) SaveOutgoingEvent

func (f *FakeInfrastructure) SaveOutgoingEvent(
	ctx context.Context,
	event *feedlib.Event,
) error

SaveOutgoingEvent ...

func (*FakeInfrastructure) SaveTwilioResponse

func (f *FakeInfrastructure) SaveTwilioResponse(
	ctx context.Context,
	data dto.Message,
) error

SaveTwilioResponse saves the callback data for future analysis

func (*FakeInfrastructure) SaveTwilioVideoCallbackStatus

func (f *FakeInfrastructure) SaveTwilioVideoCallbackStatus(
	ctx context.Context,
	data dto.CallbackData,
) error

SaveTwilioVideoCallbackStatus ..

func (*FakeInfrastructure) Send

func (f *FakeInfrastructure) Send(
	ctx context.Context,
	to, message string,
	from enumutils.SenderID,
) (*dto.SendMessageResponse, error)

Send ...

func (*FakeInfrastructure) SendEmail

func (f *FakeInfrastructure) SendEmail(
	ctx context.Context,
	subject, text string,
	body *string,
	to ...string,
) (string, string, error)

SendEmail ...

func (*FakeInfrastructure) SendFCMByPhoneOrEmail

SendFCMByPhoneOrEmail ...

func (*FakeInfrastructure) SendInBlue

func (f *FakeInfrastructure) SendInBlue(ctx context.Context, subject, text string, to ...string) (string, string, error)

SendInBlue ...

func (*FakeInfrastructure) SendMailgun

func (f *FakeInfrastructure) SendMailgun(
	ctx context.Context,
	subject, text string,
	body *string,
	to ...string,
) (string, string, error)

SendMailgun ...

func (*FakeInfrastructure) SendNotification

SendNotification ...

func (*FakeInfrastructure) SendOTPToEmail

func (f *FakeInfrastructure) SendOTPToEmail(ctx context.Context, msisdn, email *string, appID *string) (string, error)

SendOTPToEmail ...

func (*FakeInfrastructure) SendSMS

func (f *FakeInfrastructure) SendSMS(ctx context.Context, to string, msg string) error

SendSMS ...

func (*FakeInfrastructure) SendToMany

func (f *FakeInfrastructure) SendToMany(
	ctx context.Context,
	message string,
	to []string,
	from enumutils.SenderID,
) (*dto.SendMessageResponse, error)

SendToMany ...

func (*FakeInfrastructure) SimpleEmail

func (f *FakeInfrastructure) SimpleEmail(
	ctx context.Context,
	subject, text string,
	body *string,
	to ...string,
) (string, error)

SimpleEmail ...

func (*FakeInfrastructure) SladeOTP

func (f *FakeInfrastructure) SladeOTP(
	ctx context.Context,
	to string,
	name string,
	otp string,
	marketingMessage string,
) (bool, error)

SladeOTP ...

func (*FakeInfrastructure) SubscriptionIDs

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

SubscriptionIDs ...

func (*FakeInfrastructure) TopicIDs

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

TopicIDs ...

func (*FakeInfrastructure) TwilioAccessToken

func (f *FakeInfrastructure) TwilioAccessToken(ctx context.Context) (*dto.AccessToken, error)

TwilioAccessToken ...

func (*FakeInfrastructure) UnreadPersistentItems

func (f *FakeInfrastructure) UnreadPersistentItems(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
) (int, error)

UnreadPersistentItems ...

func (*FakeInfrastructure) UpdateFeedItem

func (f *FakeInfrastructure) UpdateFeedItem(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	item *feedlib.Item,
) (*feedlib.Item, error)

UpdateFeedItem ...

func (*FakeInfrastructure) UpdateMailgunDeliveryStatus

func (f *FakeInfrastructure) UpdateMailgunDeliveryStatus(
	ctx context.Context,
	payload *dto.MailgunEvent,
) (*dto.OutgoingEmailsLog, error)

UpdateMailgunDeliveryStatus ...

func (*FakeInfrastructure) UpdateNudge

func (f *FakeInfrastructure) UpdateNudge(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
	nudge *feedlib.Nudge,
) (*feedlib.Nudge, error)

UpdateNudge updates an existing nudge

func (*FakeInfrastructure) UpdateUnreadPersistentItemsCount

func (f *FakeInfrastructure) UpdateUnreadPersistentItemsCount(
	ctx context.Context,
	uid string,
	flavour feedlib.Flavour,
) error

UpdateUnreadPersistentItemsCount ...

func (*FakeInfrastructure) Upload

Upload ...

func (*FakeInfrastructure) VerifyEmailOtp

func (f *FakeInfrastructure) VerifyEmailOtp(ctx context.Context, email, verificationCode *string) (bool, error)

VerifyEmailOtp ...

func (*FakeInfrastructure) VerifyOtp

func (f *FakeInfrastructure) VerifyOtp(ctx context.Context, msisdn, verificationCode *string) (bool, error)

VerifyOtp ...

func (*FakeInfrastructure) VirtualCards

func (f *FakeInfrastructure) VirtualCards(
	ctx context.Context,
	to string,
	wellnessCardFamily string,
	virtualCardLink string,
	marketingMessage string,
) (bool, error)

VirtualCards ...

func (*FakeInfrastructure) VisitStart

func (f *FakeInfrastructure) VisitStart(
	ctx context.Context,
	to string,
	memberName string,
	benefitName string,
	locationName string,
	startTime string,
	balance string,
	marketingMessage string,
) (bool, error)

VisitStart ...

func (*FakeInfrastructure) WellnessCardActivationDependant

func (f *FakeInfrastructure) WellnessCardActivationDependant(
	ctx context.Context,
	to string,
	memberName string,
	cardName string,
	marketingMessage string,
) (bool, error)

WellnessCardActivationDependant ...

func (*FakeInfrastructure) WellnessCardActivationPrincipal

func (f *FakeInfrastructure) WellnessCardActivationPrincipal(
	ctx context.Context,
	to string,
	memberName string,
	cardName string,
	minorAgeThreshold string,
	marketingMessage string,
) (bool, error)

WellnessCardActivationPrincipal ...

Jump to

Keyboard shortcuts

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