Versions in this module Expand all Collapse all v1 v1.0.2 Jun 7, 2022 Changes in this version + var ErrInvalidInput = errors.New("invalid input") + var ErrItemExpectationMismatch = errors.New("expected item was not matched") + var ErrKeyExpectationMismatch = errors.New("expected key was not matched") + var ErrNoExpectation = errors.New("expectations not found") + var ErrNoItem = errors.New("expectations item not found") + var ErrNoKey = errors.New("expectations key not found") + var ErrNoTable = errors.New("expectations table not found") + var ErrTableExpectationMismatch = errors.New("expected table was not matched") + type BatchGetItemExpectation struct + func (e *BatchGetItemExpectation) WillReturn(res dynamodb.BatchGetItemResponse) *BatchGetItemExpectation + func (e *BatchGetItemExpectation) WithRequest(input map[string]dynamodb.KeysAndAttributes) *BatchGetItemExpectation + type BatchWriteItemExpectation struct + func (e *BatchWriteItemExpectation) WillReturn(res dynamodb.BatchWriteItemResponse) *BatchWriteItemExpectation + func (e *BatchWriteItemExpectation) WithRequest(input map[string][]dynamodb.WriteRequest) *BatchWriteItemExpectation + type CreateTableExpectation struct + func (e *CreateTableExpectation) KeySchema(keySchema []dynamodb.KeySchemaElement) *CreateTableExpectation + func (e *CreateTableExpectation) Name(table string) *CreateTableExpectation + func (e *CreateTableExpectation) WillReturn(res dynamodb.CreateTableResponse) *CreateTableExpectation + type DeleteItemExpectation struct + func (e *DeleteItemExpectation) Table(table string) *DeleteItemExpectation + func (e *DeleteItemExpectation) WillReturn(res dynamodb.DeleteItemResponse) *DeleteItemExpectation + func (e *DeleteItemExpectation) WithKeys(keys map[string]dynamodb.AttributeValue) *DeleteItemExpectation + type DescribeTableExpectation struct + func (e *DescribeTableExpectation) Table(table string) *DescribeTableExpectation + func (e *DescribeTableExpectation) WillReturn(res dynamodb.DescribeTableResponse) *DescribeTableExpectation + type DynaMock struct + BatchGetItemExpect []*BatchGetItemExpectation + BatchWriteItemExpect []*BatchWriteItemExpectation + CreateTableExpect []*CreateTableExpectation + DeleteItemExpect []*DeleteItemExpectation + DescribeTableExpect []*DescribeTableExpectation + GetItemExpect []*GetItemExpectation + PutItemExpect []*PutItemExpectation + QueryExpect []*QueryExpectation + ScanExpect []*ScanExpectation + UpdateItemExpect []*UpdateItemExpectation + WaitTableExistExpect []*WaitTableExistExpectation + func New() (dynamodbiface.ClientAPI, *DynaMock) + func (e *DynaMock) ExpectBatchGetItem() *BatchGetItemExpectation + func (e *DynaMock) ExpectBatchWriteItem() *BatchWriteItemExpectation + func (e *DynaMock) ExpectCreateTable() *CreateTableExpectation + func (e *DynaMock) ExpectDeleteItem() *DeleteItemExpectation + func (e *DynaMock) ExpectDescribeTable() *DescribeTableExpectation + func (e *DynaMock) ExpectGetItem() *GetItemExpectation + func (e *DynaMock) ExpectPutItem() *PutItemExpectation + func (e *DynaMock) ExpectQuery() *QueryExpectation + func (e *DynaMock) ExpectScan() *ScanExpectation + func (e *DynaMock) ExpectUpdateItem() *UpdateItemExpectation + func (e *DynaMock) ExpectWaitTableExist() *WaitTableExistExpectation + type GetItemExpectation struct + func (e *GetItemExpectation) Table(table string) *GetItemExpectation + func (e *GetItemExpectation) WillReturn(res dynamodb.GetItemResponse) *GetItemExpectation + func (e *GetItemExpectation) WithKeys(keys map[string]dynamodb.AttributeValue) *GetItemExpectation + type MockDynamoDB struct + func (e *MockDynamoDB) BatchGetItemRequest(input *dynamodb.BatchGetItemInput) dynamodb.BatchGetItemRequest + func (e *MockDynamoDB) BatchWriteItemRequest(input *dynamodb.BatchWriteItemInput) dynamodb.BatchWriteItemRequest + func (e *MockDynamoDB) CreateTableRequest(input *dynamodb.CreateTableInput) dynamodb.CreateTableRequest + func (e *MockDynamoDB) DeleteItemRequest(input *dynamodb.DeleteItemInput) dynamodb.DeleteItemRequest + func (e *MockDynamoDB) DescribeTableRequest(input *dynamodb.DescribeTableInput) dynamodb.DescribeTableRequest + func (e *MockDynamoDB) GetItemRequest(input *dynamodb.GetItemInput) dynamodb.GetItemRequest + func (e *MockDynamoDB) PutItemRequest(input *dynamodb.PutItemInput) dynamodb.PutItemRequest + func (e *MockDynamoDB) QueryRequest(input *dynamodb.QueryInput) dynamodb.QueryRequest + func (e *MockDynamoDB) ScanRequest(input *dynamodb.ScanInput) dynamodb.ScanRequest + func (e *MockDynamoDB) UpdateItemRequest(input *dynamodb.UpdateItemInput) dynamodb.UpdateItemRequest + func (e *MockDynamoDB) WaitUntilTableExists(ctx context.Context, input *dynamodb.DescribeTableInput, ...) error + type PutItemExpectation struct + func (e *PutItemExpectation) Table(table string) *PutItemExpectation + func (e *PutItemExpectation) WillReturn(res dynamodb.PutItemResponse) *PutItemExpectation + func (e *PutItemExpectation) WithItems(item map[string]dynamodb.AttributeValue) *PutItemExpectation + type QueryExpectation struct + func (e *QueryExpectation) Table(table string) *QueryExpectation + func (e *QueryExpectation) WillReturn(res dynamodb.QueryResponse) *QueryExpectation + type ScanExpectation struct + func (e *ScanExpectation) Table(table string) *ScanExpectation + func (e *ScanExpectation) WillReturn(res dynamodb.ScanResponse) *ScanExpectation + type UpdateItemExpectation struct + func (e *UpdateItemExpectation) Table(table string) *UpdateItemExpectation + func (e *UpdateItemExpectation) Updates(attrs map[string]dynamodb.AttributeValueUpdate) *UpdateItemExpectation + func (e *UpdateItemExpectation) WillReturn(res dynamodb.UpdateItemResponse) *UpdateItemExpectation + func (e *UpdateItemExpectation) WithKeys(keys map[string]dynamodb.AttributeValue) *UpdateItemExpectation + type WaitTableExistExpectation struct + func (e *WaitTableExistExpectation) Table(table string) *WaitTableExistExpectation + func (e *WaitTableExistExpectation) WillReturn(err error) *WaitTableExistExpectation