modelstest

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDDBClient

type MockDDBClient struct {
	dynamodbiface.DynamoDBAPI
	mock.Mock
	MockScanAttributes      []map[string]*dynamodb.AttributeValue
	MockItemAttributeOutput map[string]*dynamodb.AttributeValue
	MockQueryAttributes     []map[string]*dynamodb.AttributeValue
	TestErr                 bool
}

MockDDBClient is used to stub out requests to DynamoDB for unit testing.

func (*MockDDBClient) BatchWriteItem

func (client *MockDDBClient) BatchWriteItem(input *dynamodb.BatchWriteItemInput) (*dynamodb.BatchWriteItemOutput, error)

BatchWriteItem is a mock DynamoDB BatchWriteItem request.

func (*MockDDBClient) DeleteItem

func (client *MockDDBClient) DeleteItem(
	input *dynamodb.DeleteItemInput,
) (*dynamodb.DeleteItemOutput, error)

DeleteItem is a mock method to remove an item from a dynamodb table.

func (*MockDDBClient) GetItem

func (client *MockDDBClient) GetItem(input *dynamodb.GetItemInput) (*dynamodb.GetItemOutput, error)

func (*MockDDBClient) PutItem

func (client *MockDDBClient) PutItem(input *dynamodb.PutItemInput) (*dynamodb.PutItemOutput, error)

PutItem is a mock DynamoDB PutItem request.

func (*MockDDBClient) Query

func (client *MockDDBClient) Query(input *dynamodb.QueryInput) (*dynamodb.QueryOutput, error)

Query is a mock DynamoDB Query request.

func (*MockDDBClient) Scan

func (client *MockDDBClient) Scan(input *dynamodb.ScanInput) (*dynamodb.ScanOutput, error)

Scan is a mock DynamoDB Scan request.

func (*MockDDBClient) UpdateItem

func (client *MockDDBClient) UpdateItem(input *dynamodb.UpdateItemInput) (*dynamodb.UpdateItemOutput, error)

UpdateItem is a mock method to update an item from a dynamodb table.

Jump to

Keyboard shortcuts

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