goety

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamoClient

type DynamoClient interface {
	ScanAll(ctx context.Context, input *dynamodb.ScanInput) ([]map[string]types.AttributeValue, error)
	BatchDeleteItems(ctx context.Context, tableName string, keys []map[string]types.AttributeValue) (*dynamodb.BatchWriteItemOutput, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(client DynamoClient, logger *slog.Logger, dryRun bool) Service

func (Service) Purge

func (s Service) Purge(ctx context.Context, tableName string, keys TableKeys) error

Purge all items from the given table

Example:

Purge(ctx, "my-table", TableKeys{ PartitionKey: "pk", SortKey: "sk" })

type TableKeys

type TableKeys struct {
	PartitionKey string
	SortKey      string
}

Jump to

Keyboard shortcuts

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