aws

package
v0.26.4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2023 The Radius Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package aws is a generated GoMock package.

Index

Constants

View Source
const (
	// ProviderDisplayName is the text used in display for AWS.
	ProviderDisplayName = "AWS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetCallerIdentity gets information about the provided credentials.
	GetCallerIdentity(ctx context.Context, region string, accessKeyID string, secretAccessKey string) (*sts.GetCallerIdentityOutput, error)
	// ListRegions lists the AWS regions available (fetched from EC2.DescribeRegions API).
	ListRegions(ctx context.Context, region string, accessKeyID string, secretAccessKey string) (*ec2.DescribeRegionsOutput, error)
}

Client is an interface that abstracts `rad init`'s interactions with AWS. This is for testing purposes. This is only exported because mockgen requires it.

func NewClient

func NewClient() Client

NewClient returns a new Client.

type MockClient

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

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) GetCallerIdentity

func (m *MockClient) GetCallerIdentity(arg0 context.Context, arg1, arg2, arg3 string) (*sts.GetCallerIdentityOutput, error)

GetCallerIdentity mocks base method.

func (*MockClient) ListRegions

func (m *MockClient) ListRegions(arg0 context.Context, arg1, arg2, arg3 string) (*ec2.DescribeRegionsOutput, error)

ListRegions mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) GetCallerIdentity

func (mr *MockClientMockRecorder) GetCallerIdentity(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

GetCallerIdentity indicates an expected call of GetCallerIdentity.

func (*MockClientMockRecorder) ListRegions

func (mr *MockClientMockRecorder) ListRegions(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

ListRegions indicates an expected call of ListRegions.

type Provider

type Provider struct {
	// AccessKeyID is the access key id for the AWS account.
	AccessKeyID string

	// SecretAccessKey is the secret access key for the AWS account.
	SecretAccessKey string

	// Region is the AWS region to use.
	Region string

	// AccountID is the AWS account id.
	AccountID string
}

Provider specifies the properties required to configure AWS provider for cloud resources.

Jump to

Keyboard shortcuts

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