awsdynamodb

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient added in v0.3.0

func NewClient(useTracing bool) *dynamodb.Client

func QueryTable

func QueryTable[T any](ctx context.Context, tablename string, client DynamoDBQueryTableApi, keys map[string]any) []T

func ReadAllTableData

func ReadAllTableData[T any](ctx context.Context, tablename string, client DynamoDBScanTableAPI) []T

func UpdateTableItem

func UpdateTableItem(ctx context.Context, tablename string, client DynamoDBUpdateItemApi, key map[string]any, values map[string]any) (*dynamodb.UpdateItemOutput, error)

Types

type DynamoDBDescribeTableAPI

type DynamoDBDescribeTableAPI interface {
	DescribeTable(ctx context.Context,
		params *dynamodb.DescribeTableInput,
		optFns ...func(*dynamodb.Options)) (*dynamodb.DescribeTableOutput, error)
}

type DynamoDBQueryTableApi

type DynamoDBQueryTableApi interface {
	Query(ctx context.Context,
		params *dynamodb.QueryInput,
		optFns ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error)
}

type DynamoDBScanTableAPI

type DynamoDBScanTableAPI interface {
	Scan(ctx context.Context,
		params *dynamodb.ScanInput,
		optFns ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error)
}

type DynamoDBUpdateItemApi

type DynamoDBUpdateItemApi interface {
	UpdateItem(ctx context.Context,
		params *dynamodb.UpdateItemInput,
		optFns ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error)
}

Jump to

Keyboard shortcuts

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