Documentation
¶
Index ¶
- Constants
- Variables
- type BulkEmailDestination
- type ConfigProvider
- type ConfigurationSet
- type ConfigurationSetDescription
- type CustomVerificationEmailTemplate
- type DeliveryOptions
- type DkimAttributes
- type Email
- type EmailTemplate
- type EventDestination
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Shutdown(ctx context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- func (h *Handler) WithJanitor(interval time.Duration, taskTimeout ...time.Duration) *Handler
- type IdentityRecord
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) CloneReceiptRuleSet(originalName, newName string) error
- func (b *InMemoryBackend) CreateConfigurationSet(name string) error
- func (b *InMemoryBackend) CreateConfigurationSetEventDestination(configSetName string, dest EventDestination) error
- func (b *InMemoryBackend) CreateConfigurationSetTrackingOptions(configSetName, customRedirectDomain string) error
- func (b *InMemoryBackend) CreateCustomVerificationEmailTemplate(tmpl CustomVerificationEmailTemplate) error
- func (b *InMemoryBackend) CreateReceiptFilter(filter ReceiptFilter) error
- func (b *InMemoryBackend) CreateReceiptRule(ruleSetName string, rule ReceiptRule, after string) error
- func (b *InMemoryBackend) CreateReceiptRuleSet(name string) error
- func (b *InMemoryBackend) CreateTemplate(tmpl EmailTemplate) error
- func (b *InMemoryBackend) DeleteConfigurationSet(name string) error
- func (b *InMemoryBackend) DeleteConfigurationSetEventDestination(configSetName, destName string) error
- func (b *InMemoryBackend) DeleteConfigurationSetTrackingOptions(configSetName string) error
- func (b *InMemoryBackend) DeleteCustomVerificationEmailTemplate(templateName string) error
- func (b *InMemoryBackend) DeleteIdentity(identity string)
- func (b *InMemoryBackend) DeleteIdentityPolicy(identity, policyName string) error
- func (b *InMemoryBackend) DeleteReceiptFilter(name string) error
- func (b *InMemoryBackend) DeleteReceiptRule(ruleSetName, ruleName string) error
- func (b *InMemoryBackend) DeleteReceiptRuleSet(name string) error
- func (b *InMemoryBackend) DeleteTemplate(name string)
- func (b *InMemoryBackend) DeleteVerifiedEmailAddress(email string)
- func (b *InMemoryBackend) DescribeActiveReceiptRuleSet() (ReceiptRuleSet, bool, error)
- func (b *InMemoryBackend) DescribeConfigurationSet(name string) (ConfigurationSetDescription, error)
- func (b *InMemoryBackend) DescribeReceiptRule(ruleSetName, ruleName string) (ReceiptRule, error)
- func (b *InMemoryBackend) DescribeReceiptRuleSet(name string) (ReceiptRuleSet, error)
- func (b *InMemoryBackend) GetAccountSendingEnabled() bool
- func (b *InMemoryBackend) GetCustomVerificationEmailTemplate(templateName string) (CustomVerificationEmailTemplate, error)
- func (b *InMemoryBackend) GetEmailByID(messageID string) (Email, error)
- func (b *InMemoryBackend) GetIdentityDkimAttributes(identities []string) map[string]DkimAttributes
- func (b *InMemoryBackend) GetIdentityMailFromDomainAttributes(identities []string) map[string]MailFromDomainAttributes
- func (b *InMemoryBackend) GetIdentityNotificationAttributes(identities []string) map[string]NotificationAttributes
- func (b *InMemoryBackend) GetIdentityPolicies(identity string, policyNames []string) (map[string]string, error)
- func (b *InMemoryBackend) GetIdentityVerificationAttributes(identities []string) map[string]string
- func (b *InMemoryBackend) GetSendQuota() SendQuota
- func (b *InMemoryBackend) GetSendStatistics() []SendDataPoint
- func (b *InMemoryBackend) GetTemplate(name string) (EmailTemplate, error)
- func (b *InMemoryBackend) ListConfigurationSets(nextToken string, maxItems int) page.Page[string]
- func (b *InMemoryBackend) ListCustomVerificationEmailTemplates() []CustomVerificationEmailTemplate
- func (b *InMemoryBackend) ListEmails() []Email
- func (b *InMemoryBackend) ListIdentities(nextToken string, maxItems int) page.Page[string]
- func (b *InMemoryBackend) ListIdentityPolicies(identity string) ([]string, error)
- func (b *InMemoryBackend) ListReceiptFilters() []ReceiptFilter
- func (b *InMemoryBackend) ListReceiptRuleSets() []ReceiptRuleSet
- func (b *InMemoryBackend) ListTemplates(nextToken string, maxItems int) page.Page[string]
- func (b *InMemoryBackend) ListVerifiedEmailAddresses() []string
- func (b *InMemoryBackend) PutConfigurationSetDeliveryOptions(configSetName, tlsPolicy string) error
- func (b *InMemoryBackend) PutIdentityPolicy(identity, policyName, policy string) error
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) ReorderReceiptRuleSet(ruleSetName string, ruleNames []string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SearchEmails(query string) []Email
- func (b *InMemoryBackend) SendBounce(originalMsgID, bounceSender string, recipients []string) (string, error)
- func (b *InMemoryBackend) SendBulkTemplatedEmail(in SendBulkTemplatedEmailInput) ([]string, error)
- func (b *InMemoryBackend) SendCustomVerificationEmail(email, templateName, configurationSetName string) (string, error)
- func (b *InMemoryBackend) SendEmail(in SendEmailInput) (string, error)
- func (b *InMemoryBackend) SendTemplatedEmail(in SendTemplatedEmailInput) (string, error)
- func (b *InMemoryBackend) SetActiveReceiptRuleSet(name string) error
- func (b *InMemoryBackend) SetIdentityDkimEnabled(identity string, enabled bool) error
- func (b *InMemoryBackend) SetIdentityFeedbackForwardingEnabled(identity string, enabled bool) error
- func (b *InMemoryBackend) SetIdentityHeadersInNotificationsEnabled(identity, notificationType string, enabled bool) error
- func (b *InMemoryBackend) SetIdentityMailFromDomain(identity, mailFromDomain, behaviorOnMXFailure string) error
- func (b *InMemoryBackend) SetIdentityNotificationTopic(identity, notificationType, snsTopic string) error
- func (b *InMemoryBackend) SetReceiptRulePosition(ruleSetName, ruleName string, position int) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) TestRenderTemplate(templateName, templateData string) (string, error)
- func (b *InMemoryBackend) UpdateAccountSendingEnabled(enabled bool)
- func (b *InMemoryBackend) UpdateConfigurationSetEventDestination(configSetName string, dest EventDestination) error
- func (b *InMemoryBackend) UpdateConfigurationSetReputationMetricsEnabled(configSetName string, enabled bool) error
- func (b *InMemoryBackend) UpdateConfigurationSetSendingEnabled(configSetName string, enabled bool) error
- func (b *InMemoryBackend) UpdateConfigurationSetTrackingOptions(configSetName, customRedirectDomain string) error
- func (b *InMemoryBackend) UpdateCustomVerificationEmailTemplate(tmpl CustomVerificationEmailTemplate) error
- func (b *InMemoryBackend) UpdateReceiptRule(ruleSetName string, rule ReceiptRule) error
- func (b *InMemoryBackend) UpdateTemplate(tmpl EmailTemplate) error
- func (b *InMemoryBackend) VerifyDomainDkim(domain string) ([]string, error)
- func (b *InMemoryBackend) VerifyDomainIdentity(domain string) (string, error)
- func (b *InMemoryBackend) VerifyEmailAddress(email string) error
- func (b *InMemoryBackend) VerifyEmailIdentity(identity string) error
- func (b *InMemoryBackend) WithAccountID(accountID string) *InMemoryBackend
- func (b *InMemoryBackend) WithEmailTTL(ttl time.Duration) *InMemoryBackend
- func (b *InMemoryBackend) WithRegion(region string) *InMemoryBackend
- type Janitor
- type MailFromDomainAttributes
- type NotificationAttributes
- type Provider
- type ReceiptAction
- type ReceiptFilter
- type ReceiptRule
- type ReceiptRuleSet
- type SendBulkTemplatedEmailInput
- type SendDataPoint
- type SendEmailInput
- type SendQuota
- type SendTemplatedEmailInput
- type Settings
- type StorageBackend
- type Tag
- type TrackingOptions
Constants ¶
const ( ReceiptActionTypeS3 = "S3" ReceiptActionTypeSNS = "SNS" ReceiptActionTypeLambda = "Lambda" ReceiptActionTypeSQS = "SQS" ReceiptActionTypeAddHeader = "AddHeader" ReceiptActionTypeBounce = "Bounce" ReceiptActionTypeStop = "Stop" )
const ( FilterPolicyAllow = "Allow" FilterPolicyBlock = "Block" TLSPolicyOptional = "Optional" TLSPolicyRequire = "Require" )
Variables ¶
var ( ErrEmailNotFound = errors.New("EmailNotFound") ErrInvalidParameter = errors.New("InvalidParameterValue") ErrInvalidPolicy = errors.New("InvalidPolicy") ErrMessageRejected = errors.New("MessageRejected") ErrTemplateNotFound = errors.New("TemplateDoesNotExist") ErrTemplateExists = errors.New("AlreadyExists") ErrConfigSetNotFound = errors.New("ConfigurationSetDoesNotExist") ErrConfigSetExists = errors.New("ConfigurationSetAlreadyExists") ErrReceiptRuleSetNotFound = errors.New("RuleSetDoesNotExist") ErrReceiptRuleSetExists = errors.New("AlreadyExists") ErrReceiptRuleSetActive = errors.New("CannotDelete") ErrReceiptRuleNotFound = errors.New("RuleDoesNotExist") ErrReceiptRuleExists = errors.New("AlreadyExists") ErrReceiptFilterNotFound = errors.New("FilterDoesNotExist") ErrReceiptFilterExists = errors.New("AlreadyExists") ErrEventDestinationNotFound = errors.New("EventDestinationDoesNotExist") ErrEventDestinationExists = errors.New("EventDestinationAlreadyExists") ErrTrackingOptionsNotFound = errors.New("TrackingOptionsDoesNotExistException") ErrTrackingOptionsExists = errors.New("TrackingOptionsAlreadyExistsException") ErrCustomVerifTemplateNotFound = errors.New("CustomVerificationEmailTemplateDoesNotExist") ErrCustomVerifTemplateExists = errors.New("CustomVerificationEmailTemplateAlreadyExists") ErrValidation = errors.New("ValidationError") // ErrAccountSendingPaused is returned by send operations when account-level // sending has been paused via UpdateAccountSendingEnabled(false), matching // real AWS SES's AccountSendingPausedException. ErrAccountSendingPaused = errors.New("AccountSendingPausedException") )
Errors returned by the SES backend.
ErrTrackingOptionsNotFound / ErrTrackingOptionsExists deliberately carry the "Exception"-suffixed wire error codes (TrackingOptionsDoesNotExistException / TrackingOptionsAlreadyExistsException) even though every sibling *DoesNotExist / *AlreadyExists error in this list omits the suffix -- this asymmetry is not a typo, it is what aws-sdk-go-v2/service/ses/types/errors.go's TrackingOptions{DoesNotExist,AlreadyExists}Exception.ErrorCode() literally returns, confirmed against the SDK's deserializers.go error-code switch (case strings.EqualFold("TrackingOptionsDoesNotExistException", errorCode)). Sending the unsuffixed form (as this file did before this pass) causes a real AWS SDK client's error deserializer to miss the typed-exception match.
var ErrNilAppContext = errors.New("ses: AppContext is nil")
ErrNilAppContext is returned by Init when the AppContext is nil.
Functions ¶
This section is empty.
Types ¶
type BulkEmailDestination ¶
type BulkEmailDestination struct {
ReplacementTemplateData string
To []string
Cc []string
Bcc []string
ReplacementTags []Tag
}
BulkEmailDestination is a single destination entry for SendBulkTemplatedEmail. ReplacementTags mirrors the real SendBulkTemplatedEmailInput BulkEmailDestination.ReplacementTags member: when non-empty it overrides the request-level SendBulkTemplatedEmailInput.DefaultTags for this destination's stored Email record.
type ConfigProvider ¶
type ConfigProvider interface {
GetSESSettings() Settings
}
ConfigProvider is a private interface to extract SES configuration from the abstract AppContext Config.
type ConfigurationSet ¶
type ConfigurationSet struct {
// Name is the configuration set name this value is keyed by in the
// configSets Table (see store_setup.go). Tagged json:"-" for the same
// reason as IdentityRecord.Identity -- see its doc comment.
Name string `json:"-"`
TLSPolicy string `json:"tlsPolicy,omitempty"`
SendingEnabled bool `json:"sendingEnabled"`
ReputationMetrics bool `json:"reputationMetrics"`
}
ConfigurationSet stores per-configuration-set state.
type ConfigurationSetDescription ¶
type ConfigurationSetDescription struct {
TrackingOptions *TrackingOptions
DeliveryOptions *DeliveryOptions
Name string
EventDestinations []EventDestination
SendingEnabled bool
ReputationMetricsEnabled bool
}
ConfigurationSetDescription holds full details of a configuration set.
type CustomVerificationEmailTemplate ¶
type CustomVerificationEmailTemplate struct {
TemplateName string `json:"templateName"`
FromEmailAddress string `json:"fromEmailAddress"`
TemplateSubject string `json:"templateSubject"`
TemplateContent string `json:"templateContent"`
SuccessRedirectionURL string `json:"successRedirectionURL"`
FailureRedirectionURL string `json:"failureRedirectionURL"`
}
CustomVerificationEmailTemplate represents a custom verification email template.
type DeliveryOptions ¶
type DeliveryOptions struct {
TLSPolicy string `json:"tlsPolicy,omitempty"`
}
DeliveryOptions holds the delivery options for a configuration set.
type DkimAttributes ¶
DkimAttributes holds DKIM verification attributes for an identity.
type Email ¶
type Email struct {
Tags []Tag `json:"tags,omitempty"`
Timestamp time.Time `json:"timestamp"`
From string `json:"from"`
Subject string `json:"subject"`
BodyHTML string `json:"bodyHTML"`
BodyText string `json:"bodyText"`
MessageID string `json:"messageID"`
ConfigurationSetName string `json:"configurationSetName,omitempty"`
ReturnPath string `json:"returnPath,omitempty"`
ReturnPathArn string `json:"returnPathArn,omitempty"`
SourceArn string `json:"sourceArn,omitempty"`
To []string `json:"to"`
Cc []string `json:"cc,omitempty"`
Bcc []string `json:"bcc,omitempty"`
ReplyTo []string `json:"replyTo,omitempty"`
}
Email captures a sent email for local inspection.
type EmailTemplate ¶
type EmailTemplate struct {
TemplateName string `json:"templateName"`
SubjectPart string `json:"subjectPart"`
TextPart string `json:"textPart"`
HTMLPart string `json:"htmlPart"`
}
EmailTemplate represents a stored SES email template.
type EventDestination ¶
type EventDestination struct {
// ConfigSetName is the parent configuration set name. Combined with Name
// it forms the composite key ("<ConfigSetName>#<Name>", see
// eventDestinationKey in store_setup.go) the flattened eventDestinations
// Table is keyed by -- this Table replaces what was previously a nested
// map[string]map[string]*EventDestination. Tagged json:"-" for the same
// reason as IdentityRecord.Identity -- see its doc comment.
ConfigSetName string `json:"-"`
Name string `json:"name"`
SNSTopicARN string `json:"snsTopicARN,omitempty"`
MatchingEventTypes []string `json:"matchingEventTypes"`
Enabled bool `json:"enabled"`
}
EventDestination represents a configuration set event destination.
type Handler ¶
type Handler struct {
Backend StorageBackend
// contains filtered or unexported fields
}
Handler is the Echo HTTP handler for SES operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new SES handler with the given backend and logger.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this SES instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the SES action from the request body.
func (*Handler) ExtractResource ¶
ExtractResource returns the source email address or identity from the request.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported SES operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for SES requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority for the SES handler.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset clears all in-memory state. Used by the POST /_gopherstack/reset endpoint.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches SES requests. SES requests are form-encoded POSTs containing Version=2010-12-01 and an action from the SES supported operations list. We check both the version and action to avoid routing conflicts with Elastic Beanstalk, which also uses Version=2010-12-01 but with a disjoint set of action names.
func (*Handler) Snapshot ¶
Snapshot implements persistence.Persistable by delegating to the backend.
func (*Handler) StartWorker ¶
StartWorker starts the background janitor if configured.
func (*Handler) WithJanitor ¶
WithJanitor attaches a background janitor to the handler. The janitor periodically evicts emails older than the backend TTL. interval=0 uses the default interval. The optional taskTimeout bounds each sweep; 0 means no per-task timeout.
type IdentityRecord ¶
type IdentityRecord struct {
// Identity is the address or domain this record is keyed by in the
// identities Table (see store_setup.go). It is tagged json:"-" because
// the identities Table is a "dirty" table -- persistence.go instead
// round-trips it through a dedicated identitySnapshot DTO that carries
// the identity as a real JSON field, so it survives the round trip
// despite being excluded here. It must never change after the record is
// created (store.Table's keyFn purity requirement).
Identity string `json:"-"`
DeliveryTopic string `json:"deliveryTopic,omitempty"`
MailFromDomain string `json:"mailFromDomain,omitempty"`
MailFromStatus string `json:"mailFromStatus,omitempty"`
BehaviorOnMXFail string `json:"behaviorOnMXFailure,omitempty"`
BounceTopic string `json:"bounceTopic,omitempty"`
ComplaintTopic string `json:"complaintTopic,omitempty"`
DkimTokens []string `json:"dkimTokens,omitempty"`
DkimEnabled bool `json:"dkimEnabled"`
ForwardingEnabled bool `json:"forwardingEnabled"`
HeadersInBounce bool `json:"headersInBounce"`
HeadersInComplaint bool `json:"headersInComplaint"`
HeadersInDelivery bool `json:"headersInDelivery"`
Verified bool `json:"verified"`
}
IdentityRecord stores per-identity verification and attribute state.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is an in-memory store for SES emails, verified identities, email templates, and configuration sets.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates a new InMemoryBackend with the default email TTL.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the simulated AWS account ID.
func (*InMemoryBackend) CloneReceiptRuleSet ¶
func (b *InMemoryBackend) CloneReceiptRuleSet(originalName, newName string) error
CloneReceiptRuleSet creates a copy of an existing receipt rule set under a new name.
func (*InMemoryBackend) CreateConfigurationSet ¶
func (b *InMemoryBackend) CreateConfigurationSet(name string) error
CreateConfigurationSet registers a new configuration set. Returns ErrConfigSetExists if it already exists.
func (*InMemoryBackend) CreateConfigurationSetEventDestination ¶
func (b *InMemoryBackend) CreateConfigurationSetEventDestination(configSetName string, dest EventDestination) error
CreateConfigurationSetEventDestination adds an event destination to a configuration set.
func (*InMemoryBackend) CreateConfigurationSetTrackingOptions ¶
func (b *InMemoryBackend) CreateConfigurationSetTrackingOptions(configSetName, customRedirectDomain string) error
CreateConfigurationSetTrackingOptions sets the tracking options for a configuration set.
func (*InMemoryBackend) CreateCustomVerificationEmailTemplate ¶
func (b *InMemoryBackend) CreateCustomVerificationEmailTemplate(tmpl CustomVerificationEmailTemplate) error
CreateCustomVerificationEmailTemplate creates a custom verification email template.
func (*InMemoryBackend) CreateReceiptFilter ¶
func (b *InMemoryBackend) CreateReceiptFilter(filter ReceiptFilter) error
CreateReceiptFilter creates a new IP-based receipt filter.
func (*InMemoryBackend) CreateReceiptRule ¶
func (b *InMemoryBackend) CreateReceiptRule(ruleSetName string, rule ReceiptRule, after string) error
CreateReceiptRule adds a new rule to an existing receipt rule set.
func (*InMemoryBackend) CreateReceiptRuleSet ¶
func (b *InMemoryBackend) CreateReceiptRuleSet(name string) error
CreateReceiptRuleSet creates a new receipt rule set. Returns ErrReceiptRuleSetExists if it already exists.
func (*InMemoryBackend) CreateTemplate ¶
func (b *InMemoryBackend) CreateTemplate(tmpl EmailTemplate) error
CreateTemplate stores a new email template. Returns ErrTemplateExists if the name is taken.
func (*InMemoryBackend) DeleteConfigurationSet ¶
func (b *InMemoryBackend) DeleteConfigurationSet(name string) error
DeleteConfigurationSet removes a configuration set. Returns ErrConfigSetNotFound if the set does not exist, matching real AWS SES behavior.
func (*InMemoryBackend) DeleteConfigurationSetEventDestination ¶
func (b *InMemoryBackend) DeleteConfigurationSetEventDestination(configSetName, destName string) error
DeleteConfigurationSetEventDestination removes an event destination from a configuration set.
func (*InMemoryBackend) DeleteConfigurationSetTrackingOptions ¶
func (b *InMemoryBackend) DeleteConfigurationSetTrackingOptions(configSetName string) error
DeleteConfigurationSetTrackingOptions removes the tracking options from a configuration set.
func (*InMemoryBackend) DeleteCustomVerificationEmailTemplate ¶
func (b *InMemoryBackend) DeleteCustomVerificationEmailTemplate(templateName string) error
DeleteCustomVerificationEmailTemplate removes a custom verification email template.
func (*InMemoryBackend) DeleteIdentity ¶
func (b *InMemoryBackend) DeleteIdentity(identity string)
DeleteIdentity removes a verified identity. This is idempotent — deleting a non-existent identity returns success, matching real AWS SES behavior.
func (*InMemoryBackend) DeleteIdentityPolicy ¶
func (b *InMemoryBackend) DeleteIdentityPolicy(identity, policyName string) error
DeleteIdentityPolicy removes a sending authorization policy from an identity. Deleting a non-existent policy is idempotent.
func (*InMemoryBackend) DeleteReceiptFilter ¶
func (b *InMemoryBackend) DeleteReceiptFilter(name string) error
DeleteReceiptFilter removes a receipt filter by name.
func (*InMemoryBackend) DeleteReceiptRule ¶
func (b *InMemoryBackend) DeleteReceiptRule(ruleSetName, ruleName string) error
DeleteReceiptRule removes a receipt rule from a rule set.
func (*InMemoryBackend) DeleteReceiptRuleSet ¶
func (b *InMemoryBackend) DeleteReceiptRuleSet(name string) error
DeleteReceiptRuleSet removes a receipt rule set and its rules. Matching real AWS SES ("The currently active rule set cannot be deleted."), deleting the currently active rule set is rejected with ErrReceiptRuleSetActive (wire code CannotDelete) rather than silently clearing the active pointer; the caller must first call SetActiveReceiptRuleSet with a different name (or "") before the delete will succeed.
func (*InMemoryBackend) DeleteTemplate ¶
func (b *InMemoryBackend) DeleteTemplate(name string)
DeleteTemplate removes the named template. Idempotent — missing template returns success.
func (*InMemoryBackend) DeleteVerifiedEmailAddress ¶
func (b *InMemoryBackend) DeleteVerifiedEmailAddress(email string)
DeleteVerifiedEmailAddress removes a verified email address (legacy API).
func (*InMemoryBackend) DescribeActiveReceiptRuleSet ¶
func (b *InMemoryBackend) DescribeActiveReceiptRuleSet() (ReceiptRuleSet, bool, error)
DescribeActiveReceiptRuleSet returns the active receipt rule set. Returns false if none is set.
func (*InMemoryBackend) DescribeConfigurationSet ¶
func (b *InMemoryBackend) DescribeConfigurationSet(name string) (ConfigurationSetDescription, error)
DescribeConfigurationSet returns the named configuration set metadata plus event destinations and tracking options.
func (*InMemoryBackend) DescribeReceiptRule ¶
func (b *InMemoryBackend) DescribeReceiptRule(ruleSetName, ruleName string) (ReceiptRule, error)
DescribeReceiptRule returns a named rule from a rule set.
func (*InMemoryBackend) DescribeReceiptRuleSet ¶
func (b *InMemoryBackend) DescribeReceiptRuleSet(name string) (ReceiptRuleSet, error)
DescribeReceiptRuleSet returns a deep copy of the named rule set.
func (*InMemoryBackend) GetAccountSendingEnabled ¶
func (b *InMemoryBackend) GetAccountSendingEnabled() bool
GetAccountSendingEnabled returns the account-level sending enabled flag.
func (*InMemoryBackend) GetCustomVerificationEmailTemplate ¶
func (b *InMemoryBackend) GetCustomVerificationEmailTemplate( templateName string, ) (CustomVerificationEmailTemplate, error)
GetCustomVerificationEmailTemplate returns the named custom verification email template.
func (*InMemoryBackend) GetEmailByID ¶
func (b *InMemoryBackend) GetEmailByID(messageID string) (Email, error)
GetEmailByID returns the email with the given MessageID in O(1) time, or an error if not found.
func (*InMemoryBackend) GetIdentityDkimAttributes ¶
func (b *InMemoryBackend) GetIdentityDkimAttributes(identities []string) map[string]DkimAttributes
GetIdentityDkimAttributes returns DKIM attributes for each identity. Known identities return their persisted DKIM state; unknown identities return NotStarted.
func (*InMemoryBackend) GetIdentityMailFromDomainAttributes ¶
func (b *InMemoryBackend) GetIdentityMailFromDomainAttributes(identities []string) map[string]MailFromDomainAttributes
GetIdentityMailFromDomainAttributes returns MailFrom attributes for each identity. Identities with a configured MailFromDomain return Success; others return an empty status.
func (*InMemoryBackend) GetIdentityNotificationAttributes ¶
func (b *InMemoryBackend) GetIdentityNotificationAttributes(identities []string) map[string]NotificationAttributes
GetIdentityNotificationAttributes returns notification attributes for each identity.
func (*InMemoryBackend) GetIdentityPolicies ¶
func (b *InMemoryBackend) GetIdentityPolicies(identity string, policyNames []string) (map[string]string, error)
GetIdentityPolicies returns the policy documents for the given identity filtered by name. An empty policyNames list returns all policies for the identity.
func (*InMemoryBackend) GetIdentityVerificationAttributes ¶
func (b *InMemoryBackend) GetIdentityVerificationAttributes(identities []string) map[string]string
GetIdentityVerificationAttributes returns verification status for each requested identity. Verified identities return Success; unknown identities return NotStarted.
func (*InMemoryBackend) GetSendQuota ¶
func (b *InMemoryBackend) GetSendQuota() SendQuota
GetSendQuota returns simulated quota values. SentLast24Hours counts only emails sent within the past 24 hours.
func (*InMemoryBackend) GetSendStatistics ¶
func (b *InMemoryBackend) GetSendStatistics() []SendDataPoint
GetSendStatistics returns aggregated send data points (one per hour) for the last 14 days, matching real AWS SES behavior.
func (*InMemoryBackend) GetTemplate ¶
func (b *InMemoryBackend) GetTemplate(name string) (EmailTemplate, error)
GetTemplate returns the named template or ErrTemplateNotFound.
func (*InMemoryBackend) ListConfigurationSets ¶
ListConfigurationSets returns configuration set names sorted alphabetically.
func (*InMemoryBackend) ListCustomVerificationEmailTemplates ¶
func (b *InMemoryBackend) ListCustomVerificationEmailTemplates() []CustomVerificationEmailTemplate
ListCustomVerificationEmailTemplates returns a sorted slice of all custom verification email templates.
func (*InMemoryBackend) ListEmails ¶
func (b *InMemoryBackend) ListEmails() []Email
ListEmails returns a copy of all captured emails.
func (*InMemoryBackend) ListIdentities ¶
ListIdentities returns a paginated list of registered identities sorted alphabetically.
func (*InMemoryBackend) ListIdentityPolicies ¶
func (b *InMemoryBackend) ListIdentityPolicies(identity string) ([]string, error)
ListIdentityPolicies returns the names of sending authorization policies for an identity.
func (*InMemoryBackend) ListReceiptFilters ¶
func (b *InMemoryBackend) ListReceiptFilters() []ReceiptFilter
ListReceiptFilters returns a sorted slice of all receipt filters.
func (*InMemoryBackend) ListReceiptRuleSets ¶
func (b *InMemoryBackend) ListReceiptRuleSets() []ReceiptRuleSet
ListReceiptRuleSets returns a sorted slice of all receipt rule sets (name + createdAt only).
func (*InMemoryBackend) ListTemplates ¶
ListTemplates returns template names sorted alphabetically, with pagination.
func (*InMemoryBackend) ListVerifiedEmailAddresses ¶
func (b *InMemoryBackend) ListVerifiedEmailAddresses() []string
ListVerifiedEmailAddresses returns all verified identities that are email addresses (contain @).
func (*InMemoryBackend) PutConfigurationSetDeliveryOptions ¶
func (b *InMemoryBackend) PutConfigurationSetDeliveryOptions(configSetName, tlsPolicy string) error
PutConfigurationSetDeliveryOptions persists the TLS policy for a configuration set.
func (*InMemoryBackend) PutIdentityPolicy ¶
func (b *InMemoryBackend) PutIdentityPolicy(identity, policyName, policy string) error
PutIdentityPolicy stores a sending authorization policy for an identity. Real AWS SES validates that Policy is a well-formed JSON IAM-style policy document and rejects malformed input with InvalidPolicyException; this backend does not evaluate policy semantics (no sending-authorization enforcement exists anywhere in this emulator), but it does reject non-JSON input the same way, matching the wire error code.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the AWS region for this backend instance.
func (*InMemoryBackend) ReorderReceiptRuleSet ¶
func (b *InMemoryBackend) ReorderReceiptRuleSet(ruleSetName string, ruleNames []string) error
ReorderReceiptRuleSet reorders the rules in a rule set according to the given ordered name list.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all in-memory state, restoring the backend to its initial empty state. The configured email TTL (set via WithEmailTTL) is preserved.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.
func (*InMemoryBackend) SearchEmails ¶
func (b *InMemoryBackend) SearchEmails(query string) []Email
SearchEmails returns emails whose From, Subject, or To fields contain the given query string (case-insensitive). This provides O(n) filtered access while leveraging the existing email slice.
func (*InMemoryBackend) SendBounce ¶
func (b *InMemoryBackend) SendBounce(originalMsgID, bounceSender string, recipients []string) (string, error)
SendBounce generates and sends a bounce message for a previously received email. Real AWS SES models BounceSender and BouncedRecipientInfoList as required input members (SendBounceInput), so both must be supplied here; BounceSender must additionally be a verified identity (or a verified domain), matching the same sender-verification rule enforced by SendEmail.
func (*InMemoryBackend) SendBulkTemplatedEmail ¶
func (b *InMemoryBackend) SendBulkTemplatedEmail(in SendBulkTemplatedEmailInput) ([]string, error)
SendBulkTemplatedEmail sends one email per destination and returns a message ID for each. Each destination is rendered with the request-level DefaultTemplateData merged with that destination's ReplacementTemplateData, matching AWS SES SendBulkTemplatedEmail semantics where replacement values override defaults on a per-recipient basis. ConfigurationSetName, ReplyTo, ReturnPath, ReturnPathArn and SourceArn mirror the corresponding SendBulkTemplatedEmailInput members and are threaded through to every generated Email record exactly as SendEmail/SendTemplatedEmail do for a single-destination send. Message tags follow the same per-destination override pattern as template data: a destination's ReplacementTags, when non-empty, is used in place of (not merged with) the request-level DefaultTags for that destination's stored Email record.
func (*InMemoryBackend) SendCustomVerificationEmail ¶
func (b *InMemoryBackend) SendCustomVerificationEmail( email, templateName, configurationSetName string, ) (string, error)
SendCustomVerificationEmail adds email to the account's identity list and attempts to verify it (matching this backend's instant-verification convention shared by VerifyEmailIdentity/VerifyEmailAddress) and sends a verification email using the named custom template. templateName must reference an existing custom verification email template (CreateCustomVerificationEmailTemplate), and configurationSetName, if supplied, must reference an existing configuration set — both required preconditions on the real AWS SES SendCustomVerificationEmailInput.
func (*InMemoryBackend) SendEmail ¶
func (b *InMemoryBackend) SendEmail(in SendEmailInput) (string, error)
SendEmail captures an outbound email and returns a message ID. The source address must be a verified identity or from a verified domain (matching real AWS SES behavior).
func (*InMemoryBackend) SendTemplatedEmail ¶
func (b *InMemoryBackend) SendTemplatedEmail(in SendTemplatedEmailInput) (string, error)
SendTemplatedEmail sends an email using a stored template and returns the message ID. The source address must be a verified identity or from a verified domain. The template must already exist; ErrTemplateNotFound is returned otherwise.
func (*InMemoryBackend) SetActiveReceiptRuleSet ¶
func (b *InMemoryBackend) SetActiveReceiptRuleSet(name string) error
SetActiveReceiptRuleSet sets the named rule set as active. Passing an empty name clears the active rule set.
func (*InMemoryBackend) SetIdentityDkimEnabled ¶
func (b *InMemoryBackend) SetIdentityDkimEnabled(identity string, enabled bool) error
SetIdentityDkimEnabled persists the DKIM-enabled flag for an identity.
func (*InMemoryBackend) SetIdentityFeedbackForwardingEnabled ¶
func (b *InMemoryBackend) SetIdentityFeedbackForwardingEnabled(identity string, enabled bool) error
SetIdentityFeedbackForwardingEnabled persists the forwarding-enabled flag for an identity.
func (*InMemoryBackend) SetIdentityHeadersInNotificationsEnabled ¶
func (b *InMemoryBackend) SetIdentityHeadersInNotificationsEnabled( identity, notificationType string, enabled bool, ) error
SetIdentityHeadersInNotificationsEnabled persists the header-inclusion flag for an identity and notification type (Bounce, Complaint, or Delivery).
func (*InMemoryBackend) SetIdentityMailFromDomain ¶
func (b *InMemoryBackend) SetIdentityMailFromDomain(identity, mailFromDomain, behaviorOnMXFailure string) error
SetIdentityMailFromDomain persists the custom MAIL FROM domain for an identity. An empty mailFromDomain clears the setting (and its BehaviorOnMXFailure). behaviorOnMXFailure must be "UseDefaultValue" or "RejectMessage"; an empty value defaults to "UseDefaultValue", matching real AWS SES.
func (*InMemoryBackend) SetIdentityNotificationTopic ¶
func (b *InMemoryBackend) SetIdentityNotificationTopic(identity, notificationType, snsTopic string) error
SetIdentityNotificationTopic persists the SNS notification topic for an identity and notification type (Bounce, Complaint, or Delivery).
func (*InMemoryBackend) SetReceiptRulePosition ¶
func (b *InMemoryBackend) SetReceiptRulePosition(ruleSetName, ruleName string, position int) error
SetReceiptRulePosition moves a rule to the given zero-based position in a rule set.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) TestRenderTemplate ¶
func (b *InMemoryBackend) TestRenderTemplate(templateName, templateData string) (string, error)
TestRenderTemplate renders the named template with the given JSON template data. Variable substitution uses {{key}} syntax matching AWS SES Handlebars-style templating.
func (*InMemoryBackend) UpdateAccountSendingEnabled ¶
func (b *InMemoryBackend) UpdateAccountSendingEnabled(enabled bool)
UpdateAccountSendingEnabled persists the account-level sending enabled flag.
func (*InMemoryBackend) UpdateConfigurationSetEventDestination ¶
func (b *InMemoryBackend) UpdateConfigurationSetEventDestination(configSetName string, dest EventDestination) error
UpdateConfigurationSetEventDestination updates an existing event destination on a configuration set.
func (*InMemoryBackend) UpdateConfigurationSetReputationMetricsEnabled ¶
func (b *InMemoryBackend) UpdateConfigurationSetReputationMetricsEnabled(configSetName string, enabled bool) error
UpdateConfigurationSetReputationMetricsEnabled persists the reputation metrics flag.
func (*InMemoryBackend) UpdateConfigurationSetSendingEnabled ¶
func (b *InMemoryBackend) UpdateConfigurationSetSendingEnabled(configSetName string, enabled bool) error
UpdateConfigurationSetSendingEnabled persists the sending-enabled flag.
func (*InMemoryBackend) UpdateConfigurationSetTrackingOptions ¶
func (b *InMemoryBackend) UpdateConfigurationSetTrackingOptions(configSetName, customRedirectDomain string) error
UpdateConfigurationSetTrackingOptions updates the tracking options for a configuration set.
func (*InMemoryBackend) UpdateCustomVerificationEmailTemplate ¶
func (b *InMemoryBackend) UpdateCustomVerificationEmailTemplate(tmpl CustomVerificationEmailTemplate) error
UpdateCustomVerificationEmailTemplate updates an existing custom verification email template.
func (*InMemoryBackend) UpdateReceiptRule ¶
func (b *InMemoryBackend) UpdateReceiptRule(ruleSetName string, rule ReceiptRule) error
UpdateReceiptRule replaces an existing rule in a rule set.
func (*InMemoryBackend) UpdateTemplate ¶
func (b *InMemoryBackend) UpdateTemplate(tmpl EmailTemplate) error
UpdateTemplate overwrites an existing template. Returns ErrTemplateNotFound if it does not exist.
func (*InMemoryBackend) VerifyDomainDkim ¶
func (b *InMemoryBackend) VerifyDomainDkim(domain string) ([]string, error)
VerifyDomainDkim adds a domain as a verified identity and returns deterministic DKIM tokens.
func (*InMemoryBackend) VerifyDomainIdentity ¶
func (b *InMemoryBackend) VerifyDomainIdentity(domain string) (string, error)
VerifyDomainIdentity adds a domain as a verified identity, returning a deterministic verification token.
func (*InMemoryBackend) VerifyEmailAddress ¶
func (b *InMemoryBackend) VerifyEmailAddress(email string) error
VerifyEmailAddress is an alias for VerifyEmailIdentity (legacy API).
func (*InMemoryBackend) VerifyEmailIdentity ¶
func (b *InMemoryBackend) VerifyEmailIdentity(identity string) error
VerifyEmailIdentity adds an identity (address or domain) and marks it as verified. If the identity already exists its verified flag is updated without clearing other attributes.
func (*InMemoryBackend) WithAccountID ¶
func (b *InMemoryBackend) WithAccountID(accountID string) *InMemoryBackend
WithAccountID sets the AWS account ID for this backend instance and returns it for chaining.
func (*InMemoryBackend) WithEmailTTL ¶
func (b *InMemoryBackend) WithEmailTTL(ttl time.Duration) *InMemoryBackend
WithEmailTTL sets the TTL for stored sent emails and returns the backend for chaining. Zero falls back to the default TTL. The configured TTL is preserved across Reset() calls.
func (*InMemoryBackend) WithRegion ¶
func (b *InMemoryBackend) WithRegion(region string) *InMemoryBackend
WithRegion sets the AWS region for this backend instance and returns it for chaining.
type Janitor ¶
type Janitor struct {
Backend *InMemoryBackend
Interval time.Duration
TaskTimeout time.Duration
}
Janitor is the SES background worker that evicts emails older than the configured TTL to prevent unbounded memory and persistence growth.
func NewJanitor ¶
func NewJanitor(backend *InMemoryBackend, interval time.Duration) *Janitor
NewJanitor creates a new SES Janitor for the given backend. A zero interval falls back to defaultSESJanitorInterval.
type MailFromDomainAttributes ¶
type MailFromDomainAttributes struct {
MailFromDomain string
MailFromDomainStatus string
BehaviorOnMXFailure string
}
MailFromDomainAttributes holds MailFrom domain attributes for an identity.
type NotificationAttributes ¶
type NotificationAttributes struct {
BounceTopic string
ComplaintTopic string
DeliveryTopic string
ForwardingEnabled bool
HeadersInBounce bool
HeadersInComplaint bool
HeadersInDelivery bool
}
NotificationAttributes holds notification topic attributes for an identity.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for the SES service.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the SES service backend and handler.
type ReceiptAction ¶
type ReceiptAction struct {
Type string `json:"type"`
S3BucketName string `json:"s3BucketName,omitempty"`
S3KeyPrefix string `json:"s3KeyPrefix,omitempty"`
S3TopicARN string `json:"s3TopicARN,omitempty"`
SNSTopicARN string `json:"snsTopicARN,omitempty"`
LambdaFunctionARN string `json:"lambdaFunctionARN,omitempty"`
LambdaTopicARN string `json:"lambdaTopicARN,omitempty"`
SQSQueueARN string `json:"sqsQueueARN,omitempty"`
SQSTopicARN string `json:"sqsTopicARN,omitempty"`
HeaderName string `json:"headerName,omitempty"`
HeaderValue string `json:"headerValue,omitempty"`
SMTPReplyCode string `json:"smtpReplyCode,omitempty"`
StatusCode string `json:"statusCode,omitempty"`
Message string `json:"message,omitempty"`
Sender string `json:"sender,omitempty"`
BounceTopicARN string `json:"bounceTopicARN,omitempty"`
}
ReceiptAction is a single action within a receipt rule. Type identifies which action fields apply: S3, SNS, Lambda, SQS, AddHeader, Bounce, Stop.
type ReceiptFilter ¶
type ReceiptFilter struct {
Name string `json:"name"`
Policy string `json:"policy"`
CIDR string `json:"cidr"`
}
ReceiptFilter represents an IP-based receipt filter.
type ReceiptRule ¶
type ReceiptRule struct {
Name string `json:"name"`
TLSPolicy string `json:"tlsPolicy"`
Recipients []string `json:"recipients"`
Actions []ReceiptAction `json:"actions,omitempty"`
Enabled bool `json:"enabled"`
ScanEnabled bool `json:"scanEnabled"`
}
ReceiptRule represents a single receipt rule within a rule set.
type ReceiptRuleSet ¶
type ReceiptRuleSet struct {
Name string `json:"name"`
CreatedAt time.Time `json:"createdAt"`
Rules []ReceiptRule `json:"rules"`
}
ReceiptRuleSet represents an SES receipt rule set.
type SendBulkTemplatedEmailInput ¶ added in v1.2.0
type SendBulkTemplatedEmailInput struct {
Source string
TemplateName string
DefaultTemplateData string
ConfigurationSetName string
ReturnPath string
ReturnPathArn string
SourceArn string
ReplyTo []string
DefaultTags []Tag
Destinations []BulkEmailDestination
}
SendBulkTemplatedEmailInput contains all parameters for SendBulkTemplatedEmail, mirroring aws-sdk-go-v2/service/ses's SendBulkTemplatedEmailInput. DefaultTags is applied to every destination's stored Email record unless overridden by that destination's BulkEmailDestination.ReplacementTags.
type SendDataPoint ¶
type SendDataPoint struct {
Timestamp time.Time `json:"timestamp"`
DeliveryAttempts float64 `json:"deliveryAttempts"`
Bounces float64 `json:"bounces"`
Complaints float64 `json:"complaints"`
Rejects float64 `json:"rejects"`
}
SendDataPoint represents a single send statistics time bucket.
type SendEmailInput ¶
type SendEmailInput struct {
Tags []Tag
From string
Subject string
BodyHTML string
BodyText string
ConfigurationSetName string
ReturnPath string
ReturnPathArn string
SourceArn string
To []string
Cc []string
Bcc []string
ReplyTo []string
}
SendEmailInput contains all parameters for sending an email.
type SendTemplatedEmailInput ¶
type SendTemplatedEmailInput struct {
Tags []Tag
From string
TemplateName string
TemplateData string
ConfigurationSetName string
ReturnPath string
ReturnPathArn string
SourceArn string
To []string
Cc []string
Bcc []string
ReplyTo []string
}
SendTemplatedEmailInput contains all parameters for sending a templated email.
type Settings ¶
type Settings struct {
JanitorInterval time.Duration `json:"janitor_interval" env:"SES_JANITOR_INTERVAL" default:"1m" help:"Janitor tick interval."` //nolint:lll // Kong struct tag makes this line long
EmailTTL time.Duration `json:"email_ttl" env:"SES_EMAIL_TTL" default:"24h" help:"TTL for stored sent emails before they are evicted."` //nolint:lll // Kong struct tag makes this line long
}
Settings holds service-level configuration for the SES backend. Fields are picked up by the Kong CLI parser when this struct is embedded in the root CLI command.
type StorageBackend ¶
type StorageBackend interface {
VerifyEmailIdentity(identity string) error
DeleteIdentity(identity string)
ListIdentities(nextToken string, maxItems int) page.Page[string]
GetIdentityVerificationAttributes(identities []string) map[string]string
SendEmail(in SendEmailInput) (string, error)
SendTemplatedEmail(in SendTemplatedEmailInput) (string, error)
ListEmails() []Email
GetEmailByID(messageID string) (Email, error)
SearchEmails(query string) []Email
CreateTemplate(tmpl EmailTemplate) error
UpdateTemplate(tmpl EmailTemplate) error
GetTemplate(name string) (EmailTemplate, error)
DeleteTemplate(name string)
ListTemplates(nextToken string, maxItems int) page.Page[string]
CreateConfigurationSet(name string) error
DeleteConfigurationSet(name string) error
ListConfigurationSets(nextToken string, maxItems int) page.Page[string]
DescribeConfigurationSet(name string) (ConfigurationSetDescription, error)
PutConfigurationSetDeliveryOptions(configSetName, tlsPolicy string) error
GetSendQuota() SendQuota
GetSendStatistics() []SendDataPoint
CreateReceiptRuleSet(name string) error
CloneReceiptRuleSet(originalName, newName string) error
CreateReceiptRule(ruleSetName string, rule ReceiptRule, after string) error
DescribeReceiptRule(ruleSetName, ruleName string) (ReceiptRule, error)
UpdateReceiptRule(ruleSetName string, rule ReceiptRule) error
ReorderReceiptRuleSet(ruleSetName string, ruleNames []string) error
SetReceiptRulePosition(ruleSetName, ruleName string, position int) error
CreateReceiptFilter(filter ReceiptFilter) error
CreateConfigurationSetEventDestination(configSetName string, dest EventDestination) error
DeleteConfigurationSetEventDestination(configSetName, destName string) error
UpdateConfigurationSetEventDestination(configSetName string, dest EventDestination) error
UpdateConfigurationSetReputationMetricsEnabled(configSetName string, enabled bool) error
UpdateConfigurationSetSendingEnabled(configSetName string, enabled bool) error
CreateConfigurationSetTrackingOptions(configSetName, customRedirectDomain string) error
DeleteConfigurationSetTrackingOptions(configSetName string) error
UpdateConfigurationSetTrackingOptions(configSetName, customRedirectDomain string) error
CreateCustomVerificationEmailTemplate(tmpl CustomVerificationEmailTemplate) error
DeleteCustomVerificationEmailTemplate(templateName string) error
UpdateCustomVerificationEmailTemplate(tmpl CustomVerificationEmailTemplate) error
ListReceiptFilters() []ReceiptFilter
ListReceiptRuleSets() []ReceiptRuleSet
DeleteReceiptFilter(name string) error
DeleteReceiptRule(ruleSetName, ruleName string) error
DeleteReceiptRuleSet(name string) error
GetCustomVerificationEmailTemplate(templateName string) (CustomVerificationEmailTemplate, error)
ListCustomVerificationEmailTemplates() []CustomVerificationEmailTemplate
DescribeReceiptRuleSet(name string) (ReceiptRuleSet, error)
SetActiveReceiptRuleSet(name string) error
DescribeActiveReceiptRuleSet() (ReceiptRuleSet, bool, error)
// Identity policy ops
PutIdentityPolicy(identity, policyName, policy string) error
DeleteIdentityPolicy(identity, policyName string) error
GetIdentityPolicies(identity string, policyNames []string) (map[string]string, error)
ListIdentityPolicies(identity string) ([]string, error)
// Identity attribute ops
GetIdentityDkimAttributes(identities []string) map[string]DkimAttributes
GetIdentityMailFromDomainAttributes(identities []string) map[string]MailFromDomainAttributes
GetIdentityNotificationAttributes(identities []string) map[string]NotificationAttributes
SetIdentityDkimEnabled(identity string, enabled bool) error
SetIdentityFeedbackForwardingEnabled(identity string, enabled bool) error
SetIdentityHeadersInNotificationsEnabled(identity, notificationType string, enabled bool) error
SetIdentityMailFromDomain(identity, mailFromDomain, behaviorOnMXFailure string) error
SetIdentityNotificationTopic(identity, notificationType, snsTopic string) error
// Domain verification
VerifyDomainIdentity(domain string) (string, error)
VerifyDomainDkim(domain string) ([]string, error)
VerifyEmailAddress(email string) error
DeleteVerifiedEmailAddress(email string)
ListVerifiedEmailAddresses() []string
// Account-level
UpdateAccountSendingEnabled(enabled bool)
GetAccountSendingEnabled() bool
// Send ops
SendBounce(originalMsgID, bounceSender string, recipients []string) (string, error)
SendBulkTemplatedEmail(in SendBulkTemplatedEmailInput) ([]string, error)
SendCustomVerificationEmail(email, templateName, configurationSetName string) (string, error)
TestRenderTemplate(templateName, templateData string) (string, error)
Region() string
AccountID() string
Reset()
Snapshot(ctx context.Context) []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend defines the persistence contract for the SES service.
type TrackingOptions ¶
type TrackingOptions struct {
// ConfigSetName is the configuration set name this value is keyed by in
// the trackingOptions Table (see store_setup.go). Tagged json:"-" for
// the same reason as IdentityRecord.Identity -- see its doc comment.
ConfigSetName string `json:"-"`
CustomRedirectDomain string `json:"customRedirectDomain"`
}
TrackingOptions represents the tracking options for a configuration set.
Source Files
¶
- configuration_sets.go
- custom_verification.go
- dkim.go
- email_sending.go
- errors.go
- event_destinations.go
- handler.go
- handler_configuration_sets.go
- handler_custom_verification.go
- handler_dkim.go
- handler_email_sending.go
- handler_event_destinations.go
- handler_identities.go
- handler_receipt_rule_sets.go
- handler_receipt_rules.go
- handler_sending_stats.go
- handler_templates.go
- handler_verification.go
- identities.go
- interfaces.go
- janitor.go
- models.go
- persistence.go
- provider.go
- receipt_rule_sets.go
- receipt_rules.go
- sending_stats.go
- settings.go
- store.go
- store_setup.go
- templates.go
- verification.go