external

package
v0.0.0-...-21c6822 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailClient

type EmailClient interface {
	SendEmail(to, subject, body string) error
}

EmailClient defines the interface for sending emails.

func NewEmailClient

func NewEmailClient(log *logrus.Logger, cfg config.EmailConfig) (EmailClient, error)

NewEmailClient creates a new email client based on configuration.

func NewSendGridClient

func NewSendGridClient(cfg config.SendGridConfig) (EmailClient, error)

NewSendGridClient creates a new SendGridClient instance.

func NewSmtpClient

func NewSmtpClient(cfg config.SmtpConfig) (EmailClient, error)

NewSmtpClient creates a new SmtpClient instance.

type SendGridClient

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

SendGridClient implements the EmailClient interface for SendGrid.

func (*SendGridClient) SendEmail

func (s *SendGridClient) SendEmail(to, subject, body string) error

SendEmail sends an email using SendGrid.

type SmtpClient

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

SmtpClient implements the EmailClient interface for SMTP.

func (*SmtpClient) SendEmail

func (s *SmtpClient) SendEmail(to, subject, body string) error

SendEmail sends an email using SMTP.

Jump to

Keyboard shortcuts

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