Documentation
¶
Overview ¶
Package dynamodb provides low-level persistence implementations that store data in DynamoDB.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateJournalStoreTable ¶
func CreateJournalStoreTable( ctx context.Context, client *dynamodb.Client, table string, decorators ...func(*dynamodb.CreateTableInput) []func(*dynamodb.Options), ) error
CreateJournalStoreTable creates a DynamoDB table for use with JournalStore.
func CreateKeyValueStoreTable ¶
func CreateKeyValueStoreTable( ctx context.Context, client *dynamodb.Client, table string, decorators ...func(*dynamodb.CreateTableInput) []func(*dynamodb.Options), ) error
CreateKeyValueStoreTable creates a DynamoDB table for use with KeyValueStore.
Types ¶
type JournalStore ¶
type JournalStore struct {
// Client is the DynamoDB client to use.
Client *dynamodb.Client
// Table is the table name used for storage of journal records.
Table string
// DecorateGetItem is an optional function that is called before each
// DynamoDB "GetItem" request.
//
// It may modify the API input in-place. It returns options that will be
// applied to the request.
DecorateGetItem func(*dynamodb.GetItemInput) []func(*dynamodb.Options)
// DecorateQuery is an optional function that is called before each DynamoDB
// "Query" request.
//
// It may modify the API input in-place. It returns options that will be
// applied to the request.
DecorateQuery func(*dynamodb.QueryInput) []func(*dynamodb.Options)
// DecoratePutItem is an optional function that is called before each
// DynamoDB "PutItem" request.
//
// It may modify the API input in-place. It returns options that will be
// applied to the request.
DecoratePutItem func(*dynamodb.PutItemInput) []func(*dynamodb.Options)
// DecorateDeleteItem is an optional function that is called before each
// DynamoDB "DeleteItem" request.
//
// It may modify the API input in-place. It returns options that will be
// applied to the request.
DecorateDeleteItem func(*dynamodb.DeleteItemInput) []func(*dynamodb.Options)
}
JournalStore is an implementation of journal.Store that persists journals in a DynamoDB table.
type KeyValueStore ¶
type KeyValueStore struct {
// Client is the DynamoDB client to use.
Client *dynamodb.Client
// Table is the table name used for storage of journal records.
Table string
// DecorateGetItem is an optional function that is called before each
// DynamoDB "GetItem" request.
//
// It may modify the API input in-place. It returns options that will be
// applied to the request.
DecorateGetItem func(*dynamodb.GetItemInput) []func(*dynamodb.Options)
// DecorateQuery is an optional function that is called before each DynamoDB
// "Query" request.
//
// It may modify the API input in-place. It returns options that will be
// applied to the request.
DecorateQuery func(*dynamodb.QueryInput) []func(*dynamodb.Options)
// DecoratePutItem is an optional function that is called before each
// DynamoDB "PutItem" request.
//
// It may modify the API input in-place. It returns options that will be
// applied to the request.
DecoratePutItem func(*dynamodb.PutItemInput) []func(*dynamodb.Options)
// DecorateDeleteItem is an optional function that is called before each
// DynamoDB "DeleteItem" request.
//
// It may modify the API input in-place. It returns options that will be
// applied to the request.
DecorateDeleteItem func(*dynamodb.DeleteItemInput) []func(*dynamodb.Options)
}
KeyValueStore is an implementation of kv.Store that persists keyspaces in a DynamoDB table.
Click to show internal directories.
Click to hide internal directories.