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
- type AWSCredentialKind
- type AccessKeyCredential
- type Client
- type IRSACredential
- type MockClient
- type MockClientGetCallerIdentityCall
- func (c *MockClientGetCallerIdentityCall) Do(f func(context.Context) (*sts.GetCallerIdentityOutput, error)) *MockClientGetCallerIdentityCall
- func (c *MockClientGetCallerIdentityCall) DoAndReturn(f func(context.Context) (*sts.GetCallerIdentityOutput, error)) *MockClientGetCallerIdentityCall
- func (c *MockClientGetCallerIdentityCall) Return(arg0 *sts.GetCallerIdentityOutput, arg1 error) *MockClientGetCallerIdentityCall
- type MockClientListRegionsCall
- func (c *MockClientListRegionsCall) Do(f func(context.Context) (*ec2.DescribeRegionsOutput, error)) *MockClientListRegionsCall
- func (c *MockClientListRegionsCall) DoAndReturn(f func(context.Context) (*ec2.DescribeRegionsOutput, error)) *MockClientListRegionsCall
- func (c *MockClientListRegionsCall) Return(arg0 *ec2.DescribeRegionsOutput, arg1 error) *MockClientListRegionsCall
- type MockClientMockRecorder
- type Provider
Constants ¶
const ( // ProviderDisplayName is the text used in display for AWS. ProviderDisplayName = "AWS" AWSCredentialKindAccessKey = "AccessKey" AWSCredentialKindIRSA = "IRSA" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSCredentialKind ¶ added in v0.37.0
type AWSCredentialKind string
AWSCredentialKind - AWS credential kinds supported.
type AccessKeyCredential ¶ added in v0.37.0
type Client ¶
type Client interface { // GetCallerIdentity gets information about the provided credentials. GetCallerIdentity(ctx context.Context) (*sts.GetCallerIdentityOutput, error) // ListRegions lists the AWS regions available (fetched from EC2.DescribeRegions API). ListRegions(ctx context.Context) (*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.
type IRSACredential ¶ added in v0.37.0
type IRSACredential struct { // RoleARN for AWS IRSA identity RoleARN string }
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) (*sts.GetCallerIdentityOutput, error)
GetCallerIdentity mocks base method.
func (*MockClient) ListRegions ¶
func (m *MockClient) ListRegions(arg0 context.Context) (*ec2.DescribeRegionsOutput, error)
ListRegions mocks base method.
type MockClientGetCallerIdentityCall ¶ added in v0.35.0
MockClientGetCallerIdentityCall wrap *gomock.Call
func (*MockClientGetCallerIdentityCall) Do ¶ added in v0.35.0
func (c *MockClientGetCallerIdentityCall) Do(f func(context.Context) (*sts.GetCallerIdentityOutput, error)) *MockClientGetCallerIdentityCall
Do rewrite *gomock.Call.Do
func (*MockClientGetCallerIdentityCall) DoAndReturn ¶ added in v0.35.0
func (c *MockClientGetCallerIdentityCall) DoAndReturn(f func(context.Context) (*sts.GetCallerIdentityOutput, error)) *MockClientGetCallerIdentityCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockClientGetCallerIdentityCall) Return ¶ added in v0.35.0
func (c *MockClientGetCallerIdentityCall) Return(arg0 *sts.GetCallerIdentityOutput, arg1 error) *MockClientGetCallerIdentityCall
Return rewrite *gomock.Call.Return
type MockClientListRegionsCall ¶ added in v0.35.0
MockClientListRegionsCall wrap *gomock.Call
func (*MockClientListRegionsCall) Do ¶ added in v0.35.0
func (c *MockClientListRegionsCall) Do(f func(context.Context) (*ec2.DescribeRegionsOutput, error)) *MockClientListRegionsCall
Do rewrite *gomock.Call.Do
func (*MockClientListRegionsCall) DoAndReturn ¶ added in v0.35.0
func (c *MockClientListRegionsCall) DoAndReturn(f func(context.Context) (*ec2.DescribeRegionsOutput, error)) *MockClientListRegionsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockClientListRegionsCall) Return ¶ added in v0.35.0
func (c *MockClientListRegionsCall) Return(arg0 *ec2.DescribeRegionsOutput, arg1 error) *MockClientListRegionsCall
Return rewrite *gomock.Call.Return
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 any) *MockClientGetCallerIdentityCall
GetCallerIdentity indicates an expected call of GetCallerIdentity.
func (*MockClientMockRecorder) ListRegions ¶
func (mr *MockClientMockRecorder) ListRegions(arg0 any) *MockClientListRegionsCall
ListRegions indicates an expected call of ListRegions.
type Provider ¶
type Provider struct { // Region is the AWS region to use. Region string // AccountID is the AWS account id. AccountID string // CredentialKind represents ucp credential kind for aws provider. CredentialKind AWSCredentialKind // AccessKey represents ucp credential kind for aws access key credentials. AccessKey *AccessKeyCredential // IRSA represents ucp credential kind for aws irsa credentials. IRSA *IRSACredential }
Provider specifies the properties required to configure AWS provider for cloud resources.