services

package
v0.0.0-...-e4696b1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultEmailStoreService

type DefaultEmailStoreService struct {
	// contains filtered or unexported fields
}

func (*DefaultEmailStoreService) CreateEmail

func (dEmailer *DefaultEmailStoreService) CreateEmail(ctx context.Context, createEmail *email.CreateNewEmailRequest) error

func (*DefaultEmailStoreService) GetById

func (dEmailer *DefaultEmailStoreService) GetById(ctx context.Context, id int64) (*email.Email, error)

func (*DefaultEmailStoreService) MarkEmailAsSent

func (dEmailer *DefaultEmailStoreService) MarkEmailAsSent(ctx context.Context, id int64) error

func (*DefaultEmailStoreService) PrepareEmail

func (dEmailer *DefaultEmailStoreService) PrepareEmail(ctx context.Context, id int64) (*PreparedEmail, error)

type EmailStoreService

type EmailStoreService interface {
	CreateEmail(ctx context.Context, createEmail *email.CreateNewEmailRequest) error
	GetById(ctx context.Context, id int64) (*email.Email, error)
	PrepareEmail(ctx context.Context, id int64) (*PreparedEmail, error)
	MarkEmailAsSent(ctx context.Context, id int64) error
}

func NewDefaultEmailStoreService

func NewDefaultEmailStoreService(
	emailRepository email.EmailRepository,
	templateRepository email.TemplateRepository,
	domainInfoRepository domain.DomainInfoRepository,
	eventBus events.EventBus,
	snowFlakeNode *snowflake.Node,
	scheduledEvRepo events.ScheduledEventRepository,
) EmailStoreService

type Emailer

type Emailer interface {
	SendEmail(ctx context.Context, email *PreparedEmail) error
}

type IdentityManager

type IdentityManager interface {
	CreateIdentity(ctx context.Context, domainInfo *domain.DomainInfo) error
	RefreshIdentity(ctx context.Context, domainInfo *domain.DomainInfo) error
	DeleteIdentity(ctx context.Context, domainInfo *domain.DomainInfo) error
}

type PreparedEmail

type PreparedEmail struct {
	Html    string
	Text    string
	From    string
	To      string
	BCC     string
	ReplyTo string
	Subject string
	Domain  struct {
		Name string
		Id   int64 `json:",string"`
	}
	Id int64 `json:",string"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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