notifications

package
v0.0.0-...-d7b6ce4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommunicationTaskName = "communication"
)
View Source
const NotificationTaskName = "notification"

Variables

This section is empty.

Functions

func ProcessCommunication

func ProcessCommunication(data string) (bool, error)

func ProcessNotification

func ProcessNotification(data string) (bool, error)

Types

type Communication

type Communication struct {
	Content     string
	ContentType string
	TemplateId  string
	Recepients
}

func NewCommunication

func NewCommunication(emails []string, phones []string, template string) *Communication

func NewLoginOtpCommunication

func NewLoginOtpCommunication(user models.User) *Communication

func NewResendLoginOtpCommunication

func NewResendLoginOtpCommunication(user models.User) *Communication

func (*Communication) Name

func (n *Communication) Name() string

func (*Communication) Run

func (c *Communication) Run() error

type NotificationTask

type NotificationTask struct {
	Phone string
	Otp   int
	Data  string
}

func NewNotificationTask

func NewNotificationTask(phone string, otp int, data string) *NotificationTask

func (*NotificationTask) Name

func (n *NotificationTask) Name() string

func (*NotificationTask) Run

func (n *NotificationTask) Run() error

type Recepients

type Recepients struct {
	Emails []string
	Phones []string
}

Jump to

Keyboard shortcuts

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