dynamox

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package dynamox contains DynamoDB utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttrAs

func AttrAs[T types.AttributeValue](
	item map[string]types.AttributeValue,
	name string,
) (v T, err error)

AttrAs fetches an attribute of type T from an item.

It returns an error if the item is absent or a different type.

func DeleteTableIfNotExists

func DeleteTableIfNotExists(
	ctx context.Context,
	client *dynamodb.Client,
	table string,
) error

DeleteTableIfNotExists deletes a DynamoDB table if it does not exist.

func NewTestClient

func NewTestClient(t *testing.T) *dynamodb.Client

NewTestClient returns a new DynamoDB client for use in a test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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