email

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrevoAdapter

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

BrevoAdapter implements the port.EmailAdapter interface for sending emails via Brevo (formerly SendinBlue).

func NewBrevoAdapter

func NewBrevoAdapter(cfg config.BrevoConfig, logger logger.Logger) (*BrevoAdapter, error)

NewBrevoAdapter creates a new instance of BrevoAdapter.

func (*BrevoAdapter) SendEmail

func (a *BrevoAdapter) SendEmail(ctx context.Context, email dto.Email) error

SendEmail sends an email using the Brevo API.

type MockEmailAdapter

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

MockEmailAdapter is a mock implementation of the port.EmailAdapter interface.

func NewMockEmailAdapter

func NewMockEmailAdapter(logger logger.Logger) *MockEmailAdapter

NewMockEmailAdapter creates a new instance of MockEmailAdapter.

func (*MockEmailAdapter) SendEmail

func (a *MockEmailAdapter) SendEmail(ctx context.Context, email dto.Email) error

SendEmail sends an email using the mock implementation.

type SendGridAdapter

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

SendGridAdapter implements the port.EmailAdapter interface for sending emails via SendGrid.

func NewSendGridAdapter

func NewSendGridAdapter(cfg config.SendGridConfig, logger logger.Logger) (*SendGridAdapter, error)

NewSendGridAdapter creates a new instance of SendGridAdapter.

func (*SendGridAdapter) SendEmail

func (a *SendGridAdapter) SendEmail(ctx context.Context, email dto.Email) error

SendEmail sends an email using the SendGrid API.

func (*SendGridAdapter) ServiceName

func (a *SendGridAdapter) ServiceName() string

ServiceName returns the name of the email service.

Jump to

Keyboard shortcuts

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