dynamodb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package dynamodb implements the reference DynamoDB idempotency protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	PutItem(context.Context, *sdk.PutItemInput, ...func(*sdk.Options)) (*sdk.PutItemOutput, error)
	GetItem(context.Context, *sdk.GetItemInput, ...func(*sdk.Options)) (*sdk.GetItemOutput, error)
	UpdateItem(context.Context, *sdk.UpdateItemInput, ...func(*sdk.Options)) (*sdk.UpdateItemOutput, error)
	DeleteItem(context.Context, *sdk.DeleteItemInput, ...func(*sdk.Options)) (*sdk.DeleteItemOutput, error)
}

type Options

type Options struct {
	TableName                                                   string
	KeyAttribute, SortKeyAttribute, StaticPartitionKey          string
	StatusAttribute, ExpiryAttribute, InProgressExpiryAttribute string
	DataAttribute, ValidationAttribute                          string
}

Options maps the reference attribute names. A sort key enables a static partition key, defaulting to idempotency#<AWS_LAMBDA_FUNCTION_NAME>.

type Store

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

func New

func New(client Client, options Options) (*Store, error)

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, key string) error

func (*Store) Get

func (s *Store) Get(ctx context.Context, key string) (idempotency.Record, error)

func (*Store) Put

func (s *Store) Put(ctx context.Context, record idempotency.Record, now time.Time) error

func (*Store) Update

func (s *Store) Update(ctx context.Context, record idempotency.Record) error

Jump to

Keyboard shortcuts

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