Categorygithub.com/tommzn/aws-dynamodb
modulepackage
1.0.6
Repository: https://github.com/tommzn/aws-dynamodb.git
Documentation: pkg.go.dev

# README

Go Reference GitHub go.mod Go version GitHub release (latest by date) Go Report Card Actions Status

DynamoDb Wrapper

This package provides a wrapper to dynamodb to run CRUD actions for items. It expects a table with a composed primary key of ObjectType (Hash) and Id (Range). Sub package testing will support you creating a suitable table for tests.

# Functions

NewItemIdentifier returns a new ItemIdentifier with passed id and object type.
NewRepository creates a new DynamoDb repository by passed coinfig.

# Constants

DEFAULT_AWS_REGION defines the fallback AWS region if nothing has been specified by config.
DEFAULT_TABLENAME defines the default DynamoDb table name.

# Structs

DynamoDbRepository is a wrapper to AWS DynamoDb SDK.
ItemIdentifier can be used in objects which should be persisted in DynamoDb.
ItemLock is a lock for an item in DynamoDb.
QueryRequest is used to query items for a partition key.

# Interfaces

ItemKey is an interface each object have to fulfill to be persisted in DynamoDb.
Repository provides CRUD access for DynamoDb items.