In-memory implementation of DynamoDB, ideal for unit testing
This module was inspired by and basically copies github.com/elliotchance/mocksqs by Elliot Chance.
The simplest way to create a new DynamoDB service is with mockdynamodb.New()
. However,
if you need tables you can use mockdynamodb.NewWithTables()
:
tableName := "foobar"
client := mocksqs.NewWithTables({tableName})
result, err := client.PutItem(&dynamodb.PutItemInput{
TableName: aws.String(tableName),
})
Only some DynamoDB methods are implemented, at moment. Methods not implemented will panic. If you want a method implemented please raise an issue.
You can view the specific implementation details in the godoc documentation.