dynamotest

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultThroughput = &dynamodb.ProvisionedThroughput{
	ReadCapacityUnits:  aws.Int64(25),
	WriteCapacityUnits: aws.Int64(25),
}

DefaultThroughput includes some basic throughput capacity

Functions

func DefaultDefinitions

func DefaultDefinitions() []*dynamodb.AttributeDefinition

DefaultDefinitions contains all the default attribute definitions

func DefaultGSIConfiguration

func DefaultGSIConfiguration() []*dynamodb.GlobalSecondaryIndex

DefaultGSIConfiguration contains some generic GSI keys

func DefaultKeySchema

func DefaultKeySchema() []*dynamodb.KeySchemaElement

DefaultKeySchema includes a default PK, SK based key schema

func SetupTestTable

func SetupTestTable(parentCtx context.Context, t *testing.T, tableName string, schema Schema) (string, *dynamodb.DynamoDB)

SetupTestTable sets up a table that will have random characters appended to the table name to avoid conflicts between tests with the same table name

Types

type Schema

type Schema struct {
	KeySchema []*dynamodb.KeySchemaElement
	Attrs     []*dynamodb.AttributeDefinition
	GSI       []*dynamodb.GlobalSecondaryIndex
}

Schema represents a dynamodb schema

func DefaultSchema

func DefaultSchema() Schema

DefaultSchema to use

Jump to

Keyboard shortcuts

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