Documentation ¶
Index ¶
- func New[T dynamo.Thing](cfg *dynamo.Config) dynamo.KeyVal[T]
- type Codec
- func (codec Codec[T]) Decode(gen map[string]types.AttributeValue) (T, error)
- func (codec Codec[T]) Encode(entity T) (map[string]types.AttributeValue, error)
- func (codec Codec[T]) EncodeKey(key T) (map[string]types.AttributeValue, error)
- func (codec Codec[T]) KeyOnly(gen map[string]types.AttributeValue) map[string]types.AttributeValue
- type DynamoDB
- type Schema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Codec ¶
Codec is utility to encode/decode objects to dynamo representation
func (Codec[T]) Decode ¶
func (codec Codec[T]) Decode(gen map[string]types.AttributeValue) (T, error)
Decode dynamo representation to object
func (Codec[T]) Encode ¶
func (codec Codec[T]) Encode(entity T) (map[string]types.AttributeValue, error)
Encode object to dynamo representation
func (Codec[T]) EncodeKey ¶
func (codec Codec[T]) EncodeKey(key T) (map[string]types.AttributeValue, error)
EncodeKey to dynamo representation
func (Codec[T]) KeyOnly ¶
func (codec Codec[T]) KeyOnly(gen map[string]types.AttributeValue) map[string]types.AttributeValue
KeyOnly extracts key value from generic representation
type DynamoDB ¶ added in v1.6.0
type DynamoDB interface { GetItem(context.Context, *dynamodb.GetItemInput, ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error) PutItem(context.Context, *dynamodb.PutItemInput, ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error) DeleteItem(context.Context, *dynamodb.DeleteItemInput, ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error) UpdateItem(context.Context, *dynamodb.UpdateItemInput, ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error) Query(context.Context, *dynamodb.QueryInput, ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error) }
DynamoDB declares API used by the library
Click to show internal directories.
Click to hide internal directories.