email

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleSender

type ConsoleSender struct{}

func NewConsoleSender

func NewConsoleSender() *ConsoleSender

func (*ConsoleSender) SendMagicLinkEmail

func (s *ConsoleSender) SendMagicLinkEmail(ctx context.Context, email string, token string, isNewUser bool) error

type EmailService

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

func NewEmailService

func NewEmailService(emailSender Sender) *EmailService

func (*EmailService) SendMagicLinkEmail

func (s *EmailService) SendMagicLinkEmail(ctx context.Context, email string, token string, isNewUser bool) error

type ResendSender added in v0.3.0

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

ResendSender sends magic link emails via the Resend API.

func NewResendSender added in v0.3.0

func NewResendSender(apiKey, fromAddr string) *ResendSender

NewResendSender creates a ResendSender using the given API key and from address.

func (*ResendSender) SendMagicLinkEmail added in v0.3.0

func (s *ResendSender) SendMagicLinkEmail(ctx context.Context, email string, token string, isNewUser bool) error

type Sender added in v0.2.0

type Sender interface {
	SendMagicLinkEmail(ctx context.Context, email string, token string, isNewUser bool) error
}

Sender is the interface for sending emails. Implement it to inject a custom sender (e.g. in tests).

Jump to

Keyboard shortcuts

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