Documentation ¶
Index ¶
- func NewMockAPIError(code string, message string) smithy.APIError
- func NewStsV2Client(ctx context.Context, region, roleARN, sourceARN string) (*sts.Client, error)
- func WithStsHeadersMiddleware(headers map[string]string) func(*sts.Options)
- type EC2ClientV2
- type Ec2SdkV2
- type MockAPIError
- type MockedEC2ClientV2
- type MockedEc2SdkV2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockAPIError ¶
NewMockAPIError returns a new APIError
func NewStsV2Client ¶ added in v1.30.5
NewStsV2Client provides a new STS client.
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 ¶
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.