Documentation ¶
Index ¶
- Constants
- func IsKey(key string) bool
- func MakeCreateTableInput(tableName string, readCapacity, writeCapacity int64, opts ...Option) *dynamodb.CreateTableInput
- func RawEvents(record *dynamo.Record) ([][]byte, error)
- func TableName(eventSource string) (string, error)
- func VersionAndAt(key string) (int, eventsource.EpochMillis, error)
- type Option
- type Store
Constants ¶
const ( DefaultRegion = "us-east-1" DefaultHashKey = "key" DefaultRangeKey = "partition" )
Variables ¶
This section is empty.
Functions ¶
func MakeCreateTableInput ¶
func MakeCreateTableInput(tableName string, readCapacity, writeCapacity int64, opts ...Option) *dynamodb.CreateTableInput
MakeCreateTableInput is a utility tool to write the default table definition for creating the aws tables
func RawEvents ¶
Changes returns an ordered list of changes from the *dynamo.Record; will never return nil
func TableName ¶
TableName extracts a table name from a dynamodb event source arn arn:aws:dynamodb:us-west-2:528688496454:table/table-local-orgs/stream/2017-03-14T04:49:34.930
func VersionAndAt ¶
func VersionAndAt(key string) (int, eventsource.EpochMillis, error)
Types ¶
type Option ¶
type Option func(*Store)
func WithDynamoDB ¶
WithDynamoDB allows the caller to specify a pre-configured reference to DynamoDB
func WithEventPerItem ¶
WithEventPerItem allows you to specify the number of events to be stored per dynamodb record; defaults to 1
func WithHashKey ¶
WithHashKey specifies the alternate hash key to use
func WithRangeKey ¶
WithRangeKey specifies the alternate range key (sort key) to use
func WithRegion ¶
WithRegion specifies the AWS Region to connect to
func WithStreams ¶
func WithStreams() Option
WithStreams is an option only used by the MakeCreateTableInput that indicates the table should be created with DynamoDB streams enabled