dynamodbtk

package
v0.0.0-...-ce895c0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttributeMapToStruct

func AttributeMapToStruct(am map[string]types.AttributeValue, out interface{}) error

func GetItem

func GetItem[InputT any, OutputT any](
	ctx context.Context,
	client DynamoDBClient,
	tableName string,
	rowKey InputT,
) (OutputT, error)

func NewClient

func NewClient(ctx context.Context, region string) *dynamodb.Client

func PutItem

func PutItem[InputT any](
	ctx context.Context,
	client DynamoDBClient,
	tableName string,
	item InputT,
	failIfExistsKey string,
) (InputT, error)

func QueryItemsByIntField

func QueryItemsByIntField[OutputT any](
	ctx context.Context,
	client DynamoDBClient,
	tableName string,
	fieldName string,
	queryValue int) ([]OutputT, error)

func StructToAttributeMap

func StructToAttributeMap(input interface{}) map[string]types.AttributeValue

Types

type ErrNoMatchingStructFieldForColumns

type ErrNoMatchingStructFieldForColumns struct {
	ColumnNames []string
}

func (ErrNoMatchingStructFieldForColumns) Error

Jump to

Keyboard shortcuts

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