inform

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: GPL-3.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeEmailSender

func NewFakeEmailSender(c *viper.Viper) (*fakeEmailSender, error)

NewFakeEmailSender initiates email sender

func StartWorkerService

func StartWorkerService(ctx context.Context, data *ServiceData) (chan struct{}, error)

StartWorkerService starts the event queue listener service to listen for inform events returns channel for tracking when all jobs are finished

Types

type DB

type DB interface {
	LockEmailTable(context.Context, string, string) error
	UnLockEmailTable(context.Context, string, string, int) error
	LoadRequest(ctx context.Context, id string) (*persistence.ReqData, error)
}

DB tracks email sending process It is used to quarantee not to send the emails twice

type EmailMaker

type EmailMaker interface {
	Make(data *inform.Data) (*email.Email, error)
}

EmailMaker prepares the email

type EmailRetriever

type EmailRetriever interface {
	GetEmail(ID string) (string, error)
}

EmailRetriever return the email by ID

type MsgSender

type MsgSender interface {
	SendMessage(context.Context, amessages.Message, messages.Options) error
}

MsgSender provides send msg functionality

type Sender

type Sender interface {
	Send(email *email.Email) error
}

Sender send emails

type ServiceData

type ServiceData struct {
	GueClient   *gue.Client
	WorkerCount int
	EmailSender Sender
	EmailMaker  EmailMaker
	DB          DB
	Location    *time.Location
}

ServiceData keeps data required for service work

Jump to

Keyboard shortcuts

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