helpers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProInviteLink will store the pro app invite link at the settings
	ProInviteLink = "PRO_INVITE_LINK"

	// ConsumerInviteLink will store the consumer invite link at the settings
	ConsumerInviteLink = "CONSUMER_INVITE_LINK"

	// GoogleCloudStorageURL is base bucket link for the content images
	GoogleCloudStorageURL = "GOOGLE_CLOUD_STORAGE_URL"
)

Variables

This section is empty.

Functions

func ComposeNotificationPayload

func ComposeNotificationPayload(userProfile *domain.User, notificationData dto.FCMNotificationMessage) *firebasetools.SendNotificationPayload

ComposeNotificationPayload creates the notification payload that will sent via pubsub

func CreateInviteMessage

func CreateInviteMessage(user *domain.User, inviteLink string, pin string, flavour feedlib.Flavour) string

CreateInviteMessage creates a new invite message

func DecryptSensitiveData

func DecryptSensitiveData(text, MySecret string) (string, error)

DecryptSensitiveData decrypts sensitive data for a user

func EncryptSensitiveData

func EncryptSensitiveData(text, MySecret string) (string, error)

EncryptSensitiveData encrypts sensitive data for a user

func GetInviteLink(flavour feedlib.Flavour) (string, error)

GetInviteLink generates a custom invite link for PRO or CONSUMER

func GetPinExpiryDate

func GetPinExpiryDate() (*time.Time, error)

GetPinExpiryDate returns the expiry date for the given pin

func ReportErrorToSentry

func ReportErrorToSentry(err error)

ReportErrorToSentry captures the exception thrown and registers an issue in sentry

func RestAPIResponseHelper

func RestAPIResponseHelper(key string, value interface{}) *dto.RestEndpointResponses

RestAPIResponseHelper returns custom standardised response for frontend response consistency

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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