Documentation ¶
Overview ¶
Package ses provides structs for working with AWS SES records.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleFunc ¶
func HandleFunc(h HandlerFunc)
HandleFunc handles SES events with callback function.
Types ¶
type Event ¶
type Event struct {
Records []*Record `json:"Records"`
}
Event represents a SES event with one or more records.
type HandlerFunc ¶
HandlerFunc unmarshals SES events before passing control.
func (HandlerFunc) Handle ¶
func (h HandlerFunc) Handle(data json.RawMessage, ctx *apex.Context) (interface{}, error)
Handle implements apex.Handler.
type Record ¶
type Record struct { EventSource string `json:"eventSource"` EventVersion string `json:"eventVersion"` SES struct { Receipt struct { Type string `json:"Type"` MessageID string `json:"MessageID"` TopicARN string `json:"TopicArn"` Subject string `json:"Subject"` Message []byte `json:"Message"` Timestamp time.Time `json:"Timestamp"` SignatureVersion string `json:"SignatureVersion"` Signature string `json:"Signature"` SignatureCertURL string `json:"SignatureCertURL"` UnsubscribeURL string `json:"UnsubscribeURL"` MessageAttributes map[string]interface{} `json:"MessageAttributes"` } `json:"receipt"` Mail struct { Type string `json:"Type"` MessageID string `json:"MessageID"` TopicARN string `json:"TopicArn"` Subject string `json:"Subject"` Message []byte `json:"Message"` Timestamp time.Time `json:"Timestamp"` SignatureVersion string `json:"SignatureVersion"` Signature string `json:"Signature"` SignatureCertURL string `json:"SignatureCertURL"` UnsubscribeURL string `json:"UnsubscribeURL"` MessageAttributes map[string]interface{} `json:"MessageAttributes"` } `json:"mail"` } `json:"ses"` }
Record represents a single SES record.
Click to show internal directories.
Click to hide internal directories.