Documentation
¶
Index ¶
- Constants
- type Driver
- type DynKVItem
- type EntriesIterator
- type Params
- type Store
- func (s *Store) Close()
- func (s *Store) Delete(ctx context.Context, partitionKey, key []byte) error
- func (s *Store) Get(ctx context.Context, partitionKey, key []byte) (*kv.ValueWithPredicate, error)
- func (s *Store) Scan(ctx context.Context, partitionKey, start []byte) (kv.EntriesIterator, error)
- func (s *Store) Set(ctx context.Context, partitionKey, key, value []byte) error
- func (s *Store) SetIf(ctx context.Context, partitionKey, key, value []byte, ...) error
Constants ¶
View Source
const ( DriverName = "dynamodb" DefaultTableName = "kvstore" // TBD: Which values to use? DefaultReadCapacityUnits = 1000 DefaultWriteCapacityUnits = 1000 PartitionKey = "PartitionKey" ItemKey = "ItemKey" ItemValue = "ItemValue" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntriesIterator ¶
type EntriesIterator struct {
// contains filtered or unexported fields
}
func (*EntriesIterator) Close ¶
func (e *EntriesIterator) Close()
func (*EntriesIterator) Entry ¶
func (e *EntriesIterator) Entry() *kv.Entry
func (*EntriesIterator) Err ¶
func (e *EntriesIterator) Err() error
func (*EntriesIterator) Next ¶
func (e *EntriesIterator) Next() bool
type Params ¶
type Params struct { // The name of the DynamoDB table to be used as KV TableName string // Table provisioned throughput parameters, as described in // https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html ReadCapacityUnits int64 WriteCapacityUnits int64 // Maximal number of items per page during scan operation ScanLimit int64 // The endpoint URL of the DynamoDB endpoint // Can be used to redirect to DynmoDB on AWS, local docker etc. Endpoint string // AWS connection details - region and credentials // This will override any such details that are already exist in the system // While in general, AWS region and credentials are configured in the system for AWS usage, // these can be used to specify fake values, that cna be used to connect to local DynamoDB, // in case there are no credentials configured in the system // This is a client requirement as described in section 4 in // https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html AwsRegion string AwsAccessKeyID string AwsSecretAccessKey string }
Params struct holds all the configuration parameters that can be used to control the KV implementation over DynamoDB. This struct can be passed as json string, using the dsn string parameter, to func Open
Click to show internal directories.
Click to hide internal directories.