Documentation
¶
Overview ¶
Package dynamokv provides a kv.BinaryStore implementation that persists to a DynamoDB table.
IAM Permissions ¶
The following IAM actions are required on the DynamoDB table:
- dynamodb:DescribeTable
- dynamodb:GetItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
- dynamodb:Query
If the table does not already exist, the store attempts to create it automatically, which requires the following additional action:
- dynamodb:CreateTable
The store's Provision method can be called to trigger provisioning ahead of time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBinaryStore ¶ added in v0.9.0
NewBinaryStore returns a new kv.BinaryStore that uses the given DynamoDB client to store key/value pairs in the given table.
Types ¶
type Option ¶ added in v0.9.0
type Option func(*store)
Option is a functional option that changes the behavior of NewBinaryStore.
func WithRequestHook ¶ added in v0.9.0
WithRequestHook is an Option that configures fn as a pre-request hook.
Before each DynamoDB API request, fn is passed a pointer to the input struct, e.g. dynamodb.GetItemInput, which it may modify in-place. It may be called with any DynamoDB request type. The types of requests used may change in any version without notice.
Any functions returned by fn will be applied to the request's options before the request is sent.