Documentation
¶
Index ¶
- Variables
- type AccountDetails
- type ArchivingOptions
- type ConfigurationSet
- type Contact
- type ContactList
- type CustomVerificationEmailTemplate
- type DedicatedIP
- type DedicatedIPPool
- type DeliverabilityTestReport
- type Email
- type EmailIdentity
- type EmailTemplate
- type EmailTemplateContent
- type EventDestination
- type ExportJob
- 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) Snapshot(ctx context.Context) []byte
- type ImportJob
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AddContactListInternal(name string) *ContactList
- func (b *InMemoryBackend) AddExportJobInternal(jobID, status string) *ExportJob
- func (b *InMemoryBackend) BatchGetMetricData(queries []MetricDataQuery) ([]MetricDataResult, error)
- func (b *InMemoryBackend) CancelExportJob(jobID string) error
- func (b *InMemoryBackend) CreateConfigurationSet(name string) (*ConfigurationSet, error)
- func (b *InMemoryBackend) CreateConfigurationSetEventDestination(configSetName, destName string, enabled bool, matchingEventTypes []string) (*EventDestination, error)
- func (b *InMemoryBackend) CreateContact(contactListName, emailAddress string, topicPreferences []TopicPreference) (*Contact, error)
- func (b *InMemoryBackend) CreateContactList(name, description string) (*ContactList, error)
- func (b *InMemoryBackend) CreateCustomVerificationEmailTemplate(in *CustomVerificationEmailTemplate) (*CustomVerificationEmailTemplate, error)
- func (b *InMemoryBackend) CreateDedicatedIPPool(poolName, scalingMode string) (*DedicatedIPPool, error)
- func (b *InMemoryBackend) CreateDeliverabilityTestReport(reportName, fromEmailAddress string) (*DeliverabilityTestReport, error)
- func (b *InMemoryBackend) CreateEmailIdentity(identity, configurationSetName string, tags map[string]string) (*EmailIdentity, error)
- func (b *InMemoryBackend) CreateEmailIdentityPolicy(identity, policyName, policy string) error
- func (b *InMemoryBackend) CreateEmailTemplate(templateName string, content *EmailTemplateContent) (*EmailTemplate, error)
- func (b *InMemoryBackend) CreateExportJob(dataSource string) (*ExportJob, error)
- func (b *InMemoryBackend) CreateImportJob(dataSource string) (*ImportJob, error)
- func (b *InMemoryBackend) CreateMultiRegionEndpoint(endpointName string, secondaryRegions []string, tags map[string]string) (*createMultiRegionEndpointOutput, error)
- func (b *InMemoryBackend) CreateTenant(tenantName string, tags map[string]string) (*tenantOutput, error)
- func (b *InMemoryBackend) CreateTenantResourceAssociation(tenantName, resourceArn string) error
- func (b *InMemoryBackend) DeleteConfigurationSet(name string) error
- func (b *InMemoryBackend) DeleteConfigurationSetEventDestination(configSetName, destName string) error
- func (b *InMemoryBackend) DeleteContact(contactListName, emailAddress string) error
- func (b *InMemoryBackend) DeleteContactList(name string) error
- func (b *InMemoryBackend) DeleteCustomVerificationEmailTemplate(name string) error
- func (b *InMemoryBackend) DeleteDedicatedIPPool(poolName string) error
- func (b *InMemoryBackend) DeleteEmailIdentity(identity string) error
- func (b *InMemoryBackend) DeleteEmailIdentityPolicy(identity, policyName string) error
- func (b *InMemoryBackend) DeleteEmailTemplate(name string) error
- func (b *InMemoryBackend) DeleteMultiRegionEndpoint(endpointName string) (string, error)
- func (b *InMemoryBackend) DeleteSuppressedDestination(email string) error
- func (b *InMemoryBackend) DeleteTenant(tenantName string) error
- func (b *InMemoryBackend) DeleteTenantResourceAssociation(tenantName, resourceArn string) error
- func (b *InMemoryBackend) GetAccount() (*AccountDetails, error)
- func (b *InMemoryBackend) GetBlacklistReports() (map[string][]string, error)
- func (b *InMemoryBackend) GetConfigurationSet(name string) (*ConfigurationSet, error)
- func (b *InMemoryBackend) GetConfigurationSetEventDestinations(configSetName string) ([]*EventDestination, error)
- func (b *InMemoryBackend) GetContact(contactListName, emailAddress string) (*Contact, error)
- func (b *InMemoryBackend) GetContactList(name string) (*ContactList, error)
- func (b *InMemoryBackend) GetCustomVerificationEmailTemplate(name string) (*CustomVerificationEmailTemplate, error)
- func (b *InMemoryBackend) GetDedicatedIP(ip string) (map[string]any, error)
- func (b *InMemoryBackend) GetDedicatedIPPool(poolName string) (*DedicatedIPPool, error)
- func (b *InMemoryBackend) GetDedicatedIps() []map[string]any
- func (b *InMemoryBackend) GetDeliverabilityDashboardOptions() (map[string]any, error)
- func (b *InMemoryBackend) GetDeliverabilityTestReport(reportID string) (*DeliverabilityTestReport, error)
- func (b *InMemoryBackend) GetDomainDeliverabilityCampaign(campaignID string) (map[string]any, error)
- func (b *InMemoryBackend) GetDomainStatisticsReport(domain, startDate, endDate string) (map[string]any, error)
- func (b *InMemoryBackend) GetEmailAddressInsights(emailAddress string) (map[string]any, error)
- func (b *InMemoryBackend) GetEmailIdentity(identity string) (*EmailIdentity, error)
- func (b *InMemoryBackend) GetEmailIdentityPolicies(identity string) (map[string]string, error)
- func (b *InMemoryBackend) GetEmailTemplate(name string) (*EmailTemplate, error)
- func (b *InMemoryBackend) GetExportJob(jobID string) (*ExportJob, error)
- func (b *InMemoryBackend) GetImportJob(jobID string) (*ImportJob, error)
- func (b *InMemoryBackend) GetMessageInsights(messageID string) (map[string]any, error)
- func (b *InMemoryBackend) GetMultiRegionEndpoint(endpointName string) (*multiRegionEndpointOutput, error)
- func (b *InMemoryBackend) GetReputationEntity(entityID string) (reputationEntityOutput, error)
- func (b *InMemoryBackend) GetSuppressedDestination(email string) (*SuppressedDestination, error)
- func (b *InMemoryBackend) GetTenant(tenantName string) (*tenantOutput, error)
- func (b *InMemoryBackend) ListConfigurationSets(nextToken string, pageSize int) page.Page[*ConfigurationSet]
- func (b *InMemoryBackend) ListContactLists(nextToken string, pageSize int) page.Page[*ContactList]
- func (b *InMemoryBackend) ListContacts(contactListName, nextToken string, pageSize int) (page.Page[*Contact], error)
- func (b *InMemoryBackend) ListCustomVerificationEmailTemplates(nextToken string, pageSize int) page.Page[*CustomVerificationEmailTemplate]
- func (b *InMemoryBackend) ListDedicatedIPPools(nextToken string, pageSize int) page.Page[string]
- func (b *InMemoryBackend) ListDeliverabilityTestReports(nextToken string, pageSize int) page.Page[*DeliverabilityTestReport]
- func (b *InMemoryBackend) ListDomainDeliverabilityCampaigns(startDate, endDate, domain, nextToken string) ([]map[string]any, string, error)
- func (b *InMemoryBackend) ListEmailIdentities(nextToken string, pageSize int) page.Page[*EmailIdentity]
- func (b *InMemoryBackend) ListEmailTemplates(nextToken string, pageSize int) page.Page[*EmailTemplate]
- func (b *InMemoryBackend) ListEmails() []Email
- func (b *InMemoryBackend) ListExportJobs(nextToken string, pageSize int) page.Page[*ExportJob]
- func (b *InMemoryBackend) ListImportJobs(nextToken string, pageSize int) page.Page[*ImportJob]
- func (b *InMemoryBackend) ListMultiRegionEndpoints(nextToken string, pageSize int) ([]multiRegionEndpointSummaryOutput, string, error)
- func (b *InMemoryBackend) ListRecommendations(filter map[string]string, nextToken string, pageSize int) ([]recommendationOutput, string, error)
- func (b *InMemoryBackend) ListReputationEntities(_ string, _ int) ([]reputationEntityOutput, string, error)
- func (b *InMemoryBackend) ListResourceTenants(resourceArn, nextToken string, pageSize int) ([]resourceTenantOutput, string, error)
- func (b *InMemoryBackend) ListSuppressedDestinations(nextToken string, pageSize int) page.Page[*SuppressedDestination]
- func (b *InMemoryBackend) ListTagsForResource(arn string) (map[string]string, error)
- func (b *InMemoryBackend) ListTenantResources(tenantName string, filter map[string]string, nextToken string, pageSize int) ([]tenantResourceOutput, string, error)
- func (b *InMemoryBackend) ListTenants(nextToken string, pageSize int) ([]tenantInfoOutput, string, error)
- func (b *InMemoryBackend) PutAccountDedicatedIPWarmupAttributes(autoWarmupEnabled bool) error
- func (b *InMemoryBackend) PutAccountDetails(details *AccountDetails) error
- func (b *InMemoryBackend) PutAccountPricingAttributes(plan string) error
- func (b *InMemoryBackend) PutAccountSendingAttributes(sendingEnabled bool) error
- func (b *InMemoryBackend) PutAccountSuppressionAttributes(suppressedReasons []string) error
- func (b *InMemoryBackend) PutAccountVdmAttributes(vdmAttributes map[string]any) error
- func (b *InMemoryBackend) PutConfigurationSetArchivingOptions(name, archiveARN string) error
- func (b *InMemoryBackend) PutConfigurationSetDeliveryOptions(name, tlsPolicy, sendingPoolName string) error
- func (b *InMemoryBackend) PutConfigurationSetReputationOptions(name string, metricsEnabled bool) error
- func (b *InMemoryBackend) PutConfigurationSetSendingOptions(name string, sendingEnabled bool) error
- func (b *InMemoryBackend) PutConfigurationSetSuppressionOptions(name string, suppressedReasons []string) error
- func (b *InMemoryBackend) PutConfigurationSetTrackingOptions(name, customRedirectDomain, httpsPolicy string) error
- func (b *InMemoryBackend) PutConfigurationSetVdmOptions(name string, dashboardOptions, guardianOptions map[string]any) error
- func (b *InMemoryBackend) PutDedicatedIPInPool(ip, poolName string) error
- func (b *InMemoryBackend) PutDedicatedIPPoolScalingAttributes(poolName, scalingMode string) error
- func (b *InMemoryBackend) PutDedicatedIPWarmupAttributes(ip string, warmupPercentage int) error
- func (b *InMemoryBackend) PutDeliverabilityDashboardOption(enabled bool, subscribedDomains []string) error
- func (b *InMemoryBackend) PutEmailIdentityConfigurationSetAttributes(identity, configSetName string) error
- func (b *InMemoryBackend) PutEmailIdentityDkimAttributes(identity string, signingEnabled bool) error
- func (b *InMemoryBackend) PutEmailIdentityDkimSigningAttributes(identity string) error
- func (b *InMemoryBackend) PutEmailIdentityFeedbackAttributes(identity string, emailForwardingEnabled bool) error
- func (b *InMemoryBackend) PutEmailIdentityMailFromAttributes(identity, mailFromDomain, behaviorOnMxFailure string) error
- func (b *InMemoryBackend) PutSuppressedDestination(email, reason string) error
- func (b *InMemoryBackend) PutTenantSuppressionAttributes(tenantName string, suppressedReasons []string, suppressionScope string) error
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SendBulkEmail(fromEmailAddress string, bulkEmailEntries []bulkEmailEntry) ([]bulkEmailEntryResultOutput, error)
- func (b *InMemoryBackend) SendCustomVerificationEmail(emailAddress, templateName string) (string, error)
- func (b *InMemoryBackend) SendEmail(from string, to []string, subject, bodyHTML, bodyText string) (string, error)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) TagResource(arn string, tags map[string]string) error
- func (b *InMemoryBackend) TestRenderEmailTemplate(name, templateData string) (string, error)
- func (b *InMemoryBackend) UntagResource(arn string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateConfigurationSetEventDestination(configSetName, destName string, enabled bool, matchingEventTypes []string) error
- func (b *InMemoryBackend) UpdateContact(contactListName, emailAddress string, topicPreferences []TopicPreference) error
- func (b *InMemoryBackend) UpdateContactList(name, description string) error
- func (b *InMemoryBackend) UpdateCustomVerificationEmailTemplate(in *CustomVerificationEmailTemplate) error
- func (b *InMemoryBackend) UpdateEmailIdentityPolicy(identity, policyName, policy string) error
- func (b *InMemoryBackend) UpdateEmailTemplate(name string, content *EmailTemplateContent) error
- func (b *InMemoryBackend) UpdateReputationEntityCustomerManagedStatus(entityID, status string) error
- func (b *InMemoryBackend) UpdateReputationEntityPolicy(entityID, policy string) error
- type MetricDataQuery
- type MetricDataResult
- type Provider
- type ReputationEntity
- type StorageBackend
- type SuppressedDestination
- type TopicPreference
- type VdmOptions
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("NotFoundException") ErrAlreadyExists = errors.New("AlreadyExistsException") ErrInvalidInput = errors.New("BadRequestException") )
Errors returned by the SES v2 backend.
var ( ErrIdentityNotFound = ErrNotFound ErrIdentityAlreadyExists = ErrAlreadyExists ErrConfigSetNotFound = ErrNotFound ErrConfigSetAlreadyExists = ErrAlreadyExists ErrInvalidParameter = ErrInvalidInput )
Aliases for backward compatibility within the package.
var ErrNilAppContext = errors.New("sesv2: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
Functions ¶
This section is empty.
Types ¶
type AccountDetails ¶
type AccountDetails struct {
VdmAttributes map[string]any `json:"vdmAttributes,omitempty"`
MailType string `json:"mailType"`
WebsiteURL string `json:"websiteURL"`
ContactLanguage string `json:"contactLanguage"`
UseCaseName string `json:"useCaseName"`
// PricingPlan is the account's currently active pricing plan (Plan of
// PutAccountPricingAttributesInput / PricingAttributes.CurrentPlan of
// GetAccountOutput). gopherstack has no billing-cycle concept, so a Put
// takes effect immediately as the current plan -- there is no separate
// "scheduled next plan" to track, unlike real SES v2.
PricingPlan string `json:"pricingPlan,omitempty"`
SuppressionAttributes []string `json:"suppressionAttributes,omitempty"`
SendingEnabled bool `json:"sendingEnabled"`
AutoWarmupEnabled bool `json:"autoWarmupEnabled,omitempty"`
}
AccountDetails stores account-level SESv2 settings.
type ArchivingOptions ¶
type ArchivingOptions struct {
ArchiveARN string `json:"archiveArn,omitempty"`
}
ArchivingOptions captures the archiving configuration of a configuration set.
type ConfigurationSet ¶
type ConfigurationSet struct {
CreatedAt time.Time `json:"createdAt"`
Name string `json:"name"`
Tags map[string]string `json:"tags,omitempty"`
TrackingCustomRedirectDomain string `json:"trackingCustomRedirectDomain,omitempty"`
TrackingHTTPSPolicy string `json:"trackingHttpsPolicy,omitempty"`
DeliveryTLSPolicy string `json:"deliveryTlsPolicy,omitempty"`
DeliverySendingPoolName string `json:"deliverySendingPoolName,omitempty"`
ArchivingOptions *ArchivingOptions `json:"archivingOptions,omitempty"`
VdmOptions *VdmOptions `json:"vdmOptions,omitempty"`
SuppressionReasons []string `json:"suppressionReasons,omitempty"`
SendingEnabled bool `json:"sendingEnabled"`
ReputationMetricsEnabled bool `json:"reputationMetricsEnabled"`
}
ConfigurationSet represents a SES v2 configuration set.
type Contact ¶
type Contact struct {
CreatedAt time.Time `json:"createdAt"`
LastUpdatedAt time.Time `json:"lastUpdatedAt"`
EmailAddress string `json:"emailAddress"`
ContactListName string `json:"contactListName"`
TopicPreferences []TopicPreference `json:"topicPreferences"`
UnsubscribeAll bool `json:"unsubscribeAll"`
}
Contact represents a contact in a contact list.
type ContactList ¶
type ContactList struct {
CreatedAt time.Time `json:"createdAt"`
LastUpdatedAt time.Time `json:"lastUpdatedAt"`
Tags map[string]string `json:"tags"`
Name string `json:"name"`
Description string `json:"description"`
}
ContactList represents a SES v2 contact list.
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 DedicatedIP ¶
type DedicatedIP struct {
IP string `json:"ip"`
PoolName string `json:"poolName,omitempty"`
WarmupStatus string `json:"warmupStatus"`
WarmupPercentage int `json:"warmupPercentage"`
}
DedicatedIP represents a single dedicated IP address and its pool/warmup state.
type DedicatedIPPool ¶
type DedicatedIPPool struct {
PoolName string `json:"poolName"`
ScalingMode string `json:"scalingMode"`
}
DedicatedIPPool represents a SES v2 dedicated IP pool.
type DeliverabilityTestReport ¶
type DeliverabilityTestReport struct {
CreateDate time.Time `json:"createDate"`
ReportID string `json:"reportId"`
ReportName string `json:"reportName"`
FromEmailAddress string `json:"fromEmailAddress"`
DeliverabilityTestStatus string `json:"deliverabilityTestStatus"`
}
DeliverabilityTestReport represents a deliverability test report.
type Email ¶
type Email struct {
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"`
To []string `json:"to"`
}
Email captures a sent email for local inspection.
type EmailIdentity ¶
type EmailIdentity struct {
Tags map[string]string `json:"tags,omitempty"`
Identity string `json:"identity"`
IdentityType string `json:"identityType"`
ConfigurationSetName string `json:"configurationSetName,omitempty"`
MailFromDomain string `json:"mailFromDomain,omitempty"`
MailFromDomainStatus string `json:"mailFromDomainStatus,omitempty"`
BehaviorOnMxFailure string `json:"behaviorOnMxFailure,omitempty"`
VerificationStatus string `json:"verificationStatus"`
DkimStatus string `json:"dkimStatus"`
DkimTokens []string `json:"dkimTokens,omitempty"`
VerifiedForSending bool `json:"verifiedForSending"`
FeedbackForwarding bool `json:"feedbackForwarding"`
DkimSigningEnabled bool `json:"dkimSigningEnabled"`
}
EmailIdentity represents a verified email address or domain identity.
type EmailTemplate ¶
type EmailTemplate struct {
CreatedAt time.Time `json:"createdAt"`
TemplateContent *EmailTemplateContent `json:"templateContent"`
TemplateName string `json:"templateName"`
}
EmailTemplate represents a SES v2 email template.
type EmailTemplateContent ¶
type EmailTemplateContent struct {
Subject string `json:"subject"`
Text string `json:"text"`
HTML string `json:"html"`
}
EmailTemplateContent holds the content for an email template.
type EventDestination ¶
type EventDestination struct {
CreatedAt time.Time `json:"createdAt"`
Name string `json:"name"`
ConfigurationSetName string `json:"configurationSetName"`
MatchingEventTypes []string `json:"matchingEventTypes"`
Enabled bool `json:"enabled"`
}
EventDestination represents an event destination for a configuration set.
type ExportJob ¶
type ExportJob struct {
CreatedAt time.Time `json:"createdAt"`
JobID string `json:"jobId"`
JobStatus string `json:"jobStatus"`
}
ExportJob represents a SES v2 export job (minimal model for CancelExportJob).
type Handler ¶
type Handler struct {
Backend StorageBackend
}
Handler is the Echo HTTP handler for SES v2 operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new SES v2 handler with the given backend.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this SES v2 instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the SES v2 operation from the request.
func (*Handler) ExtractResource ¶
ExtractResource extracts the identity or config set name from the request path.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported SES v2 operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for SES v2 requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority for the SES v2 handler. Uses PriorityPathVersioned (85) since it matches a versioned path prefix.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches SES v2 REST requests. SES v2 requests use the /v2/email/ path prefix.
type ImportJob ¶
type ImportJob struct {
CreatedAt time.Time `json:"createdAt"`
JobID string `json:"jobId"`
JobStatus string `json:"jobStatus"`
}
ImportJob stores an import job.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is an in-memory store for SES v2 email identities, emails, and configuration sets.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates a new InMemoryBackend.
func NewInMemoryBackendWithConfig ¶
func NewInMemoryBackendWithConfig(cfg *config.GlobalConfig) *InMemoryBackend
NewInMemoryBackendWithConfig creates a new InMemoryBackend with the given config.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the backend's AWS account ID.
func (*InMemoryBackend) AddContactListInternal ¶
func (b *InMemoryBackend) AddContactListInternal(name string) *ContactList
AddContactListInternal creates a contact list directly (for tests).
func (*InMemoryBackend) AddExportJobInternal ¶
func (b *InMemoryBackend) AddExportJobInternal(jobID, status string) *ExportJob
AddExportJobInternal creates an export job directly (for tests).
func (*InMemoryBackend) BatchGetMetricData ¶
func (b *InMemoryBackend) BatchGetMetricData( queries []MetricDataQuery, ) ([]MetricDataResult, error)
BatchGetMetricData returns real per-day SEND counts derived from gopherstack's actual send history (b.emails) when a query's Metric is SEND and its only dimension (if any) is EMAIL_IDENTITY -- gopherstack records every SendEmail call with its From address and timestamp, so that combination is genuine aggregated data, not a placeholder. Every other Metric (COMPLAINT/PERMANENT_BOUNCE/TRANSIENT_BOUNCE/OPEN/CLICK/DELIVERY/ DELIVERY_OPEN/DELIVERY_CLICK/DELIVERY_COMPLAINT) requires a delivery/bounce/complaint/engagement-tracking pipeline gopherstack doesn't have, and the CONFIGURATION_SET/ISP dimensions require a per-email association gopherstack doesn't track either -- those combinations (and any SEND query matching zero real sends) fall back to a single zero-valued datapoint rather than a fabricated non-zero count.
func (*InMemoryBackend) CancelExportJob ¶
func (b *InMemoryBackend) CancelExportJob(jobID string) error
CancelExportJob sets an export job status to CANCELLED.
func (*InMemoryBackend) CreateConfigurationSet ¶
func (b *InMemoryBackend) CreateConfigurationSet(name string) (*ConfigurationSet, error)
CreateConfigurationSet creates a new configuration set.
func (*InMemoryBackend) CreateConfigurationSetEventDestination ¶
func (b *InMemoryBackend) CreateConfigurationSetEventDestination( configSetName, destName string, enabled bool, matchingEventTypes []string, ) (*EventDestination, error)
CreateConfigurationSetEventDestination adds an event destination to a configuration set.
func (*InMemoryBackend) CreateContact ¶
func (b *InMemoryBackend) CreateContact( contactListName, emailAddress string, topicPreferences []TopicPreference, ) (*Contact, error)
CreateContact adds a contact to a contact list.
func (*InMemoryBackend) CreateContactList ¶
func (b *InMemoryBackend) CreateContactList(name, description string) (*ContactList, error)
CreateContactList creates a new contact list.
func (*InMemoryBackend) CreateCustomVerificationEmailTemplate ¶
func (b *InMemoryBackend) CreateCustomVerificationEmailTemplate( in *CustomVerificationEmailTemplate, ) (*CustomVerificationEmailTemplate, error)
CreateCustomVerificationEmailTemplate creates a custom verification email template.
func (*InMemoryBackend) CreateDedicatedIPPool ¶
func (b *InMemoryBackend) CreateDedicatedIPPool( poolName, scalingMode string, ) (*DedicatedIPPool, error)
CreateDedicatedIPPool creates a dedicated IP pool.
func (*InMemoryBackend) CreateDeliverabilityTestReport ¶
func (b *InMemoryBackend) CreateDeliverabilityTestReport( reportName, fromEmailAddress string, ) (*DeliverabilityTestReport, error)
CreateDeliverabilityTestReport creates a deliverability test report.
func (*InMemoryBackend) CreateEmailIdentity ¶
func (b *InMemoryBackend) CreateEmailIdentity( identity, configurationSetName string, tags map[string]string, ) (*EmailIdentity, error)
CreateEmailIdentity creates a new email identity and marks it as verified.
func (*InMemoryBackend) CreateEmailIdentityPolicy ¶
func (b *InMemoryBackend) CreateEmailIdentityPolicy(identity, policyName, policy string) error
CreateEmailIdentityPolicy creates a policy for an email identity.
func (*InMemoryBackend) CreateEmailTemplate ¶
func (b *InMemoryBackend) CreateEmailTemplate( templateName string, content *EmailTemplateContent, ) (*EmailTemplate, error)
CreateEmailTemplate creates a new email template.
func (*InMemoryBackend) CreateExportJob ¶
func (b *InMemoryBackend) CreateExportJob(dataSource string) (*ExportJob, error)
CreateExportJob creates a new export job.
func (*InMemoryBackend) CreateImportJob ¶
func (b *InMemoryBackend) CreateImportJob(dataSource string) (*ImportJob, error)
CreateImportJob creates an import job.
func (*InMemoryBackend) CreateMultiRegionEndpoint ¶
func (b *InMemoryBackend) CreateMultiRegionEndpoint( endpointName string, secondaryRegions []string, tags map[string]string, ) (*createMultiRegionEndpointOutput, error)
CreateMultiRegionEndpoint creates a multi-region endpoint (global-endpoint) spanning the backend's primary region and the given secondary regions.
func (*InMemoryBackend) CreateTenant ¶
func (b *InMemoryBackend) CreateTenant(tenantName string, tags map[string]string) (*tenantOutput, error)
CreateTenant creates a new tenant. Returns AlreadyExistsException-shaped error if the tenant already exists (matches real SES v2 behavior).
func (*InMemoryBackend) CreateTenantResourceAssociation ¶
func (b *InMemoryBackend) CreateTenantResourceAssociation(tenantName, resourceArn string) error
CreateTenantResourceAssociation associates a resource with a tenant. Real SES v2 returns NotFoundException if the tenant doesn't exist.
func (*InMemoryBackend) DeleteConfigurationSet ¶
func (b *InMemoryBackend) DeleteConfigurationSet(name string) error
DeleteConfigurationSet removes a configuration set and its event destinations.
func (*InMemoryBackend) DeleteConfigurationSetEventDestination ¶
func (b *InMemoryBackend) DeleteConfigurationSetEventDestination( configSetName, destName string, ) error
DeleteConfigurationSetEventDestination removes an event destination.
func (*InMemoryBackend) DeleteContact ¶
func (b *InMemoryBackend) DeleteContact(contactListName, emailAddress string) error
DeleteContact removes a contact from a contact list.
func (*InMemoryBackend) DeleteContactList ¶
func (b *InMemoryBackend) DeleteContactList(name string) error
DeleteContactList removes a contact list and all its contacts.
func (*InMemoryBackend) DeleteCustomVerificationEmailTemplate ¶
func (b *InMemoryBackend) DeleteCustomVerificationEmailTemplate(name string) error
DeleteCustomVerificationEmailTemplate removes a custom verification template.
func (*InMemoryBackend) DeleteDedicatedIPPool ¶
func (b *InMemoryBackend) DeleteDedicatedIPPool(poolName string) error
DeleteDedicatedIPPool removes a dedicated IP pool.
func (*InMemoryBackend) DeleteEmailIdentity ¶
func (b *InMemoryBackend) DeleteEmailIdentity(identity string) error
DeleteEmailIdentity removes an email identity.
func (*InMemoryBackend) DeleteEmailIdentityPolicy ¶
func (b *InMemoryBackend) DeleteEmailIdentityPolicy(identity, policyName string) error
DeleteEmailIdentityPolicy deletes a policy from an identity.
func (*InMemoryBackend) DeleteEmailTemplate ¶
func (b *InMemoryBackend) DeleteEmailTemplate(name string) error
DeleteEmailTemplate removes a template.
func (*InMemoryBackend) DeleteMultiRegionEndpoint ¶
func (b *InMemoryBackend) DeleteMultiRegionEndpoint(endpointName string) (string, error)
DeleteMultiRegionEndpoint removes an endpoint and returns the status right after the delete request (DELETING), matching DeleteMultiRegionEndpointOutput.
func (*InMemoryBackend) DeleteSuppressedDestination ¶
func (b *InMemoryBackend) DeleteSuppressedDestination(email string) error
DeleteSuppressedDestination removes a suppressed destination.
func (*InMemoryBackend) DeleteTenant ¶
func (b *InMemoryBackend) DeleteTenant(tenantName string) error
DeleteTenant removes a tenant and cascades cleanup of its resource associations (both directions of the tenant<->resource index) so no ghost rows remain after delete.
func (*InMemoryBackend) DeleteTenantResourceAssociation ¶
func (b *InMemoryBackend) DeleteTenantResourceAssociation(tenantName, resourceArn string) error
DeleteTenantResourceAssociation removes a tenant<->resource association.
func (*InMemoryBackend) GetAccount ¶
func (b *InMemoryBackend) GetAccount() (*AccountDetails, error)
GetAccount returns the account details.
func (*InMemoryBackend) GetBlacklistReports ¶
func (b *InMemoryBackend) GetBlacklistReports() (map[string][]string, error)
GetBlacklistReports returns empty blacklist reports.
func (*InMemoryBackend) GetConfigurationSet ¶
func (b *InMemoryBackend) GetConfigurationSet(name string) (*ConfigurationSet, error)
GetConfigurationSet returns the configuration set with the given name.
func (*InMemoryBackend) GetConfigurationSetEventDestinations ¶
func (b *InMemoryBackend) GetConfigurationSetEventDestinations( configSetName string, ) ([]*EventDestination, error)
GetConfigurationSetEventDestinations retrieves event destinations for a config set.
func (*InMemoryBackend) GetContact ¶
func (b *InMemoryBackend) GetContact(contactListName, emailAddress string) (*Contact, error)
GetContact retrieves a contact from a contact list.
func (*InMemoryBackend) GetContactList ¶
func (b *InMemoryBackend) GetContactList(name string) (*ContactList, error)
GetContactList retrieves a contact list.
func (*InMemoryBackend) GetCustomVerificationEmailTemplate ¶
func (b *InMemoryBackend) GetCustomVerificationEmailTemplate( name string, ) (*CustomVerificationEmailTemplate, error)
GetCustomVerificationEmailTemplate retrieves a custom verification template.
func (*InMemoryBackend) GetDedicatedIP ¶
func (b *InMemoryBackend) GetDedicatedIP(ip string) (map[string]any, error)
GetDedicatedIP returns the stored dedicated IP attributes. IPs that have never been assigned to a pool or warmed up are reported as fully warmed up, matching the prior stub behaviour for IPs SES manages implicitly.
func (*InMemoryBackend) GetDedicatedIPPool ¶
func (b *InMemoryBackend) GetDedicatedIPPool(poolName string) (*DedicatedIPPool, error)
GetDedicatedIPPool retrieves a dedicated IP pool.
func (*InMemoryBackend) GetDedicatedIps ¶
func (b *InMemoryBackend) GetDedicatedIps() []map[string]any
GetDedicatedIps returns all tracked dedicated IPs.
func (*InMemoryBackend) GetDeliverabilityDashboardOptions ¶
func (b *InMemoryBackend) GetDeliverabilityDashboardOptions() (map[string]any, error)
GetDeliverabilityDashboardOptions reports the dashboard enablement state and subscribed-domain list previously set by PutDeliverabilityDashboardOption, matching GetDeliverabilityDashboardOptionsOutput (DashboardEnabled/AccountStatus/ActiveSubscribedDomains).
func (*InMemoryBackend) GetDeliverabilityTestReport ¶
func (b *InMemoryBackend) GetDeliverabilityTestReport( reportID string, ) (*DeliverabilityTestReport, error)
GetDeliverabilityTestReport retrieves a test report.
func (*InMemoryBackend) GetDomainDeliverabilityCampaign ¶
func (b *InMemoryBackend) GetDomainDeliverabilityCampaign(campaignID string) (map[string]any, error)
GetDomainDeliverabilityCampaign returns deliverability data for a single campaign, matching types.DomainDeliverabilityCampaign. When campaignID matches a campaign gopherstack can actually derive from its own send history (see domainCampaignsLocked), CampaignId/FromAddress/Subject/ FirstSeenDateTime/LastSeenDateTime are real. An ID that doesn't match any real send history (including any ID a caller makes up, since gopherstack exposes no other way to validate one) falls back to the same shape with the requested ID echoed back and every other field honestly zero/empty -- gopherstack has no NotFoundException signal it could raise here without also rejecting IDs a real ListDomainDeliverabilityCampaigns call would have legitimately returned.
func (*InMemoryBackend) GetDomainStatisticsReport ¶
func (b *InMemoryBackend) GetDomainStatisticsReport(domain, startDate, endDate string) (map[string]any, error)
GetDomainStatisticsReport reports volume statistics for a domain, matching GetDomainStatisticsReportOutput. Real SES v2 documents DailyVolumes as containing "data for each day, starting on the StartDate and ending on the EndDate" -- gopherstack honors that shape for real (one entry per day in the requested range, parsed via parseSESv2Timestamp) even though every actual statistic (VolumeStatistics/DomainIspPlacements/ReadRatePercent) requires mail-delivery-outcome (inbox vs spam) tracking gopherstack doesn't have and stays honest zero/empty per day -- same tradeoff BatchGetMetricData makes for its own metrics. An unparseable or reversed range yields an empty DailyVolumes list rather than a guess.
func (*InMemoryBackend) GetEmailAddressInsights ¶
func (b *InMemoryBackend) GetEmailAddressInsights(emailAddress string) (map[string]any, error)
GetEmailAddressInsights runs the checks gopherstack can meaningfully perform without network access (RFC-shaped syntax validation and a role-address local-part lookup) and reports the checks that genuinely require external data (DNS, disposable-domain lists, mailbox probing) as MEDIUM-confidence placeholders -- the route and wire shape are AWS-accurate (types.MailboxValidation/EmailAddressInsightsMailboxEvaluations) even though those specific verdicts aren't backed by real validation.
func (*InMemoryBackend) GetEmailIdentity ¶
func (b *InMemoryBackend) GetEmailIdentity(identity string) (*EmailIdentity, error)
GetEmailIdentity returns the email identity with the given name.
func (*InMemoryBackend) GetEmailIdentityPolicies ¶
func (b *InMemoryBackend) GetEmailIdentityPolicies(identity string) (map[string]string, error)
GetEmailIdentityPolicies returns policies for an identity.
func (*InMemoryBackend) GetEmailTemplate ¶
func (b *InMemoryBackend) GetEmailTemplate(name string) (*EmailTemplate, error)
GetEmailTemplate retrieves a template.
func (*InMemoryBackend) GetExportJob ¶
func (b *InMemoryBackend) GetExportJob(jobID string) (*ExportJob, error)
GetExportJob retrieves an export job.
func (*InMemoryBackend) GetImportJob ¶
func (b *InMemoryBackend) GetImportJob(jobID string) (*ImportJob, error)
GetImportJob retrieves an import job.
func (*InMemoryBackend) GetMessageInsights ¶
func (b *InMemoryBackend) GetMessageInsights(messageID string) (map[string]any, error)
GetMessageInsights returns per-destination insights for a previously sent email, matching GetMessageInsightsOutput/types.EmailInsights. Real SES v2 returns NotFoundException for a MessageId it doesn't recognize (confirmed against the op's documented error list); gopherstack's message history (SendEmail's b.emails, capped at maxRetainedEmails) is the closest equivalent to AWS's message tracking store. Only a synthetic SEND event is reported per destination -- gopherstack has no delivery/bounce/complaint pipeline to generate DELIVERY/BOUNCE/COMPLAINT events from.
func (*InMemoryBackend) GetMultiRegionEndpoint ¶
func (b *InMemoryBackend) GetMultiRegionEndpoint(endpointName string) (*multiRegionEndpointOutput, error)
GetMultiRegionEndpoint returns the full endpoint record, matching GetMultiRegionEndpointOutput (CreatedTimestamp/EndpointId/EndpointName/ LastUpdatedTimestamp/Routes/Status).
func (*InMemoryBackend) GetReputationEntity ¶
func (b *InMemoryBackend) GetReputationEntity(entityID string) (reputationEntityOutput, error)
GetReputationEntity returns the stored reputation entity attributes. Entities in SES exist implicitly for every configuration set and identity, so an entity that has never been updated is reported with its reference and no overrides rather than as not-found.
func (*InMemoryBackend) GetSuppressedDestination ¶
func (b *InMemoryBackend) GetSuppressedDestination(email string) (*SuppressedDestination, error)
GetSuppressedDestination retrieves a suppressed destination.
func (*InMemoryBackend) GetTenant ¶
func (b *InMemoryBackend) GetTenant(tenantName string) (*tenantOutput, error)
GetTenant returns the full tenant record (TenantName/TenantId/TenantArn/ SendingStatus/CreatedTimestamp/Tags), matching types.Tenant.
func (*InMemoryBackend) ListConfigurationSets ¶
func (b *InMemoryBackend) ListConfigurationSets( nextToken string, pageSize int, ) page.Page[*ConfigurationSet]
ListConfigurationSets returns a paginated, sorted list of configuration sets.
func (*InMemoryBackend) ListContactLists ¶
func (b *InMemoryBackend) ListContactLists(nextToken string, pageSize int) page.Page[*ContactList]
ListContactLists returns all contact lists.
func (*InMemoryBackend) ListContacts ¶
func (b *InMemoryBackend) ListContacts( contactListName, nextToken string, pageSize int, ) (page.Page[*Contact], error)
ListContacts returns all contacts in a contact list.
func (*InMemoryBackend) ListCustomVerificationEmailTemplates ¶
func (b *InMemoryBackend) ListCustomVerificationEmailTemplates( nextToken string, pageSize int, ) page.Page[*CustomVerificationEmailTemplate]
ListCustomVerificationEmailTemplates returns all custom verification templates.
func (*InMemoryBackend) ListDedicatedIPPools ¶
ListDedicatedIPPools returns all dedicated IP pool names.
func (*InMemoryBackend) ListDeliverabilityTestReports ¶
func (b *InMemoryBackend) ListDeliverabilityTestReports( nextToken string, pageSize int, ) page.Page[*DeliverabilityTestReport]
ListDeliverabilityTestReports lists all test reports.
func (*InMemoryBackend) ListDomainDeliverabilityCampaigns ¶
func (b *InMemoryBackend) ListDomainDeliverabilityCampaigns( startDate, endDate, domain, nextToken string, ) ([]map[string]any, string, error)
ListDomainDeliverabilityCampaigns lists deliverability-dashboard campaigns for a subscribed domain, derived for real from gopherstack's own send history (see domainCampaignsLocked) and restricted to campaigns that overlap the requested [startDate, endDate] window when both parse via parseSESv2Timestamp. InboxCount/SpamCount/etc are honest placeholders, same as GetDomainDeliverabilityCampaign.
func (*InMemoryBackend) ListEmailIdentities ¶
func (b *InMemoryBackend) ListEmailIdentities( nextToken string, pageSize int, ) page.Page[*EmailIdentity]
ListEmailIdentities returns a paginated, sorted list of email identities.
func (*InMemoryBackend) ListEmailTemplates ¶
func (b *InMemoryBackend) ListEmailTemplates( nextToken string, pageSize int, ) page.Page[*EmailTemplate]
ListEmailTemplates returns all email templates.
func (*InMemoryBackend) ListEmails ¶
func (b *InMemoryBackend) ListEmails() []Email
ListEmails returns a copy of all captured emails.
func (*InMemoryBackend) ListExportJobs ¶
ListExportJobs returns all export jobs.
func (*InMemoryBackend) ListImportJobs ¶
ListImportJobs returns all import jobs.
func (*InMemoryBackend) ListMultiRegionEndpoints ¶
func (b *InMemoryBackend) ListMultiRegionEndpoints( nextToken string, pageSize int, ) ([]multiRegionEndpointSummaryOutput, string, error)
ListMultiRegionEndpoints lists all multi-region endpoints, paginated.
func (*InMemoryBackend) ListRecommendations ¶
func (b *InMemoryBackend) ListRecommendations( filter map[string]string, nextToken string, pageSize int, ) ([]recommendationOutput, string, error)
ListRecommendations derives real recommendations from gopherstack's actual configuration state: identities with DKIM signing disabled (DKIM -- CreateEmailIdentity enables it by default, so this only fires after an explicit PutEmailIdentityDkimAttributes(signingEnabled=false) call), identities with a custom MAIL FROM domain that hasn't reached SUCCESS status (SPF -- a custom MAIL FROM domain is how SES achieves SPF alignment; gopherstack doesn't simulate async MAIL FROM verification, so every configured MAIL FROM domain is honestly stuck at PENDING forever), and reputation entities with a DISABLED customer-managed status (COMPLAINT). DMARC/BIMI recommendations and reputation-finding-driven types (BOUNCE/FEEDBACK_3P/IP_LISTING) are never returned -- gopherstack has no DNS-record model and no bounce/complaint-rate tracking pipeline to derive those from, and fabricating them would be worse than omitting them. Recommendations are computed live on every call rather than persisted, so CreatedTimestamp/LastUpdatedTimestamp reflect "now" rather than a real first-detected time gopherstack doesn't track.
func (*InMemoryBackend) ListReputationEntities ¶
func (b *InMemoryBackend) ListReputationEntities( _ string, _ int, ) ([]reputationEntityOutput, string, error)
ListReputationEntities returns all tracked reputation entities.
func (*InMemoryBackend) ListResourceTenants ¶
func (b *InMemoryBackend) ListResourceTenants( resourceArn, nextToken string, pageSize int, ) ([]resourceTenantOutput, string, error)
ListResourceTenants lists the tenants a resource is associated with, matching types.ResourceTenantMetadata (TenantName/TenantId/ResourceArn/ AssociatedTimestamp). Note real SES v2 doesn't track a TenantId lookup separately from the tenant record; we derive it from the tenant map when available.
func (*InMemoryBackend) ListSuppressedDestinations ¶
func (b *InMemoryBackend) ListSuppressedDestinations( nextToken string, pageSize int, ) page.Page[*SuppressedDestination]
ListSuppressedDestinations lists all suppressed destinations.
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(arn string) (map[string]string, error)
func (*InMemoryBackend) ListTenantResources ¶
func (b *InMemoryBackend) ListTenantResources( tenantName string, filter map[string]string, nextToken string, pageSize int, ) ([]tenantResourceOutput, string, error)
ListTenantResources lists the resources associated with a tenant, matching types.TenantResource (ResourceArn/ResourceType only -- no timestamp). The only supported filter key is RESOURCE_TYPE (types.ListTenantResourcesFilterKey).
func (*InMemoryBackend) ListTenants ¶
func (b *InMemoryBackend) ListTenants(nextToken string, pageSize int) ([]tenantInfoOutput, string, error)
ListTenants lists all tenants associated with the account, paginated.
func (*InMemoryBackend) PutAccountDedicatedIPWarmupAttributes ¶
func (b *InMemoryBackend) PutAccountDedicatedIPWarmupAttributes(autoWarmupEnabled bool) error
func (*InMemoryBackend) PutAccountDetails ¶
func (b *InMemoryBackend) PutAccountDetails(details *AccountDetails) error
PutAccountDetails stores account details.
func (*InMemoryBackend) PutAccountPricingAttributes ¶ added in v1.2.0
func (b *InMemoryBackend) PutAccountPricingAttributes(plan string) error
PutAccountPricingAttributes sets the account's active pricing plan. Real SES v2 validates Plan against the PricingPlan enum (NONE/ESSENTIALS/ PRO/ENTERPRISE); an unrecognized value is a BadRequestException.
func (*InMemoryBackend) PutAccountSendingAttributes ¶
func (b *InMemoryBackend) PutAccountSendingAttributes(sendingEnabled bool) error
PutAccountSendingAttributes sets the sending enabled flag.
func (*InMemoryBackend) PutAccountSuppressionAttributes ¶
func (b *InMemoryBackend) PutAccountSuppressionAttributes(suppressedReasons []string) error
func (*InMemoryBackend) PutAccountVdmAttributes ¶
func (b *InMemoryBackend) PutAccountVdmAttributes(vdmAttributes map[string]any) error
func (*InMemoryBackend) PutConfigurationSetArchivingOptions ¶
func (b *InMemoryBackend) PutConfigurationSetArchivingOptions(name, archiveARN string) error
PutConfigurationSetArchivingOptions stores the archive ARN on the config set.
func (*InMemoryBackend) PutConfigurationSetDeliveryOptions ¶
func (b *InMemoryBackend) PutConfigurationSetDeliveryOptions( name, tlsPolicy, sendingPoolName string, ) error
PutConfigurationSetDeliveryOptions stores the TLS policy and sending pool name.
func (*InMemoryBackend) PutConfigurationSetReputationOptions ¶
func (b *InMemoryBackend) PutConfigurationSetReputationOptions( name string, metricsEnabled bool, ) error
PutConfigurationSetReputationOptions stores the reputation metrics flag.
func (*InMemoryBackend) PutConfigurationSetSendingOptions ¶
func (b *InMemoryBackend) PutConfigurationSetSendingOptions( name string, sendingEnabled bool, ) error
PutConfigurationSetSendingOptions enables or disables sending for the config set.
func (*InMemoryBackend) PutConfigurationSetSuppressionOptions ¶
func (b *InMemoryBackend) PutConfigurationSetSuppressionOptions( name string, suppressedReasons []string, ) error
PutConfigurationSetSuppressionOptions stores the suppression reason list.
func (*InMemoryBackend) PutConfigurationSetTrackingOptions ¶
func (b *InMemoryBackend) PutConfigurationSetTrackingOptions( name, customRedirectDomain, httpsPolicy string, ) error
PutConfigurationSetTrackingOptions stores the custom redirect domain and HTTPS policy.
func (*InMemoryBackend) PutConfigurationSetVdmOptions ¶
func (b *InMemoryBackend) PutConfigurationSetVdmOptions( name string, dashboardOptions, guardianOptions map[string]any, ) error
PutConfigurationSetVdmOptions stores the VDM options on the config set.
func (*InMemoryBackend) PutDedicatedIPInPool ¶
func (b *InMemoryBackend) PutDedicatedIPInPool(ip, poolName string) error
PutDedicatedIPInPool moves a dedicated IP into the requested pool. The destination pool must exist.
func (*InMemoryBackend) PutDedicatedIPPoolScalingAttributes ¶
func (b *InMemoryBackend) PutDedicatedIPPoolScalingAttributes(poolName, scalingMode string) error
PutDedicatedIPPoolScalingAttributes updates a pool's scaling mode.
func (*InMemoryBackend) PutDedicatedIPWarmupAttributes ¶
func (b *InMemoryBackend) PutDedicatedIPWarmupAttributes(ip string, warmupPercentage int) error
PutDedicatedIPWarmupAttributes records the warmup percentage for a dedicated IP and derives the warmup status from it.
func (*InMemoryBackend) PutDeliverabilityDashboardOption ¶
func (b *InMemoryBackend) PutDeliverabilityDashboardOption(enabled bool, subscribedDomains []string) error
PutDeliverabilityDashboardOption persists the dashboard enablement state and subscribed-domain list so GetDeliverabilityDashboardOptions reflects it (previously a true no-op).
func (*InMemoryBackend) PutEmailIdentityConfigurationSetAttributes ¶
func (b *InMemoryBackend) PutEmailIdentityConfigurationSetAttributes( identity, configSetName string, ) error
PutEmailIdentityConfigurationSetAttributes associates a configuration set with the identity.
func (*InMemoryBackend) PutEmailIdentityDkimAttributes ¶
func (b *InMemoryBackend) PutEmailIdentityDkimAttributes( identity string, signingEnabled bool, ) error
PutEmailIdentityDkimAttributes enables or disables DKIM signing for the identity.
func (*InMemoryBackend) PutEmailIdentityDkimSigningAttributes ¶
func (b *InMemoryBackend) PutEmailIdentityDkimSigningAttributes(identity string) error
PutEmailIdentityDkimSigningAttributes validates the identity exists (BYODKIM not modelled).
func (*InMemoryBackend) PutEmailIdentityFeedbackAttributes ¶
func (b *InMemoryBackend) PutEmailIdentityFeedbackAttributes( identity string, emailForwardingEnabled bool, ) error
PutEmailIdentityFeedbackAttributes sets the feedback forwarding flag for the identity.
func (*InMemoryBackend) PutEmailIdentityMailFromAttributes ¶
func (b *InMemoryBackend) PutEmailIdentityMailFromAttributes( identity, mailFromDomain, behaviorOnMxFailure string, ) error
PutEmailIdentityMailFromAttributes stores the custom MAIL FROM domain and failure behaviour.
func (*InMemoryBackend) PutSuppressedDestination ¶
func (b *InMemoryBackend) PutSuppressedDestination(email, reason string) error
PutSuppressedDestination adds or updates a suppressed destination.
func (*InMemoryBackend) PutTenantSuppressionAttributes ¶ added in v1.2.0
func (b *InMemoryBackend) PutTenantSuppressionAttributes( tenantName string, suppressedReasons []string, suppressionScope string, ) error
PutTenantSuppressionAttributes configures the suppression-list preferences for a tenant (which reasons auto-suppress a destination, and whether the tenant uses its own suppression list or the account-level one). Returns NotFoundException if the tenant doesn't exist, matching real SES v2.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the backend's AWS region.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset closes the mutex and re-initialises all state.
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) SendBulkEmail ¶
func (b *InMemoryBackend) SendBulkEmail( fromEmailAddress string, bulkEmailEntries []bulkEmailEntry, ) ([]bulkEmailEntryResultOutput, error)
SendBulkEmail sends bulk emails — records sent emails with actual recipients.
func (*InMemoryBackend) SendCustomVerificationEmail ¶
func (b *InMemoryBackend) SendCustomVerificationEmail( emailAddress, templateName string, ) (string, error)
SendCustomVerificationEmail sends a custom verification email (stub).
func (*InMemoryBackend) SendEmail ¶
func (b *InMemoryBackend) SendEmail( from string, to []string, subject, bodyHTML, bodyText string, ) (string, error)
SendEmail captures an outbound email and returns a message ID.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(arn string, tags map[string]string) error
func (*InMemoryBackend) TestRenderEmailTemplate ¶
func (b *InMemoryBackend) TestRenderEmailTemplate(name, templateData string) (string, error)
TestRenderEmailTemplate renders a template with merge data.
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(arn string, tagKeys []string) error
func (*InMemoryBackend) UpdateConfigurationSetEventDestination ¶
func (b *InMemoryBackend) UpdateConfigurationSetEventDestination( configSetName, destName string, enabled bool, matchingEventTypes []string, ) error
UpdateConfigurationSetEventDestination updates an event destination.
func (*InMemoryBackend) UpdateContact ¶
func (b *InMemoryBackend) UpdateContact( contactListName, emailAddress string, topicPreferences []TopicPreference, ) error
UpdateContact updates a contact's topic preferences.
func (*InMemoryBackend) UpdateContactList ¶
func (b *InMemoryBackend) UpdateContactList(name, description string) error
UpdateContactList updates a contact list description.
func (*InMemoryBackend) UpdateCustomVerificationEmailTemplate ¶
func (b *InMemoryBackend) UpdateCustomVerificationEmailTemplate( in *CustomVerificationEmailTemplate, ) error
UpdateCustomVerificationEmailTemplate updates a custom verification template.
func (*InMemoryBackend) UpdateEmailIdentityPolicy ¶
func (b *InMemoryBackend) UpdateEmailIdentityPolicy(identity, policyName, policy string) error
UpdateEmailIdentityPolicy updates a policy for an identity.
func (*InMemoryBackend) UpdateEmailTemplate ¶
func (b *InMemoryBackend) UpdateEmailTemplate(name string, content *EmailTemplateContent) error
UpdateEmailTemplate updates a template.
func (*InMemoryBackend) UpdateReputationEntityCustomerManagedStatus ¶
func (b *InMemoryBackend) UpdateReputationEntityCustomerManagedStatus( entityID, status string, ) error
UpdateReputationEntityCustomerManagedStatus stores the customer-managed status.
func (*InMemoryBackend) UpdateReputationEntityPolicy ¶
func (b *InMemoryBackend) UpdateReputationEntityPolicy(entityID, policy string) error
UpdateReputationEntityPolicy stores the reputation management policy.
type MetricDataQuery ¶
type MetricDataQuery struct {
StartDate time.Time `json:"startDate"`
EndDate time.Time `json:"endDate"`
Dimensions map[string]string `json:"dimensions"`
ID string `json:"id"`
Namespace string `json:"namespace"`
Metric string `json:"metric"`
}
MetricDataQuery represents a single query for BatchGetMetricData, matching types.BatchGetMetricDataQuery.
type MetricDataResult ¶
type MetricDataResult struct {
ID string `json:"id"`
Timestamps []time.Time `json:"timestamps"`
Values []int64 `json:"values"`
}
MetricDataResult is the result for a single metric query, matching types.MetricDataResult (Values is a cumulative/sum count, hence int64).
type Provider ¶
type Provider struct{}
Provider implements service.Provider for the SES v2 service.
func (*Provider) Init ¶
func (p *Provider) Init(appCtx *service.AppContext) (service.Registerable, error)
Init initializes the SES v2 service backend and handler.
type ReputationEntity ¶
type ReputationEntity struct {
EntityRef string `json:"entityRef"`
EntityType string `json:"entityType,omitempty"`
CustomerManagedStatus string `json:"customerManagedStatus,omitempty"`
ReputationPolicy string `json:"reputationPolicy,omitempty"`
}
ReputationEntity represents a SES v2 reputation entity (e.g. a configuration set or email identity tracked for reputation purposes).
type StorageBackend ¶
type StorageBackend interface {
// Core identity ops
CreateEmailIdentity(identity, configurationSetName string, tags map[string]string) (*EmailIdentity, error)
GetEmailIdentity(identity string) (*EmailIdentity, error)
ListEmailIdentities(nextToken string, pageSize int) page.Page[*EmailIdentity]
DeleteEmailIdentity(identity string) error
// Email identity policy ops
CreateEmailIdentityPolicy(identity, policyName, policy string) error
GetEmailIdentityPolicies(identity string) (map[string]string, error)
DeleteEmailIdentityPolicy(identity, policyName string) error
UpdateEmailIdentityPolicy(identity, policyName, policy string) error
// Email identity attribute ops
PutEmailIdentityConfigurationSetAttributes(identity, configSetName string) error
PutEmailIdentityDkimAttributes(identity string, signingEnabled bool) error
PutEmailIdentityDkimSigningAttributes(identity string) error
PutEmailIdentityFeedbackAttributes(identity string, emailForwardingEnabled bool) error
PutEmailIdentityMailFromAttributes(identity, mailFromDomain, behaviorOnMxFailure string) error
// Configuration set ops
CreateConfigurationSet(name string) (*ConfigurationSet, error)
GetConfigurationSet(name string) (*ConfigurationSet, error)
ListConfigurationSets(nextToken string, pageSize int) page.Page[*ConfigurationSet]
DeleteConfigurationSet(name string) error
// Configuration set attribute ops
PutConfigurationSetArchivingOptions(name, archiveARN string) error
PutConfigurationSetDeliveryOptions(name, tlsPolicy, sendingPoolName string) error
PutConfigurationSetReputationOptions(name string, metricsEnabled bool) error
PutConfigurationSetSendingOptions(name string, sendingEnabled bool) error
PutConfigurationSetSuppressionOptions(name string, suppressedReasons []string) error
PutConfigurationSetTrackingOptions(name, customRedirectDomain, httpsPolicy string) error
PutConfigurationSetVdmOptions(name string, dashboardOptions, guardianOptions map[string]any) error
// Event destination ops
CreateConfigurationSetEventDestination(
configSetName, destName string,
enabled bool,
matchingEventTypes []string,
) (*EventDestination, error)
GetConfigurationSetEventDestinations(configSetName string) ([]*EventDestination, error)
DeleteConfigurationSetEventDestination(configSetName, destName string) error
UpdateConfigurationSetEventDestination(
configSetName, destName string,
enabled bool,
matchingEventTypes []string,
) error
// Email sending ops
SendEmail(from string, to []string, subject, bodyHTML, bodyText string) (string, error)
SendBulkEmail(
fromEmailAddress string,
bulkEmailEntries []bulkEmailEntry,
) ([]bulkEmailEntryResultOutput, error)
SendCustomVerificationEmail(emailAddress, templateName string) (string, error)
ListEmails() []Email
// Contact list ops
CreateContactList(name, description string) (*ContactList, error)
GetContactList(name string) (*ContactList, error)
DeleteContactList(name string) error
UpdateContactList(name, description string) error
ListContactLists(nextToken string, pageSize int) page.Page[*ContactList]
// Contact ops
CreateContact(
contactListName, emailAddress string,
topicPreferences []TopicPreference,
) (*Contact, error)
GetContact(contactListName, emailAddress string) (*Contact, error)
DeleteContact(contactListName, emailAddress string) error
UpdateContact(contactListName, emailAddress string, topicPreferences []TopicPreference) error
ListContacts(contactListName, nextToken string, pageSize int) (page.Page[*Contact], error)
// Custom verification template ops
CreateCustomVerificationEmailTemplate(
in *CustomVerificationEmailTemplate,
) (*CustomVerificationEmailTemplate, error)
GetCustomVerificationEmailTemplate(name string) (*CustomVerificationEmailTemplate, error)
DeleteCustomVerificationEmailTemplate(name string) error
UpdateCustomVerificationEmailTemplate(in *CustomVerificationEmailTemplate) error
ListCustomVerificationEmailTemplates(
nextToken string,
pageSize int,
) page.Page[*CustomVerificationEmailTemplate]
// Dedicated IP pool ops
CreateDedicatedIPPool(poolName, scalingMode string) (*DedicatedIPPool, error)
GetDedicatedIPPool(poolName string) (*DedicatedIPPool, error)
DeleteDedicatedIPPool(poolName string) error
ListDedicatedIPPools(nextToken string, pageSize int) page.Page[string]
GetDedicatedIP(ip string) (map[string]any, error)
GetDedicatedIps() []map[string]any
PutDedicatedIPInPool(ip, poolName string) error
PutDedicatedIPPoolScalingAttributes(poolName, scalingMode string) error
PutDedicatedIPWarmupAttributes(ip string, warmupPercentage int) error
// Deliverability test report ops
CreateDeliverabilityTestReport(
reportName, fromEmailAddress string,
) (*DeliverabilityTestReport, error)
GetDeliverabilityTestReport(reportID string) (*DeliverabilityTestReport, error)
ListDeliverabilityTestReports(
nextToken string,
pageSize int,
) page.Page[*DeliverabilityTestReport]
// Deliverability dashboard ops
GetDeliverabilityDashboardOptions() (map[string]any, error)
PutDeliverabilityDashboardOption(enabled bool, subscribedDomains []string) error
GetDomainDeliverabilityCampaign(campaignID string) (map[string]any, error)
GetDomainStatisticsReport(domain, startDate, endDate string) (map[string]any, error)
ListDomainDeliverabilityCampaigns(
startDate, endDate, domain, nextToken string,
) ([]map[string]any, string, error)
// Email template ops
CreateEmailTemplate(templateName string, content *EmailTemplateContent) (*EmailTemplate, error)
GetEmailTemplate(name string) (*EmailTemplate, error)
DeleteEmailTemplate(name string) error
UpdateEmailTemplate(name string, content *EmailTemplateContent) error
ListEmailTemplates(nextToken string, pageSize int) page.Page[*EmailTemplate]
TestRenderEmailTemplate(name, templateData string) (string, error)
// Export job ops
CreateExportJob(dataSource string) (*ExportJob, error)
GetExportJob(jobID string) (*ExportJob, error)
ListExportJobs(nextToken string, pageSize int) page.Page[*ExportJob]
CancelExportJob(jobID string) error
// Import job ops
CreateImportJob(dataSource string) (*ImportJob, error)
GetImportJob(jobID string) (*ImportJob, error)
ListImportJobs(nextToken string, pageSize int) page.Page[*ImportJob]
// Suppressed destination ops
PutSuppressedDestination(email, reason string) error
GetSuppressedDestination(email string) (*SuppressedDestination, error)
DeleteSuppressedDestination(email string) error
ListSuppressedDestinations(nextToken string, pageSize int) page.Page[*SuppressedDestination]
// Account ops
GetAccount() (*AccountDetails, error)
PutAccountDetails(details *AccountDetails) error
PutAccountPricingAttributes(plan string) error
PutAccountSendingAttributes(sendingEnabled bool) error
PutAccountSuppressionAttributes(suppressedReasons []string) error
PutAccountVdmAttributes(vdmAttributes map[string]any) error
PutAccountDedicatedIPWarmupAttributes(autoWarmupEnabled bool) error
GetBlacklistReports() (map[string][]string, error)
TagResource(arn string, tags map[string]string) error
UntagResource(arn string, tagKeys []string) error
ListTagsForResource(arn string) (map[string]string, error)
// Insights / analytics -- GetMessageInsights is real (round-trips
// against actually-sent messages); GetEmailAddressInsights/
// ListRecommendations are partly-real, partly honest placeholder; see
// PARITY.md.
GetEmailAddressInsights(emailAddress string) (map[string]any, error)
GetMessageInsights(messageID string) (map[string]any, error)
ListRecommendations(
filter map[string]string,
nextToken string,
pageSize int,
) ([]recommendationOutput, string, error)
// Multi-region endpoint ops
CreateMultiRegionEndpoint(
endpointName string,
secondaryRegions []string,
tags map[string]string,
) (*createMultiRegionEndpointOutput, error)
GetMultiRegionEndpoint(endpointName string) (*multiRegionEndpointOutput, error)
DeleteMultiRegionEndpoint(endpointName string) (string, error)
ListMultiRegionEndpoints(nextToken string, pageSize int) ([]multiRegionEndpointSummaryOutput, string, error)
// Tenant ops
CreateTenant(tenantName string, tags map[string]string) (*tenantOutput, error)
GetTenant(tenantName string) (*tenantOutput, error)
DeleteTenant(tenantName string) error
ListTenants(nextToken string, pageSize int) ([]tenantInfoOutput, string, error)
CreateTenantResourceAssociation(tenantName, resourceArn string) error
DeleteTenantResourceAssociation(tenantName, resourceArn string) error
PutTenantSuppressionAttributes(tenantName string, suppressedReasons []string, suppressionScope string) error
ListResourceTenants(resourceArn, nextToken string, pageSize int) ([]resourceTenantOutput, string, error)
ListTenantResources(
tenantName string,
filter map[string]string,
nextToken string,
pageSize int,
) ([]tenantResourceOutput, string, error)
// Reputation entity ops -- real (derived from stored customer-managed
// status/policy overrides), not stubs; see PARITY.md.
GetReputationEntity(entityID string) (reputationEntityOutput, error)
ListReputationEntities(nextToken string, pageSize int) ([]reputationEntityOutput, string, error)
UpdateReputationEntityCustomerManagedStatus(entityID, status string) error
UpdateReputationEntityPolicy(entityID, policy string) error
// Metrics
BatchGetMetricData(queries []MetricDataQuery) ([]MetricDataResult, error)
// Infrastructure
Region() string
AccountID() string
Reset()
Snapshot(ctx context.Context) []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend is the interface for sesv2 storage operations.
type SuppressedDestination ¶
type SuppressedDestination struct {
LastUpdateTime time.Time `json:"lastUpdateTime"`
EmailAddress string `json:"emailAddress"`
Reason string `json:"reason"`
}
SuppressedDestination stores a suppressed email address.
type TopicPreference ¶
type TopicPreference struct {
TopicName string `json:"topicName"`
SubscriptionStatus string `json:"subscriptionStatus"`
}
TopicPreference represents a contact topic preference.
Source Files
¶
- account.go
- configuration_sets.go
- contact_lists.go
- contacts.go
- custom_verification_email_templates.go
- dedicated_ip_pools.go
- dedicated_ips.go
- deliverability.go
- email_identities.go
- email_templates.go
- errors.go
- event_destinations.go
- export_jobs.go
- handler.go
- handler_account.go
- handler_configuration_sets.go
- handler_contact_lists.go
- handler_contacts.go
- handler_custom_verification_email_templates.go
- handler_dedicated_ip_pools.go
- handler_dedicated_ips.go
- handler_deliverability.go
- handler_dispatch.go
- handler_email_identities.go
- handler_email_templates.go
- handler_event_destinations.go
- handler_export_jobs.go
- handler_import_jobs.go
- handler_message_insights.go
- handler_multi_region_endpoints.go
- handler_routes.go
- handler_send_email.go
- handler_suppression.go
- handler_tags.go
- handler_tenants.go
- handler_vdm.go
- import_jobs.go
- interfaces.go
- message_insights.go
- multi_region_endpoints.go
- persistence.go
- provider.go
- send_email.go
- store.go
- store_setup.go
- suppression.go
- tags.go
- tenants.go
- vdm.go
- wire_output.go