ses

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AWSRegion   string                         `json:"awsRegion"`
	AccessKeyID string                         `json:"accessKeyID"`
	FromEmail   *jt.JSONType[*netMail.Address] `json:"fromEmail"`
	SecretKey   string                         `json:"secretKey"`
}

Config is the configuration for the AWS SES provider. It includes assets to create an AWS session.

func (Config) DefaultsAndValidate

func (c Config) DefaultsAndValidate() (Config, error)

DefaultsAndValidate implements the jsontype.Config interface.

type InitializedConfig

type InitializedConfig struct {
	FromEmail *netMail.Address
}

InitializedConfig is the configuration for the AWS SES provider after it has been initialized.

type SES

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

SES is an email provider that uses AWS SES.

func NewProvider

func NewProvider(conf Config) (SES, error)

NewProvider creates a new SES provider. It will create an AWS session using the provided configuration.

func NewProviderInitialized

func NewProviderInitialized(conf InitializedConfig, svc *ses.SES) (SES, error)

NewProviderInitialized creates a new SES provider with an initialized configuration.

func (s SES) SendMagicLink(ctx context.Context, e email.Email) error

func (SES) SendOTP added in v0.6.0

func (s SES) SendOTP(ctx context.Context, e email.Email) error

Jump to

Keyboard shortcuts

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