dynamo

package
v0.0.0-...-35463c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package dynamo provides structs for working with AWS Dynamo records.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(h Handler)

Handle Dynamo events with handler.

func HandleFunc

func HandleFunc(h HandlerFunc)

HandleFunc handles Dynamo events with callback function.

Types

type Event

type Event struct {
	Records []*Record `json:"Records"`
}

Event represents a Dynamo event with one or more records.

type Handler

type Handler interface {
	HandleDynamo(*Event, *apex.Context) error
}

Handler handles Dynamo events.

type HandlerFunc

type HandlerFunc func(*Event, *apex.Context) error

HandlerFunc unmarshals Dynamo 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 {
	EventID      string                        `json:"eventID"`
	EventName    string                        `json:"eventName"`
	EventSource  string                        `json:"eventSource"`
	EventVersion string                        `json:"eventVersion"`
	AWSRegion    string                        `json:"awsRegion"`
	Dynamodb     *dynamodbstreams.StreamRecord `json:"dynamodb"`
}

Record represents a single Dynamo record.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL