Documentation ¶
Index ¶
- Constants
- func NewClient(ctx context.Context, config cfg.Config, logger log.Logger, name string, ...) (*dynamodb.Client, error)
- func ProvideClient(ctx context.Context, config cfg.Config, logger log.Logger, name string, ...) (*dynamodb.Client, error)
- func TransformTransactionError(err error) error
- type Client
- type ClientConfig
- type ClientOption
- type ClientSettings
- type ConditionalCheckFailedError
- type RetryOnConditionalCheckFailed
- type RetryOnTransactionConflict
Constants ¶
View Source
const (
TransactionConflictError = errorTransactionConflict("transaction conflict")
)
Variables ¶
This section is empty.
Functions ¶
func ProvideClient ¶
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) 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
}
type ConditionalCheckFailedError ¶
type ConditionalCheckFailedError struct {
Exception *types.TransactionCanceledException
}
func (ConditionalCheckFailedError) Error ¶
func (e ConditionalCheckFailedError) Error() string
func (ConditionalCheckFailedError) Unwrap ¶
func (e ConditionalCheckFailedError) Unwrap() error
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
Click to show internal directories.
Click to hide internal directories.