handler

package
v0.0.0-...-458c6d8 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	S3      S3Api
	Ses     SesApi
	SesV2   SesV2Api
	Options *Options
	Log     *log.Logger
}

func (*Handler) HandleEvent

type Options

type Options struct {
	BucketName        string
	IncomingPrefix    string
	EmailDomainName   string
	SenderAddress     string
	ForwardingAddress string
	ConfigurationSet  string
}

func GetOptions

func GetOptions(getenv func(string) string) (*Options, error)

type S3Api

type S3Api interface {
	GetObject(
		context.Context, *s3.GetObjectInput, ...func(*s3.Options),
	) (*s3.GetObjectOutput, error)
}

type SesApi

type SesApi interface {
	SendBounce(
		context.Context, *ses.SendBounceInput, ...func(*ses.Options),
	) (*ses.SendBounceOutput, error)
}

type SesV2Api

type SesV2Api interface {
	SendEmail(
		context.Context, *sesv2.SendEmailInput, ...func(*sesv2.Options),
	) (*sesv2.SendEmailOutput, error)
}

type UndefinedEnvVarsError

type UndefinedEnvVarsError struct {
	UndefinedVars []string
}

func (*UndefinedEnvVarsError) Error

func (e *UndefinedEnvVarsError) Error() string

Jump to

Keyboard shortcuts

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