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.
Package aws is a generated GoMock package.
Index ¶
- Constants
- func HandleAWSError(err error) (armrpc_rest.Response, error)
- func IsAWSResourceNotFoundError(err error) bool
- type AWSCloudControlClient
- type AWSCloudFormationClient
- type AWSMissingPropertyError
- type Clients
- type MockAWSCloudControlClient
- func (m *MockAWSCloudControlClient) CancelResourceRequest(arg0 context.Context, arg1 *cloudcontrol.CancelResourceRequestInput, ...) (*cloudcontrol.CancelResourceRequestOutput, error)
- func (m *MockAWSCloudControlClient) CreateResource(arg0 context.Context, arg1 *cloudcontrol.CreateResourceInput, ...) (*cloudcontrol.CreateResourceOutput, error)
- func (m *MockAWSCloudControlClient) DeleteResource(arg0 context.Context, arg1 *cloudcontrol.DeleteResourceInput, ...) (*cloudcontrol.DeleteResourceOutput, error)
- func (m *MockAWSCloudControlClient) EXPECT() *MockAWSCloudControlClientMockRecorder
- func (m *MockAWSCloudControlClient) GetResource(arg0 context.Context, arg1 *cloudcontrol.GetResourceInput, ...) (*cloudcontrol.GetResourceOutput, error)
- func (m *MockAWSCloudControlClient) GetResourceRequestStatus(arg0 context.Context, arg1 *cloudcontrol.GetResourceRequestStatusInput, ...) (*cloudcontrol.GetResourceRequestStatusOutput, error)
- func (m *MockAWSCloudControlClient) ListResourceRequests(arg0 context.Context, arg1 *cloudcontrol.ListResourceRequestsInput, ...) (*cloudcontrol.ListResourceRequestsOutput, error)
- func (m *MockAWSCloudControlClient) ListResources(arg0 context.Context, arg1 *cloudcontrol.ListResourcesInput, ...) (*cloudcontrol.ListResourcesOutput, error)
- func (m *MockAWSCloudControlClient) UpdateResource(arg0 context.Context, arg1 *cloudcontrol.UpdateResourceInput, ...) (*cloudcontrol.UpdateResourceOutput, error)
- type MockAWSCloudControlClientCancelResourceRequestCall
- func (c *MockAWSCloudControlClientCancelResourceRequestCall) Do(...) *MockAWSCloudControlClientCancelResourceRequestCall
- func (c *MockAWSCloudControlClientCancelResourceRequestCall) DoAndReturn(...) *MockAWSCloudControlClientCancelResourceRequestCall
- func (c *MockAWSCloudControlClientCancelResourceRequestCall) Return(arg0 *cloudcontrol.CancelResourceRequestOutput, arg1 error) *MockAWSCloudControlClientCancelResourceRequestCall
- type MockAWSCloudControlClientCreateResourceCall
- func (c *MockAWSCloudControlClientCreateResourceCall) Do(...) *MockAWSCloudControlClientCreateResourceCall
- func (c *MockAWSCloudControlClientCreateResourceCall) DoAndReturn(...) *MockAWSCloudControlClientCreateResourceCall
- func (c *MockAWSCloudControlClientCreateResourceCall) Return(arg0 *cloudcontrol.CreateResourceOutput, arg1 error) *MockAWSCloudControlClientCreateResourceCall
- type MockAWSCloudControlClientDeleteResourceCall
- func (c *MockAWSCloudControlClientDeleteResourceCall) Do(...) *MockAWSCloudControlClientDeleteResourceCall
- func (c *MockAWSCloudControlClientDeleteResourceCall) DoAndReturn(...) *MockAWSCloudControlClientDeleteResourceCall
- func (c *MockAWSCloudControlClientDeleteResourceCall) Return(arg0 *cloudcontrol.DeleteResourceOutput, arg1 error) *MockAWSCloudControlClientDeleteResourceCall
- type MockAWSCloudControlClientGetResourceCall
- func (c *MockAWSCloudControlClientGetResourceCall) Do(...) *MockAWSCloudControlClientGetResourceCall
- func (c *MockAWSCloudControlClientGetResourceCall) DoAndReturn(...) *MockAWSCloudControlClientGetResourceCall
- func (c *MockAWSCloudControlClientGetResourceCall) Return(arg0 *cloudcontrol.GetResourceOutput, arg1 error) *MockAWSCloudControlClientGetResourceCall
- type MockAWSCloudControlClientGetResourceRequestStatusCall
- func (c *MockAWSCloudControlClientGetResourceRequestStatusCall) Do(...) *MockAWSCloudControlClientGetResourceRequestStatusCall
- func (c *MockAWSCloudControlClientGetResourceRequestStatusCall) DoAndReturn(...) *MockAWSCloudControlClientGetResourceRequestStatusCall
- func (c *MockAWSCloudControlClientGetResourceRequestStatusCall) Return(arg0 *cloudcontrol.GetResourceRequestStatusOutput, arg1 error) *MockAWSCloudControlClientGetResourceRequestStatusCall
- type MockAWSCloudControlClientListResourceRequestsCall
- func (c *MockAWSCloudControlClientListResourceRequestsCall) Do(...) *MockAWSCloudControlClientListResourceRequestsCall
- func (c *MockAWSCloudControlClientListResourceRequestsCall) DoAndReturn(...) *MockAWSCloudControlClientListResourceRequestsCall
- func (c *MockAWSCloudControlClientListResourceRequestsCall) Return(arg0 *cloudcontrol.ListResourceRequestsOutput, arg1 error) *MockAWSCloudControlClientListResourceRequestsCall
- type MockAWSCloudControlClientListResourcesCall
- func (c *MockAWSCloudControlClientListResourcesCall) Do(...) *MockAWSCloudControlClientListResourcesCall
- func (c *MockAWSCloudControlClientListResourcesCall) DoAndReturn(...) *MockAWSCloudControlClientListResourcesCall
- func (c *MockAWSCloudControlClientListResourcesCall) Return(arg0 *cloudcontrol.ListResourcesOutput, arg1 error) *MockAWSCloudControlClientListResourcesCall
- type MockAWSCloudControlClientMockRecorder
- func (mr *MockAWSCloudControlClientMockRecorder) CancelResourceRequest(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientCancelResourceRequestCall
- func (mr *MockAWSCloudControlClientMockRecorder) CreateResource(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientCreateResourceCall
- func (mr *MockAWSCloudControlClientMockRecorder) DeleteResource(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientDeleteResourceCall
- func (mr *MockAWSCloudControlClientMockRecorder) GetResource(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientGetResourceCall
- func (mr *MockAWSCloudControlClientMockRecorder) GetResourceRequestStatus(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientGetResourceRequestStatusCall
- func (mr *MockAWSCloudControlClientMockRecorder) ListResourceRequests(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientListResourceRequestsCall
- func (mr *MockAWSCloudControlClientMockRecorder) ListResources(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientListResourcesCall
- func (mr *MockAWSCloudControlClientMockRecorder) UpdateResource(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientUpdateResourceCall
- type MockAWSCloudControlClientUpdateResourceCall
- func (c *MockAWSCloudControlClientUpdateResourceCall) Do(...) *MockAWSCloudControlClientUpdateResourceCall
- func (c *MockAWSCloudControlClientUpdateResourceCall) DoAndReturn(...) *MockAWSCloudControlClientUpdateResourceCall
- func (c *MockAWSCloudControlClientUpdateResourceCall) Return(arg0 *cloudcontrol.UpdateResourceOutput, arg1 error) *MockAWSCloudControlClientUpdateResourceCall
- type MockAWSCloudFormationClient
- type MockAWSCloudFormationClientDescribeTypeCall
- func (c *MockAWSCloudFormationClientDescribeTypeCall) Do(...) *MockAWSCloudFormationClientDescribeTypeCall
- func (c *MockAWSCloudFormationClientDescribeTypeCall) DoAndReturn(...) *MockAWSCloudFormationClientDescribeTypeCall
- func (c *MockAWSCloudFormationClientDescribeTypeCall) Return(arg0 *cloudformation.DescribeTypeOutput, arg1 error) *MockAWSCloudFormationClientDescribeTypeCall
- type MockAWSCloudFormationClientMockRecorder
- type UCPCredentialOptions
- type UCPCredentialProvider
Constants ¶
const ( // DefaultExpireDuration is the default access key expiry duration. DefaultExpireDuration = time.Minute * time.Duration(15) // CredentialKind is IRSA CredentialKindIRSA = "IRSA" // CredentialKind is AccessKey CredentialKindAccessKey = "AccessKey" // Token file path for IRSA TokenFilePath = "/var/run/secrets/eks.amazonaws.com/serviceaccount/token" )
Variables ¶
This section is empty.
Functions ¶
func HandleAWSError ¶
func HandleAWSError(err error) (armrpc_rest.Response, error)
HandleAWSError takes in an error and returns an ARMResponse and an error. It checks the error type and returns an appropriate response based on the error code and message. If the error is a client fault, it returns a BadRequestARMResponse, otherwise it returns an InternalServerErrorARMResponse.
func IsAWSResourceNotFoundError ¶
Checks if the given error is an AWS ResourceNotFoundException error. If so, it returns true, otherwise false.
Types ¶
type AWSCloudControlClient ¶
type AWSCloudControlClient interface { GetResource(ctx context.Context, params *cloudcontrol.GetResourceInput, optFns ...func(*cloudcontrol.Options)) (*cloudcontrol.GetResourceOutput, error) ListResources(ctx context.Context, params *cloudcontrol.ListResourcesInput, optFns ...func(*cloudcontrol.Options)) (*cloudcontrol.ListResourcesOutput, error) DeleteResource(ctx context.Context, params *cloudcontrol.DeleteResourceInput, optFns ...func(*cloudcontrol.Options)) (*cloudcontrol.DeleteResourceOutput, error) UpdateResource(ctx context.Context, params *cloudcontrol.UpdateResourceInput, optFns ...func(*cloudcontrol.Options)) (*cloudcontrol.UpdateResourceOutput, error) CreateResource(ctx context.Context, params *cloudcontrol.CreateResourceInput, optFns ...func(*cloudcontrol.Options)) (*cloudcontrol.CreateResourceOutput, error) GetResourceRequestStatus(ctx context.Context, params *cloudcontrol.GetResourceRequestStatusInput, optFns ...func(*cloudcontrol.Options)) (*cloudcontrol.GetResourceRequestStatusOutput, error) CancelResourceRequest(ctx context.Context, params *cloudcontrol.CancelResourceRequestInput, optFns ...func(*cloudcontrol.Options)) (*cloudcontrol.CancelResourceRequestOutput, error) ListResourceRequests(ctx context.Context, params *cloudcontrol.ListResourceRequestsInput, optFns ...func(*cloudcontrol.Options)) (*cloudcontrol.ListResourceRequestsOutput, error) }
Didn't see an interface for aws-sdk-go-v2, v1 had: https://pkg.go.dev/github.com/aws/aws-sdk-go/service/cloudcontrolapi/cloudcontrolapiiface This is most likely due to using json schemas to define types rather than crafting by hand. There are significantly less functions in v2, so a small mock.
type AWSCloudFormationClient ¶
type AWSCloudFormationClient interface {
DescribeType(ctx context.Context, params *cloudformation.DescribeTypeInput, optFns ...func(*cloudformation.Options)) (*cloudformation.DescribeTypeOutput, error)
}
type AWSMissingPropertyError ¶
type AWSMissingPropertyError struct {
PropertyName string
}
AWSMissingPropertyError is an error type to be returned when the call to UCP CreateWithPost is missing values for one of the expected primary identifier properties
func (*AWSMissingPropertyError) Error ¶
func (e *AWSMissingPropertyError) Error() string
Error returns a string containing the name of the missing property for an AWSMissingPropertyError.
func (*AWSMissingPropertyError) Is ¶
func (e *AWSMissingPropertyError) Is(target error) bool
Is checks if the target error is of type AWSMissingPropertyError and returns a boolean value indicating the result.
type Clients ¶
type Clients struct { // CloudControl is the AWS Cloud Control client. CloudControl AWSCloudControlClient // CloudFormation is the AWS Cloud Formation client. CloudFormation AWSCloudFormationClient }
Clients contains the AWS clients.
type MockAWSCloudControlClient ¶
type MockAWSCloudControlClient struct {
// contains filtered or unexported fields
}
MockAWSCloudControlClient is a mock of AWSCloudControlClient interface.
func NewMockAWSCloudControlClient ¶
func NewMockAWSCloudControlClient(ctrl *gomock.Controller) *MockAWSCloudControlClient
NewMockAWSCloudControlClient creates a new mock instance.
func (*MockAWSCloudControlClient) CancelResourceRequest ¶
func (m *MockAWSCloudControlClient) CancelResourceRequest(arg0 context.Context, arg1 *cloudcontrol.CancelResourceRequestInput, arg2 ...func(*cloudcontrol.Options)) (*cloudcontrol.CancelResourceRequestOutput, error)
CancelResourceRequest mocks base method.
func (*MockAWSCloudControlClient) CreateResource ¶
func (m *MockAWSCloudControlClient) CreateResource(arg0 context.Context, arg1 *cloudcontrol.CreateResourceInput, arg2 ...func(*cloudcontrol.Options)) (*cloudcontrol.CreateResourceOutput, error)
CreateResource mocks base method.
func (*MockAWSCloudControlClient) DeleteResource ¶
func (m *MockAWSCloudControlClient) DeleteResource(arg0 context.Context, arg1 *cloudcontrol.DeleteResourceInput, arg2 ...func(*cloudcontrol.Options)) (*cloudcontrol.DeleteResourceOutput, error)
DeleteResource mocks base method.
func (*MockAWSCloudControlClient) EXPECT ¶
func (m *MockAWSCloudControlClient) EXPECT() *MockAWSCloudControlClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAWSCloudControlClient) GetResource ¶
func (m *MockAWSCloudControlClient) GetResource(arg0 context.Context, arg1 *cloudcontrol.GetResourceInput, arg2 ...func(*cloudcontrol.Options)) (*cloudcontrol.GetResourceOutput, error)
GetResource mocks base method.
func (*MockAWSCloudControlClient) GetResourceRequestStatus ¶
func (m *MockAWSCloudControlClient) GetResourceRequestStatus(arg0 context.Context, arg1 *cloudcontrol.GetResourceRequestStatusInput, arg2 ...func(*cloudcontrol.Options)) (*cloudcontrol.GetResourceRequestStatusOutput, error)
GetResourceRequestStatus mocks base method.
func (*MockAWSCloudControlClient) ListResourceRequests ¶
func (m *MockAWSCloudControlClient) ListResourceRequests(arg0 context.Context, arg1 *cloudcontrol.ListResourceRequestsInput, arg2 ...func(*cloudcontrol.Options)) (*cloudcontrol.ListResourceRequestsOutput, error)
ListResourceRequests mocks base method.
func (*MockAWSCloudControlClient) ListResources ¶
func (m *MockAWSCloudControlClient) ListResources(arg0 context.Context, arg1 *cloudcontrol.ListResourcesInput, arg2 ...func(*cloudcontrol.Options)) (*cloudcontrol.ListResourcesOutput, error)
ListResources mocks base method.
func (*MockAWSCloudControlClient) UpdateResource ¶
func (m *MockAWSCloudControlClient) UpdateResource(arg0 context.Context, arg1 *cloudcontrol.UpdateResourceInput, arg2 ...func(*cloudcontrol.Options)) (*cloudcontrol.UpdateResourceOutput, error)
UpdateResource mocks base method.
type MockAWSCloudControlClientCancelResourceRequestCall ¶ added in v0.35.0
MockAWSCloudControlClientCancelResourceRequestCall wrap *gomock.Call
func (*MockAWSCloudControlClientCancelResourceRequestCall) Do ¶ added in v0.35.0
func (c *MockAWSCloudControlClientCancelResourceRequestCall) Do(f func(context.Context, *cloudcontrol.CancelResourceRequestInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.CancelResourceRequestOutput, error)) *MockAWSCloudControlClientCancelResourceRequestCall
Do rewrite *gomock.Call.Do
func (*MockAWSCloudControlClientCancelResourceRequestCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCloudControlClientCancelResourceRequestCall) DoAndReturn(f func(context.Context, *cloudcontrol.CancelResourceRequestInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.CancelResourceRequestOutput, error)) *MockAWSCloudControlClientCancelResourceRequestCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCloudControlClientCancelResourceRequestCall) Return ¶ added in v0.35.0
func (c *MockAWSCloudControlClientCancelResourceRequestCall) Return(arg0 *cloudcontrol.CancelResourceRequestOutput, arg1 error) *MockAWSCloudControlClientCancelResourceRequestCall
Return rewrite *gomock.Call.Return
type MockAWSCloudControlClientCreateResourceCall ¶ added in v0.35.0
MockAWSCloudControlClientCreateResourceCall wrap *gomock.Call
func (*MockAWSCloudControlClientCreateResourceCall) Do ¶ added in v0.35.0
func (c *MockAWSCloudControlClientCreateResourceCall) Do(f func(context.Context, *cloudcontrol.CreateResourceInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.CreateResourceOutput, error)) *MockAWSCloudControlClientCreateResourceCall
Do rewrite *gomock.Call.Do
func (*MockAWSCloudControlClientCreateResourceCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCloudControlClientCreateResourceCall) DoAndReturn(f func(context.Context, *cloudcontrol.CreateResourceInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.CreateResourceOutput, error)) *MockAWSCloudControlClientCreateResourceCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCloudControlClientCreateResourceCall) Return ¶ added in v0.35.0
func (c *MockAWSCloudControlClientCreateResourceCall) Return(arg0 *cloudcontrol.CreateResourceOutput, arg1 error) *MockAWSCloudControlClientCreateResourceCall
Return rewrite *gomock.Call.Return
type MockAWSCloudControlClientDeleteResourceCall ¶ added in v0.35.0
MockAWSCloudControlClientDeleteResourceCall wrap *gomock.Call
func (*MockAWSCloudControlClientDeleteResourceCall) Do ¶ added in v0.35.0
func (c *MockAWSCloudControlClientDeleteResourceCall) Do(f func(context.Context, *cloudcontrol.DeleteResourceInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.DeleteResourceOutput, error)) *MockAWSCloudControlClientDeleteResourceCall
Do rewrite *gomock.Call.Do
func (*MockAWSCloudControlClientDeleteResourceCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCloudControlClientDeleteResourceCall) DoAndReturn(f func(context.Context, *cloudcontrol.DeleteResourceInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.DeleteResourceOutput, error)) *MockAWSCloudControlClientDeleteResourceCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCloudControlClientDeleteResourceCall) Return ¶ added in v0.35.0
func (c *MockAWSCloudControlClientDeleteResourceCall) Return(arg0 *cloudcontrol.DeleteResourceOutput, arg1 error) *MockAWSCloudControlClientDeleteResourceCall
Return rewrite *gomock.Call.Return
type MockAWSCloudControlClientGetResourceCall ¶ added in v0.35.0
MockAWSCloudControlClientGetResourceCall wrap *gomock.Call
func (*MockAWSCloudControlClientGetResourceCall) Do ¶ added in v0.35.0
func (c *MockAWSCloudControlClientGetResourceCall) Do(f func(context.Context, *cloudcontrol.GetResourceInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.GetResourceOutput, error)) *MockAWSCloudControlClientGetResourceCall
Do rewrite *gomock.Call.Do
func (*MockAWSCloudControlClientGetResourceCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCloudControlClientGetResourceCall) DoAndReturn(f func(context.Context, *cloudcontrol.GetResourceInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.GetResourceOutput, error)) *MockAWSCloudControlClientGetResourceCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCloudControlClientGetResourceCall) Return ¶ added in v0.35.0
func (c *MockAWSCloudControlClientGetResourceCall) Return(arg0 *cloudcontrol.GetResourceOutput, arg1 error) *MockAWSCloudControlClientGetResourceCall
Return rewrite *gomock.Call.Return
type MockAWSCloudControlClientGetResourceRequestStatusCall ¶ added in v0.35.0
MockAWSCloudControlClientGetResourceRequestStatusCall wrap *gomock.Call
func (*MockAWSCloudControlClientGetResourceRequestStatusCall) Do ¶ added in v0.35.0
func (c *MockAWSCloudControlClientGetResourceRequestStatusCall) Do(f func(context.Context, *cloudcontrol.GetResourceRequestStatusInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.GetResourceRequestStatusOutput, error)) *MockAWSCloudControlClientGetResourceRequestStatusCall
Do rewrite *gomock.Call.Do
func (*MockAWSCloudControlClientGetResourceRequestStatusCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCloudControlClientGetResourceRequestStatusCall) DoAndReturn(f func(context.Context, *cloudcontrol.GetResourceRequestStatusInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.GetResourceRequestStatusOutput, error)) *MockAWSCloudControlClientGetResourceRequestStatusCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCloudControlClientGetResourceRequestStatusCall) Return ¶ added in v0.35.0
func (c *MockAWSCloudControlClientGetResourceRequestStatusCall) Return(arg0 *cloudcontrol.GetResourceRequestStatusOutput, arg1 error) *MockAWSCloudControlClientGetResourceRequestStatusCall
Return rewrite *gomock.Call.Return
type MockAWSCloudControlClientListResourceRequestsCall ¶ added in v0.35.0
MockAWSCloudControlClientListResourceRequestsCall wrap *gomock.Call
func (*MockAWSCloudControlClientListResourceRequestsCall) Do ¶ added in v0.35.0
func (c *MockAWSCloudControlClientListResourceRequestsCall) Do(f func(context.Context, *cloudcontrol.ListResourceRequestsInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.ListResourceRequestsOutput, error)) *MockAWSCloudControlClientListResourceRequestsCall
Do rewrite *gomock.Call.Do
func (*MockAWSCloudControlClientListResourceRequestsCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCloudControlClientListResourceRequestsCall) DoAndReturn(f func(context.Context, *cloudcontrol.ListResourceRequestsInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.ListResourceRequestsOutput, error)) *MockAWSCloudControlClientListResourceRequestsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCloudControlClientListResourceRequestsCall) Return ¶ added in v0.35.0
func (c *MockAWSCloudControlClientListResourceRequestsCall) Return(arg0 *cloudcontrol.ListResourceRequestsOutput, arg1 error) *MockAWSCloudControlClientListResourceRequestsCall
Return rewrite *gomock.Call.Return
type MockAWSCloudControlClientListResourcesCall ¶ added in v0.35.0
MockAWSCloudControlClientListResourcesCall wrap *gomock.Call
func (*MockAWSCloudControlClientListResourcesCall) Do ¶ added in v0.35.0
func (c *MockAWSCloudControlClientListResourcesCall) Do(f func(context.Context, *cloudcontrol.ListResourcesInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.ListResourcesOutput, error)) *MockAWSCloudControlClientListResourcesCall
Do rewrite *gomock.Call.Do
func (*MockAWSCloudControlClientListResourcesCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCloudControlClientListResourcesCall) DoAndReturn(f func(context.Context, *cloudcontrol.ListResourcesInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.ListResourcesOutput, error)) *MockAWSCloudControlClientListResourcesCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCloudControlClientListResourcesCall) Return ¶ added in v0.35.0
func (c *MockAWSCloudControlClientListResourcesCall) Return(arg0 *cloudcontrol.ListResourcesOutput, arg1 error) *MockAWSCloudControlClientListResourcesCall
Return rewrite *gomock.Call.Return
type MockAWSCloudControlClientMockRecorder ¶
type MockAWSCloudControlClientMockRecorder struct {
// contains filtered or unexported fields
}
MockAWSCloudControlClientMockRecorder is the mock recorder for MockAWSCloudControlClient.
func (*MockAWSCloudControlClientMockRecorder) CancelResourceRequest ¶
func (mr *MockAWSCloudControlClientMockRecorder) CancelResourceRequest(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientCancelResourceRequestCall
CancelResourceRequest indicates an expected call of CancelResourceRequest.
func (*MockAWSCloudControlClientMockRecorder) CreateResource ¶
func (mr *MockAWSCloudControlClientMockRecorder) CreateResource(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientCreateResourceCall
CreateResource indicates an expected call of CreateResource.
func (*MockAWSCloudControlClientMockRecorder) DeleteResource ¶
func (mr *MockAWSCloudControlClientMockRecorder) DeleteResource(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientDeleteResourceCall
DeleteResource indicates an expected call of DeleteResource.
func (*MockAWSCloudControlClientMockRecorder) GetResource ¶
func (mr *MockAWSCloudControlClientMockRecorder) GetResource(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientGetResourceCall
GetResource indicates an expected call of GetResource.
func (*MockAWSCloudControlClientMockRecorder) GetResourceRequestStatus ¶
func (mr *MockAWSCloudControlClientMockRecorder) GetResourceRequestStatus(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientGetResourceRequestStatusCall
GetResourceRequestStatus indicates an expected call of GetResourceRequestStatus.
func (*MockAWSCloudControlClientMockRecorder) ListResourceRequests ¶
func (mr *MockAWSCloudControlClientMockRecorder) ListResourceRequests(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientListResourceRequestsCall
ListResourceRequests indicates an expected call of ListResourceRequests.
func (*MockAWSCloudControlClientMockRecorder) ListResources ¶
func (mr *MockAWSCloudControlClientMockRecorder) ListResources(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientListResourcesCall
ListResources indicates an expected call of ListResources.
func (*MockAWSCloudControlClientMockRecorder) UpdateResource ¶
func (mr *MockAWSCloudControlClientMockRecorder) UpdateResource(arg0, arg1 any, arg2 ...any) *MockAWSCloudControlClientUpdateResourceCall
UpdateResource indicates an expected call of UpdateResource.
type MockAWSCloudControlClientUpdateResourceCall ¶ added in v0.35.0
MockAWSCloudControlClientUpdateResourceCall wrap *gomock.Call
func (*MockAWSCloudControlClientUpdateResourceCall) Do ¶ added in v0.35.0
func (c *MockAWSCloudControlClientUpdateResourceCall) Do(f func(context.Context, *cloudcontrol.UpdateResourceInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.UpdateResourceOutput, error)) *MockAWSCloudControlClientUpdateResourceCall
Do rewrite *gomock.Call.Do
func (*MockAWSCloudControlClientUpdateResourceCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCloudControlClientUpdateResourceCall) DoAndReturn(f func(context.Context, *cloudcontrol.UpdateResourceInput, ...func(*cloudcontrol.Options)) (*cloudcontrol.UpdateResourceOutput, error)) *MockAWSCloudControlClientUpdateResourceCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCloudControlClientUpdateResourceCall) Return ¶ added in v0.35.0
func (c *MockAWSCloudControlClientUpdateResourceCall) Return(arg0 *cloudcontrol.UpdateResourceOutput, arg1 error) *MockAWSCloudControlClientUpdateResourceCall
Return rewrite *gomock.Call.Return
type MockAWSCloudFormationClient ¶
type MockAWSCloudFormationClient struct {
// contains filtered or unexported fields
}
MockAWSCloudFormationClient is a mock of AWSCloudFormationClient interface.
func NewMockAWSCloudFormationClient ¶
func NewMockAWSCloudFormationClient(ctrl *gomock.Controller) *MockAWSCloudFormationClient
NewMockAWSCloudFormationClient creates a new mock instance.
func (*MockAWSCloudFormationClient) DescribeType ¶
func (m *MockAWSCloudFormationClient) DescribeType(arg0 context.Context, arg1 *cloudformation.DescribeTypeInput, arg2 ...func(*cloudformation.Options)) (*cloudformation.DescribeTypeOutput, error)
DescribeType mocks base method.
func (*MockAWSCloudFormationClient) EXPECT ¶
func (m *MockAWSCloudFormationClient) EXPECT() *MockAWSCloudFormationClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockAWSCloudFormationClientDescribeTypeCall ¶ added in v0.35.0
MockAWSCloudFormationClientDescribeTypeCall wrap *gomock.Call
func (*MockAWSCloudFormationClientDescribeTypeCall) Do ¶ added in v0.35.0
func (c *MockAWSCloudFormationClientDescribeTypeCall) Do(f func(context.Context, *cloudformation.DescribeTypeInput, ...func(*cloudformation.Options)) (*cloudformation.DescribeTypeOutput, error)) *MockAWSCloudFormationClientDescribeTypeCall
Do rewrite *gomock.Call.Do
func (*MockAWSCloudFormationClientDescribeTypeCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCloudFormationClientDescribeTypeCall) DoAndReturn(f func(context.Context, *cloudformation.DescribeTypeInput, ...func(*cloudformation.Options)) (*cloudformation.DescribeTypeOutput, error)) *MockAWSCloudFormationClientDescribeTypeCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCloudFormationClientDescribeTypeCall) Return ¶ added in v0.35.0
func (c *MockAWSCloudFormationClientDescribeTypeCall) Return(arg0 *cloudformation.DescribeTypeOutput, arg1 error) *MockAWSCloudFormationClientDescribeTypeCall
Return rewrite *gomock.Call.Return
type MockAWSCloudFormationClientMockRecorder ¶
type MockAWSCloudFormationClientMockRecorder struct {
// contains filtered or unexported fields
}
MockAWSCloudFormationClientMockRecorder is the mock recorder for MockAWSCloudFormationClient.
func (*MockAWSCloudFormationClientMockRecorder) DescribeType ¶
func (mr *MockAWSCloudFormationClientMockRecorder) DescribeType(arg0, arg1 any, arg2 ...any) *MockAWSCloudFormationClientDescribeTypeCall
DescribeType indicates an expected call of DescribeType.
type UCPCredentialOptions ¶
type UCPCredentialOptions struct { // Provider is an UCP credential provider. Provider sdk_cred.CredentialProvider[sdk_cred.AWSCredential] // Duration is the duration for the secret keys. Duration time.Duration }
UCPCredentialOptions is a configuration for UCPCredentialProvider.
type UCPCredentialProvider ¶
type UCPCredentialProvider struct {
// contains filtered or unexported fields
}
UCPCredentialProvider is the implementation of aws.CredentialsProvider to retrieve credentials for AWS SDK via UCP credentials.
func NewUCPCredentialProvider ¶
func NewUCPCredentialProvider(provider sdk_cred.CredentialProvider[sdk_cred.AWSCredential], expireDuration time.Duration) *UCPCredentialProvider
NewUCPCredentialProvider creates UCPCredentialProvider provider to fetch Secret Access key using UCP credential APIs.
func (*UCPCredentialProvider) Retrieve ¶
func (c *UCPCredentialProvider) Retrieve(ctx context.Context) (aws.Credentials, error)
Retrieve fetches credentials from an external provider, checks if they are valid, logs the AccessKeyID, and returns the credentials with an expiration time set. If the credentials are invalid, an error is returned.