dynamodb

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoItems = errors.New("no items found")
)

Functions

func JSONStringify

func JSONStringify(v any) string

JSONStringify - returns a json string representation of the given value

Types

type Client

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

Client - dynamodb client to query the table (get,put,query,scan)

func NewClient

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

NewClient - creates a new opinionated dynamodb client

func NewWith

func NewWith(ctx context.Context, configOpts func(*config.LoadOptions) error, dbOpts ...func(*ddb.Options)) (*Client, error)

NewWith - creates a new dynamodb client with exposed functional options. Use this client if you wish to have flexibility with some of the more advanced options.

func (*Client) BatchDeleteItems

func (c *Client) BatchDeleteItems(ctx context.Context, tableName string, keys []map[string]types.AttributeValue) (*ddb.BatchWriteItemOutput, error)

BatchDeleteItems - deletes items in a batch Note, max size is 25 items within a batch

func (*Client) Scan

func (c *Client) Scan(ctx context.Context, input *ddb.ScanInput) (*ddb.ScanOutput, error)

func (*Client) ScanAll

func (c *Client) ScanAll(ctx context.Context, input *ddb.ScanInput) ([]map[string]types.AttributeValue, error)

Jump to

Keyboard shortcuts

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