Documentation ¶
Overview ¶
Package dynamodb provides convenience methods for working with aws-sdk-go/service/dynamodb instances.
Index ¶
- Constants
- func CreateTables(ctx context.Context, client *aws_dynamodb.Client, opts *CreateTablesOptions) error
- func HasTable(ctx context.Context, client *aws_dynamodb.Client, table_name string) (bool, error)
- func ListTables(ctx context.Context, client *aws_dynamodb.Client) ([]string, error)
- func NewClient(ctx context.Context, uri string) (*aws_dynamodb.Client, error)
- func NewClientV1(ctx context.Context, uri string) (*aws_dynamodb.DynamoDB, error)
- func NewClientWithURI(ctx context.Context, uri string) (*aws_dynamodb.Client, error)
- type CreateTablesOptions
Constants ¶
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 ¶
Return a boolean value indication whether or not the dynamodb.DynamoDB instances contains a table matching table_name.
func ListTables ¶
Return the list of table names associated with the dynamodb.DynamoDB instance.
func NewClientV1 ¶ added in v0.2.0
NewClientV1 returns an aws-sdk-go (v1) compatible client which is still necessary for some packages (like gocloud.dev/docstore)
func NewClientWithURI ¶ added in v0.0.3
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