dynamotest

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 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