services

package
v1.30.6 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockAPIError

func NewMockAPIError(code string, message string) smithy.APIError

NewMockAPIError returns a new APIError

func NewStsV2Client added in v1.30.5

func NewStsV2Client(ctx context.Context, region, roleARN, sourceARN string) (*sts.Client, error)

NewStsV2Client provides a new STS client.

func WithStsHeadersMiddleware added in v1.30.5

func WithStsHeadersMiddleware(headers map[string]string) func(*sts.Options)

WithStsHeadersMiddleware provides middleware to set custom headers for STS calls

Types

type EC2ClientV2

type EC2ClientV2 interface {
	DescribeInstanceTopology(ctx context.Context, params *ec2.DescribeInstanceTopologyInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTopologyOutput, error)
}

EC2ClientV2 is an interface to allow it to be mocked.

type Ec2SdkV2

type Ec2SdkV2 interface {
	DescribeInstanceTopology(ctx context.Context, request *ec2.DescribeInstanceTopologyInput) ([]types.InstanceTopology, error)
}

Ec2SdkV2 is an implementation of the EC2 v2 interface, backed by aws-sdk-go-v2

func NewEc2SdkV2

func NewEc2SdkV2(ctx context.Context, region string, assumeRoleProvider *stscreds.AssumeRoleProvider) (Ec2SdkV2, error)

NewEc2SdkV2 is a constructor for Ec2SdkV2 that creates a default EC2 client.

type MockAPIError

type MockAPIError struct {
	// contains filtered or unexported fields
}

MockAPIError mocks smithy.APIError

func (*MockAPIError) ErrorCode

func (e *MockAPIError) ErrorCode() string

ErrorCode returns the error code

func (*MockAPIError) ErrorFault

func (e *MockAPIError) ErrorFault() smithy.ErrorFault

ErrorFault isn't really implemented.

func (*MockAPIError) ErrorMessage

func (e *MockAPIError) ErrorMessage() string

ErrorMessage returns the error message

type MockedEC2ClientV2

type MockedEC2ClientV2 struct {
	EC2ClientV2
	mock.Mock
}

MockedEC2ClientV2 mocks EC2ClientV2.

func (*MockedEC2ClientV2) DescribeInstanceTopology

func (m *MockedEC2ClientV2) DescribeInstanceTopology(ctx context.Context, params *ec2.DescribeInstanceTopologyInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTopologyOutput, error)

DescribeInstanceTopology mocks EC2ClientV2.DescribeInstanceTopology.

type MockedEc2SdkV2

type MockedEc2SdkV2 struct {
	Ec2SdkV2
	mock.Mock
}

MockedEc2SdkV2 is an implementation of the EC2 v2 interface, backed by aws-sdk-go-v2

func (*MockedEc2SdkV2) DescribeInstanceTopology

func (m *MockedEc2SdkV2) DescribeInstanceTopology(ctx context.Context, request *ec2.DescribeInstanceTopologyInput) ([]types.InstanceTopology, error)

DescribeInstanceTopology mocks EC2ClientV2.DescribeInstanceTopology.

Jump to

Keyboard shortcuts

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