dynamodb

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: BSD-3-Clause Imports: 10 Imported by: 3

README

go-aws-dynamodb

Go package providing convenience methods for working with aws-sdk-go/service/dynamodb instances.

Documentation

Index

Constants

View Source
const LOCAL_CLIENT_URI string = "aws://?region=localhost&credentials=anon:&local=true"

LOCAL_CLIENT_URI is a suitable URI for passing to the `NewClient` and `NewClientV1` methods for use with a local instance of DynamoDB.

Variables

This section is empty.

Functions

func CreateTables

func CreateTables(ctx context.Context, client *aws_dynamodb.Client, opts *CreateTablesOptions) error

Create one or more tables associated with the dynamodb.DynamoDB instance.

func HasTable

func HasTable(ctx context.Context, client *aws_dynamodb.Client, table_name string) (bool, error)

Return a boolean value indication whether or not the dynamodb.DynamoDB instances contains a table matching table_name.

func ListTables

func ListTables(ctx context.Context, client *aws_dynamodb.Client) ([]string, error)

Return the list of table names associated with the dynamodb.DynamoDB instance.

func NewClient

func NewClient(ctx context.Context, uri string) (*aws_dynamodb.Client, error)

func NewClientWithURI

func NewClientWithURI(ctx context.Context, uri string) (*aws_dynamodb.Client, error)

Types

type CreateTablesOptions

type CreateTablesOptions struct {
	// A hash map containing table names and their dynamodb.CreateTableInput defintions
	Tables map[string]*aws_dynamodb.CreateTableInput
	// If true and the table already exists, delete and recreate the table
	Refresh bool
	// An optional string to append to each table name as it is created.
	Prefix string
}

CreateTablesOptions defines options for the CreateTables method

Jump to

Keyboard shortcuts

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