worker

package
v0.0.0-...-931afa0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailSender

type EmailSender struct {
	MailerSendServer *mailersend.Mailersend
	SenderName       string
	SenderEmail      string
}

func NewEmailSender

func NewEmailSender(conf *common.Config) *EmailSender

func (*EmailSender) SendEmail

func (e *EmailSender) SendEmail(to, subject, body string) (*mailersend.Response, error)

type EmailSenderInterface

type EmailSenderInterface interface {
	SendEmail(to, subject, body string) (*mailersend.Response, error)
}

type Worker

type Worker struct {
	EmailSender    EmailSenderInterface
	RabbitMQBroker rabbitmq.RabbitMQBrokerInterface
}

func NewWorker

func NewWorker(emailSender *EmailSender, rmq *rabbitmq.RabbitMQBroker) *Worker

func (*Worker) NotificationHandler

func (w *Worker) NotificationHandler(queue string, msg amqp.Delivery, err error)

Jump to

Keyboard shortcuts

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