mocks

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 17 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSS3NotFoundError

func AWSS3NotFoundError() error

func MakeS3Body

func MakeS3Body(ret string) io.ReadCloser

Types

type DeleteObjectResponse

type DeleteObjectResponse struct {
	Resp  *s3.DeleteObjectOutput
	Error error
}

type GetBucketTaggingResponse

type GetBucketTaggingResponse struct {
	Resp  *s3.GetBucketTaggingOutput
	Error error
}

type GetObjectResponse

type GetObjectResponse struct {
	Resp  *s3.GetObjectOutput
	Body  string
	Error error
}

S3Client

type MockClients

type MockClients struct {
	S3       *MockS3Client
	Lambda   *MockLambdaClient
	SFN      *MockSFNClient
	DynamoDB *MockDynamoDBClient
}

func MockAwsClients

func MockAwsClients() *MockClients

func (*MockClients) DynamoDBClient

func (awsc *MockClients) DynamoDBClient(*string, *string, *string) aws.DynamoDBAPI

func (*MockClients) LambdaClient

func (awsc *MockClients) LambdaClient(*string, *string, *string) aws.LambdaAPI

func (*MockClients) S3Client

func (awsc *MockClients) S3Client(*string, *string, *string) aws.S3API

func (*MockClients) SFNClient

func (awsc *MockClients) SFNClient(*string, *string, *string) aws.SFNAPI

type MockDynamoDBClient

type MockDynamoDBClient struct {
	dynamodbiface.DynamoDBAPI

	PutItemInputs    []*dynamodb.PutItemInput
	DeleteItemInputs []*dynamodb.DeleteItemInput
}

func (*MockDynamoDBClient) DeleteItem

func (*MockDynamoDBClient) PutItem

type MockLambdaClient

type MockLambdaClient struct {
	lambdaiface.LambdaAPI
	UpdateFunctionCodeResp  *lambda.FunctionConfiguration
	UpdateFunctionCodeError error
	ListTagsResp            *lambda.ListTagsOutput
}

func (*MockLambdaClient) ListTags

func (*MockLambdaClient) UpdateFunctionCode

type MockS3Client

type MockS3Client struct {
	s3iface.S3API

	GetObjectResp map[string]*GetObjectResponse

	PutObjectResp map[string]*PutObjectResponse

	DeleteObjectResp map[string]*DeleteObjectResponse

	GetBucketTaggingResp map[string]*GetBucketTaggingResponse
}

func (*MockS3Client) AddGetObject

func (m *MockS3Client) AddGetObject(key string, body string, err error)

func (*MockS3Client) AddPutObject

func (m *MockS3Client) AddPutObject(key string, err error)

func (*MockS3Client) DeleteObject

func (m *MockS3Client) DeleteObject(in *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)

func (*MockS3Client) GetBucketTagging

func (m *MockS3Client) GetBucketTagging(in *s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error)

func (*MockS3Client) GetObject

func (m *MockS3Client) GetObject(in *s3.GetObjectInput) (*s3.GetObjectOutput, error)

func (*MockS3Client) ListObjects

func (m *MockS3Client) ListObjects(in *s3.ListObjectsInput) (*s3.ListObjectsOutput, error)

func (*MockS3Client) PutObject

func (m *MockS3Client) PutObject(in *s3.PutObjectInput) (*s3.PutObjectOutput, error)

func (*MockS3Client) SetBucketTags

func (m *MockS3Client) SetBucketTags(bucket string, tags map[string]string, err error)

type MockSFNClient

type MockSFNClient struct {
	sfniface.SFNAPI
	UpdateStateMachineResp   *sfn.UpdateStateMachineOutput
	UpdateStateMachineError  error
	StartExecutionResp       *sfn.StartExecutionOutput
	DescribeExecutionResp    *sfn.DescribeExecutionOutput
	GetExecutionHistoryResp  *sfn.GetExecutionHistoryOutput
	DescribeStateMachineResp *sfn.DescribeStateMachineOutput
	ListExecutionsResp       *sfn.ListExecutionsOutput
}

func (*MockSFNClient) DescribeExecution

func (*MockSFNClient) DescribeStateMachine

func (*MockSFNClient) GetExecutionHistory

func (*MockSFNClient) ListExecutions

func (*MockSFNClient) StartExecution

func (*MockSFNClient) UpdateStateMachine

type PutObjectResponse

type PutObjectResponse struct {
	Resp  *s3.PutObjectOutput
	Error error
}

Jump to

Keyboard shortcuts

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