Documentation ¶
Overview ¶
Package cognito provides structs for working with AWS Cognito records.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleFunc ¶
func HandleFunc(h HandlerFunc)
HandleFunc handles Cognito events with callback function.
Types ¶
type Change ¶
type Change struct { Old string `json:"oldValue"` New string `json:"newValue"` Op string `json:"op"` }
Change represents a single Cognito data record change.
type Event ¶
type Event struct {
Records []*Record `json:"Records"`
}
Event represents a Cognito event with one or more records.
type HandlerFunc ¶
HandlerFunc unmarshals Cognito 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 { Version int `json:"version"` EventType string `json:"eventType"` Region string `json:"region"` IdentityPoolID string `json:"identityPoolId"` IdentityID string `json:"identityId"` DatasetName string `json:"datasetName"` DatasetRecords map[string]*Change `json:"datasetRecords"` }
Record represents a single Cognito record.
Click to show internal directories.
Click to hide internal directories.