dynamo

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable

func CreateTable(client *dynamodb.DynamoDB, tableName string) error

CreateTable creates a table with the input `tableName`.

func DestroyTable

func DestroyTable(client *dynamodb.DynamoDB, tableName string) error

DestroyTable destroys the input table.

func GetRegion

func GetRegion(client *dynamodb.DynamoDB) (string, error)

GetRegion returns the region associated with the input dynamo client.

func GetTables

func GetTables(client *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

func WaitForTable

func WaitForTable(client *dynamodb.DynamoDB, tableName string) error

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

Types

type Connection

type Connection struct {
	Client *dynamodb.DynamoDB
	Params Params
}

Connection contains all of the relevant information to maintain a connection with DynamoDB.

func CreateConnection

func CreateConnection() Connection

CreateConnection creates a connection with DynamoDB and returns it.

type Params

type Params struct {
	ID        uuid.UUID
	TableName string
	Created   time.Time
	Modified  time.Time
}

Params provides parameter options for a DynamoDB table.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL