Documentation ¶
Index ¶
- func New[T dynamo.Thing](io *session.Session, spec *common.URL) dynamo.KeyVal[T]
- type Codec
- func (codec Codec[T]) Decode(gen map[string]*dynamodb.AttributeValue) (*T, error)
- func (codec Codec[T]) Encode(entity T) (map[string]*dynamodb.AttributeValue, error)
- func (codec Codec[T]) EncodeKey(key T) (map[string]*dynamodb.AttributeValue, error)
- func (codec Codec[T]) KeyOnly(gen map[string]*dynamodb.AttributeValue) map[string]*dynamodb.AttributeValue
- 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]*dynamodb.AttributeValue) (*T, error)
Decode dynamo representation to object
func (Codec[T]) Encode ¶
func (codec Codec[T]) Encode(entity T) (map[string]*dynamodb.AttributeValue, error)
Encode object to dynamo representation
func (Codec[T]) EncodeKey ¶
func (codec Codec[T]) EncodeKey(key T) (map[string]*dynamodb.AttributeValue, error)
EncodeKey to dynamo representation
func (Codec[T]) KeyOnly ¶
func (codec Codec[T]) KeyOnly(gen map[string]*dynamodb.AttributeValue) map[string]*dynamodb.AttributeValue
KeyOnly extracts key value from generic representation
Click to show internal directories.
Click to hide internal directories.