package
1.1.7
Repository: https://github.com/l50/awsutils.git
Documentation: pkg.go.dev

# README

awsutils/dynamo

The dynamo package is a collection of utility functions designed to simplify common dynamo tasks.


Table of contents


Functions

CreateConnection()

CreateConnection() Connection

CreateConnection creates a connection with DynamoDB and returns it.


CreateTable(*dynamodb.DynamoDB, string)

CreateTable(*dynamodb.DynamoDB, string) error

CreateTable creates a table with the input tableName.


DestroyTable(*dynamodb.DynamoDB, string)

DestroyTable(*dynamodb.DynamoDB, string) error

DestroyTable destroys the input table.


GetRegion(*dynamodb.DynamoDB)

GetRegion(*dynamodb.DynamoDB) string, error

GetRegion returns the region associated with the input dynamo client.


GetTables(*dynamodb.DynamoDB)

GetTables(*dynamodb.DynamoDB) []*string, error

GetTables returns all dynamoDB tables that the input client has access to. Resource: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/dynamo-example-list-tables.html


WaitForTable(*dynamodb.DynamoDB, string)

WaitForTable(*dynamodb.DynamoDB, string) error

WaitForTable waits for the creation process of the input table to finish.


Installation

To use the awsutils/dynamo package, you first need to install it. Follow the steps below to install via go get.

go get github.com/l50/awsutils/dynamo

Usage

After installation, you can import the package in your Go project using the following import statement:

import "github.com/l50/awsutils/dynamo"

Tests

To ensure the package is working correctly, run the following command to execute the tests for awsutils/dynamo:

go test -v

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


License

This project is licensed under the MIT License - see the LICENSE file for details.