Documentation
¶
Index ¶
- type CapturedEmail
- type Service
- func (s *Service) ClearMessagesHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) Detect(r *http.Request) bool
- func (s *Service) MessageCount() int
- func (s *Service) MessagesHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) Name() string
- func (s *Service) Reset()
- func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapturedEmail ¶
type CapturedEmail struct {
MessageID string `json:"MessageId"`
From string `json:"From"`
To []string `json:"To"`
CC []string `json:"CC,omitempty"`
BCC []string `json:"BCC,omitempty"`
ReplyTo []string `json:"ReplyTo,omitempty"`
Subject string `json:"Subject"`
Body emailBody `json:"Body"`
SentAt time.Time `json:"SentAt"`
Raw string `json:"Raw,omitempty"` // populated for SendRawEmail
}
CapturedEmail represents an email that was "sent" via SES. Exposed via the /_nimbus/ses/messages endpoint.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the AWS SES emulator. Emails are never actually sent — they are captured in memory and exposed via a Nimbus-specific endpoint for inspection during testing.
Captured emails are available at:
GET /_nimbus/ses/messages
func (*Service) ClearMessagesHandler ¶
func (s *Service) ClearMessagesHandler(w http.ResponseWriter, r *http.Request)
ClearMessagesHandler clears all captured emails. Useful between tests. DELETE /_nimbus/ses/messages
func (*Service) Detect ¶
Detect identifies SES requests by X-Amz-Target header or Action param. SES v1 uses query-param style (Action=SendEmail). SES v2 uses X-Amz-Target: AmazonSimpleEmailService.* or path /v2/email/...
func (*Service) MessageCount ¶
MessageCount returns how many emails have been captured.
func (*Service) MessagesHandler ¶
func (s *Service) MessagesHandler(w http.ResponseWriter, r *http.Request)
MessagesHandler serves captured emails at GET /_nimbus/ses/messages. This is not an AWS API — it's a Nimbus-specific endpoint for test inspection.