Documentation
¶
Overview ¶
Package fakedb provides a deterministic, state-backed DynamoDBAPI fake for consumer tests.
The fake is a local testing aid. It is intentionally bounded to TableTheory's scenario-validated behavior and should not be treated as a DynamoDB emulator.
Index ¶
- type Fake
- func (f *Fake) BatchGetItem(_ context.Context, params *dynamodb.BatchGetItemInput, ...) (*dynamodb.BatchGetItemOutput, error)
- func (f *Fake) BatchWriteItem(_ context.Context, params *dynamodb.BatchWriteItemInput, ...) (*dynamodb.BatchWriteItemOutput, error)
- func (f *Fake) CreateBackup(_ context.Context, params *dynamodb.CreateBackupInput, ...) (*dynamodb.CreateBackupOutput, error)
- func (f *Fake) CreateTable(_ context.Context, params *dynamodb.CreateTableInput, ...) (*dynamodb.CreateTableOutput, error)
- func (f *Fake) DeleteItem(_ context.Context, params *dynamodb.DeleteItemInput, ...) (*dynamodb.DeleteItemOutput, error)
- func (f *Fake) DeleteTable(_ context.Context, params *dynamodb.DeleteTableInput, ...) (*dynamodb.DeleteTableOutput, error)
- func (f *Fake) DescribeTable(_ context.Context, params *dynamodb.DescribeTableInput, ...) (*dynamodb.DescribeTableOutput, error)
- func (f *Fake) GetItem(_ context.Context, params *dynamodb.GetItemInput, _ ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error)
- func (f *Fake) Items(tableName string) []map[string]types.AttributeValue
- func (f *Fake) ListTables(_ context.Context, params *dynamodb.ListTablesInput, ...) (*dynamodb.ListTablesOutput, error)
- func (f *Fake) PutItem(_ context.Context, params *dynamodb.PutItemInput, _ ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
- func (f *Fake) Query(_ context.Context, params *dynamodb.QueryInput, _ ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error)
- func (f *Fake) Reset()
- func (f *Fake) Scan(_ context.Context, params *dynamodb.ScanInput, _ ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error)
- func (f *Fake) Seed(tableName string, items ...map[string]types.AttributeValue) error
- func (f *Fake) TransactGetItems(_ context.Context, params *dynamodb.TransactGetItemsInput, ...) (*dynamodb.TransactGetItemsOutput, error)
- func (f *Fake) TransactWriteItems(_ context.Context, params *dynamodb.TransactWriteItemsInput, ...) (*dynamodb.TransactWriteItemsOutput, error)
- func (f *Fake) UpdateItem(_ context.Context, params *dynamodb.UpdateItemInput, ...) (*dynamodb.UpdateItemOutput, error)
- func (f *Fake) UpdateTable(_ context.Context, params *dynamodb.UpdateTableInput, ...) (*dynamodb.UpdateTableOutput, error)
- func (f *Fake) UpdateTimeToLive(_ context.Context, params *dynamodb.UpdateTimeToLiveInput, ...) (*dynamodb.UpdateTimeToLiveOutput, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fake ¶
type Fake struct {
// contains filtered or unexported fields
}
Fake is an in-memory implementation of the TableTheory DynamoDBAPI seam.
func (*Fake) BatchGetItem ¶
func (f *Fake) BatchGetItem(_ context.Context, params *dynamodb.BatchGetItemInput, _ ...func(*dynamodb.Options)) (*dynamodb.BatchGetItemOutput, error)
func (*Fake) BatchWriteItem ¶
func (f *Fake) BatchWriteItem(_ context.Context, params *dynamodb.BatchWriteItemInput, _ ...func(*dynamodb.Options)) (*dynamodb.BatchWriteItemOutput, error)
func (*Fake) CreateBackup ¶
func (f *Fake) CreateBackup(_ context.Context, params *dynamodb.CreateBackupInput, _ ...func(*dynamodb.Options)) (*dynamodb.CreateBackupOutput, error)
func (*Fake) CreateTable ¶
func (f *Fake) CreateTable(_ context.Context, params *dynamodb.CreateTableInput, _ ...func(*dynamodb.Options)) (*dynamodb.CreateTableOutput, error)
func (*Fake) DeleteItem ¶
func (f *Fake) DeleteItem(_ context.Context, params *dynamodb.DeleteItemInput, _ ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error)
func (*Fake) DeleteTable ¶
func (f *Fake) DeleteTable(_ context.Context, params *dynamodb.DeleteTableInput, _ ...func(*dynamodb.Options)) (*dynamodb.DeleteTableOutput, error)
func (*Fake) DescribeTable ¶
func (f *Fake) DescribeTable(_ context.Context, params *dynamodb.DescribeTableInput, _ ...func(*dynamodb.Options)) (*dynamodb.DescribeTableOutput, error)
func (*Fake) GetItem ¶
func (f *Fake) GetItem(_ context.Context, params *dynamodb.GetItemInput, _ ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error)
func (*Fake) Items ¶
func (f *Fake) Items(tableName string) []map[string]types.AttributeValue
Items returns a deterministic snapshot of the table's stored items.
func (*Fake) ListTables ¶
func (f *Fake) ListTables(_ context.Context, params *dynamodb.ListTablesInput, _ ...func(*dynamodb.Options)) (*dynamodb.ListTablesOutput, error)
func (*Fake) PutItem ¶
func (f *Fake) PutItem(_ context.Context, params *dynamodb.PutItemInput, _ ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
func (*Fake) Query ¶
func (f *Fake) Query(_ context.Context, params *dynamodb.QueryInput, _ ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error)
func (*Fake) TransactGetItems ¶
func (f *Fake) TransactGetItems(_ context.Context, params *dynamodb.TransactGetItemsInput, _ ...func(*dynamodb.Options)) (*dynamodb.TransactGetItemsOutput, error)
func (*Fake) TransactWriteItems ¶
func (f *Fake) TransactWriteItems(_ context.Context, params *dynamodb.TransactWriteItemsInput, _ ...func(*dynamodb.Options)) (*dynamodb.TransactWriteItemsOutput, error)
func (*Fake) UpdateItem ¶
func (f *Fake) UpdateItem(_ context.Context, params *dynamodb.UpdateItemInput, _ ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error)
func (*Fake) UpdateTable ¶
func (f *Fake) UpdateTable(_ context.Context, params *dynamodb.UpdateTableInput, _ ...func(*dynamodb.Options)) (*dynamodb.UpdateTableOutput, error)
func (*Fake) UpdateTimeToLive ¶
func (f *Fake) UpdateTimeToLive(_ context.Context, params *dynamodb.UpdateTimeToLiveInput, _ ...func(*dynamodb.Options)) (*dynamodb.UpdateTimeToLiveOutput, error)
Click to show internal directories.
Click to hide internal directories.