mocks

package
v0.0.0-...-013d6bb Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GetDoFunc fetches the mock client's `Do` func
	GetDoFunc func(req *http.Request) (*http.Response, error)
)
View Source
var MockDynamoDbCalls = MockDynamoDbInputs{}

Functions

func NewMockClock

func NewMockClock(setTimeTo string) mockClock

func ResetMockDynamoDbCalls

func ResetMockDynamoDbCalls()

Types

type MockClient

type MockClient struct {
	DoFunc func(req *http.Request) (*http.Response, error)
}

MockClient is the mock client

func (*MockClient) Do

func (m *MockClient) Do(req *http.Request) (*http.Response, error)

Do is the mock client's `Do` func

type MockDynamoDB

type MockDynamoDB struct {
	DeleteItemOutput *dynamodb.DeleteItemOutput
	GetItemOutput    *dynamodb.GetItemOutput
	PutItemOutput    *dynamodb.PutItemOutput
}

func (*MockDynamoDB) DeleteItemWithContext

func (m *MockDynamoDB) DeleteItemWithContext(ctx aws.Context, input *dynamodb.DeleteItemInput, opts ...request.Option) (*dynamodb.DeleteItemOutput, error)

func (*MockDynamoDB) GetItemWithContext

func (m *MockDynamoDB) GetItemWithContext(ctx aws.Context, input *dynamodb.GetItemInput, opts ...request.Option) (*dynamodb.GetItemOutput, error)

func (*MockDynamoDB) PutItemWithContext

func (m *MockDynamoDB) PutItemWithContext(ctx aws.Context, input *dynamodb.PutItemInput, opts ...request.Option) (*dynamodb.PutItemOutput, error)

type MockDynamoDbInputs

type MockDynamoDbInputs struct {
	DeleteItemWithContext *dynamodb.DeleteItemInput
	GetItemWithContext    *dynamodb.GetItemInput
	PutItemWithContext    *dynamodb.PutItemInput
}

Jump to

Keyboard shortcuts

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