Documentation ¶
Index ¶
- func SetClient(c DynamoDBinterface)
- type DynamoDBTotals
- type DynamoDBinterface
- type DynamoDBinterfaceMock
- func (mock *DynamoDBinterfaceMock) DescribeTable(ctx context.Context, params *dynamodb.DescribeTableInput, ...) (*dynamodb.DescribeTableOutput, error)
- func (mock *DynamoDBinterfaceMock) DescribeTableCalls() []struct{ ... }
- func (mock *DynamoDBinterfaceMock) ListTables(ctx context.Context, params *dynamodb.ListTablesInput, ...) (*dynamodb.ListTablesOutput, error)
- func (mock *DynamoDBinterfaceMock) ListTablesCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetClient ¶
func SetClient(c DynamoDBinterface)
Types ¶
type DynamoDBTotals ¶
func List ¶
func List(region string, verbose bool) DynamoDBTotals
type DynamoDBinterface ¶
type DynamoDBinterface interface { ListTables(ctx context.Context, params *dynamodb.ListTablesInput, optFns ...func(*dynamodb.Options)) (*dynamodb.ListTablesOutput, error) DescribeTable(ctx context.Context, params *dynamodb.DescribeTableInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DescribeTableOutput, error) }
var Client DynamoDBinterface
type DynamoDBinterfaceMock ¶
type DynamoDBinterfaceMock struct { // DescribeTableFunc mocks the DescribeTable method. DescribeTableFunc func(ctx context.Context, params *dynamodb.DescribeTableInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DescribeTableOutput, error) // ListTablesFunc mocks the ListTables method. ListTablesFunc func(ctx context.Context, params *dynamodb.ListTablesInput, optFns ...func(*dynamodb.Options)) (*dynamodb.ListTablesOutput, error) // contains filtered or unexported fields }
DynamoDBinterfaceMock is a mock implementation of DynamoDBinterface.
func TestSomethingThatUsesDynamoDBinterface(t *testing.T) { // make and configure a mocked DynamoDBinterface mockedDynamoDBinterface := &DynamoDBinterfaceMock{ DescribeTableFunc: func(ctx context.Context, params *dynamodb.DescribeTableInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DescribeTableOutput, error) { panic("mock out the DescribeTable method") }, ListTablesFunc: func(ctx context.Context, params *dynamodb.ListTablesInput, optFns ...func(*dynamodb.Options)) (*dynamodb.ListTablesOutput, error) { panic("mock out the ListTables method") }, } // use mockedDynamoDBinterface in code that requires DynamoDBinterface // and then make assertions. }
func (*DynamoDBinterfaceMock) DescribeTable ¶
func (mock *DynamoDBinterfaceMock) DescribeTable(ctx context.Context, params *dynamodb.DescribeTableInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DescribeTableOutput, error)
DescribeTable calls DescribeTableFunc.
func (*DynamoDBinterfaceMock) DescribeTableCalls ¶
func (mock *DynamoDBinterfaceMock) DescribeTableCalls() []struct { Ctx context.Context Params *dynamodb.DescribeTableInput OptFns []func(*dynamodb.Options) }
DescribeTableCalls gets all the calls that were made to DescribeTable. Check the length with:
len(mockedDynamoDBinterface.DescribeTableCalls())
func (*DynamoDBinterfaceMock) ListTables ¶
func (mock *DynamoDBinterfaceMock) ListTables(ctx context.Context, params *dynamodb.ListTablesInput, optFns ...func(*dynamodb.Options)) (*dynamodb.ListTablesOutput, error)
ListTables calls ListTablesFunc.
func (*DynamoDBinterfaceMock) ListTablesCalls ¶
func (mock *DynamoDBinterfaceMock) ListTablesCalls() []struct { Ctx context.Context Params *dynamodb.ListTablesInput OptFns []func(*dynamodb.Options) }
ListTablesCalls gets all the calls that were made to ListTables. Check the length with:
len(mockedDynamoDBinterface.ListTablesCalls())
Click to show internal directories.
Click to hide internal directories.