dynamodb

package
v0.69.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TransactionConflictError = errorTransactionConflict("transaction conflict")
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, config cfg.Config, logger log.Logger, name string, optFns ...ClientOption) (*dynamodb.Client, error)

func ProvideClient

func ProvideClient(ctx context.Context, config cfg.Config, logger log.Logger, name string, optFns ...ClientOption) (*dynamodb.Client, error)

func TransformTransactionError

func TransformTransactionError(err error) error

Types

type Client

type Client interface {
	BatchGetItem(ctx context.Context, params *dynamodb.BatchGetItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.BatchGetItemOutput, error)
	BatchWriteItem(ctx context.Context, params *dynamodb.BatchWriteItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.BatchWriteItemOutput, error)
	CreateTable(ctx context.Context, params *dynamodb.CreateTableInput, optFns ...func(*dynamodb.Options)) (*dynamodb.CreateTableOutput, error)
	DeleteItem(ctx context.Context, params *dynamodb.DeleteItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error)
	DeleteTable(ctx context.Context, params *dynamodb.DeleteTableInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DeleteTableOutput, error)
	DescribeTable(ctx context.Context, params *dynamodb.DescribeTableInput, optFns ...func(options *dynamodb.Options)) (*dynamodb.DescribeTableOutput, error)
	GetItem(ctx context.Context, params *dynamodb.GetItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error)
	ListTagsOfResource(ctx context.Context, params *dynamodb.ListTagsOfResourceInput, optFns ...func(*dynamodb.Options)) (*dynamodb.ListTagsOfResourceOutput, error)
	PutItem(ctx context.Context, params *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
	Query(ctx context.Context, params *dynamodb.QueryInput, optFns ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error)
	Scan(ctx context.Context, params *dynamodb.ScanInput, optFns ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error)
	TransactGetItems(ctx context.Context, params *dynamodb.TransactGetItemsInput, optFns ...func(*dynamodb.Options)) (*dynamodb.TransactGetItemsOutput, error)
	TransactWriteItems(ctx context.Context, params *dynamodb.TransactWriteItemsInput, optFns ...func(*dynamodb.Options)) (*dynamodb.TransactWriteItemsOutput, error)
	UpdateItem(ctx context.Context, params *dynamodb.UpdateItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error)
	UpdateTable(ctx context.Context, params *dynamodb.UpdateTableInput, optFns ...func(*dynamodb.Options)) (*dynamodb.UpdateTableOutput, error)
	UpdateTimeToLive(ctx context.Context, params *dynamodb.UpdateTimeToLiveInput, optFns ...func(*dynamodb.Options)) (*dynamodb.UpdateTimeToLiveOutput, error)
}

type ClientConfig

type ClientConfig struct {
	Settings     ClientSettings
	LoadOptions  []func(options *awsCfg.LoadOptions) error
	RetryOptions []func(*retry.StandardOptions)
}

func (ClientConfig) GetLoadOptions

func (c ClientConfig) GetLoadOptions() []func(options *awsCfg.LoadOptions) error

func (ClientConfig) GetRetryOptions

func (c ClientConfig) GetRetryOptions() []func(*retry.StandardOptions)

func (ClientConfig) GetSettings

func (c ClientConfig) GetSettings() gosoAws.ClientSettings

type ClientOption

type ClientOption func(cfg *ClientConfig)

type ClientSettings

type ClientSettings struct {
	gosoAws.ClientSettings
	// Allows you to disable the client's validation of response integrity using CRC32
	// checksum. Enabled by default.
	DisableValidateResponseChecksum bool `cfg:"disable_validate_response_checksum" default:"false"`
	// Allows you to enable the client's support for compressed gzip responses.
	// Disabled by default.
	EnableAcceptEncodingGzip bool `cfg:"enable_accept_encoding_gzip" default:"false"`
	// Configures the way we purge a table (when loading fixtures)
	//  - scan: Scan the table and perform batch deletes for every item. Slower, but does not modify infrastructure.
	//  - drop_table: Delete the table and create a new one using the settings provided to the repository.
	PurgeType string `cfg:"purge_type" default:"scan" validate:"oneof=scan drop_table"`
	// When using PurgeType "scan", configure the number of parallel workers scanning and deleting items.
	// Uses the number of CPU cores when set to 0.
	PurgeParallelism int `cfg:"purge_parallelism" default:"0" validate:"min=0"`
}

type ConditionalCheckFailedError

type ConditionalCheckFailedError struct {
	Exception *types.TransactionCanceledException
}

func (ConditionalCheckFailedError) Error

func (ConditionalCheckFailedError) Unwrap

type RetryOnConditionalCheckFailed

type RetryOnConditionalCheckFailed struct{}

func (RetryOnConditionalCheckFailed) IsErrorRetryable

func (r RetryOnConditionalCheckFailed) IsErrorRetryable(err error) aws.Ternary

IsErrorRetryable reacts on failed ConditionalChecks within transactional operations When a condition fails within one transaction, this usually indicates an operation which should not be executed. Thus, it should never be retried

type RetryOnTransactionConflict

type RetryOnTransactionConflict struct{}

func (RetryOnTransactionConflict) IsErrorRetryable

func (r RetryOnTransactionConflict) IsErrorRetryable(err error) aws.Ternary

IsErrorRetryable reacts on TransactionConflicts within transactional operations Transaction Conflicts occur when using a transactions and multiple calls want to change the same resource. This is usually resolvable by retrying

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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