Documentation ¶
Overview ¶
Package credential is a generated GoMock package.
Package credential is a generated GoMock package.
Package credential is a generated GoMock package.
Index ¶
- Constants
- type AWSAccessKeyCredentialProperties
- type AWSCredentialManagementClient
- func (cpm *AWSCredentialManagementClient) Delete(ctx context.Context, name string) (bool, error)
- func (cpm *AWSCredentialManagementClient) Get(ctx context.Context, credentialName string) (ProviderCredentialConfiguration, error)
- func (cpm *AWSCredentialManagementClient) List(ctx context.Context) ([]CloudProviderStatus, error)
- func (cpm *AWSCredentialManagementClient) Put(ctx context.Context, credential ucp.AwsCredentialResource) error
- type AWSCredentialManagementClientInterface
- type AWSCredentialProperties
- type AWSIRSACredentialProperties
- type AzureCredentialManagementClient
- func (cpm *AzureCredentialManagementClient) Delete(ctx context.Context, name string) (bool, error)
- func (cpm *AzureCredentialManagementClient) Get(ctx context.Context, credentialName string) (ProviderCredentialConfiguration, error)
- func (cpm *AzureCredentialManagementClient) List(ctx context.Context) ([]CloudProviderStatus, error)
- func (cpm *AzureCredentialManagementClient) Put(ctx context.Context, credential ucp.AzureCredentialResource) error
- type AzureCredentialManagementClientInterface
- type AzureCredentialProperties
- type AzureServicePrincipalCredentialProperties
- type AzureWorkloadIdentityCredentialProperties
- type CloudProviderStatus
- type CredentialManagementClient
- type ErrUnsupportedCloudProvider
- type MockAWSCredentialManagementClientInterface
- func (m *MockAWSCredentialManagementClientInterface) Delete(arg0 context.Context, arg1 string) (bool, error)
- func (m *MockAWSCredentialManagementClientInterface) EXPECT() *MockAWSCredentialManagementClientInterfaceMockRecorder
- func (m *MockAWSCredentialManagementClientInterface) Get(arg0 context.Context, arg1 string) (ProviderCredentialConfiguration, error)
- func (m *MockAWSCredentialManagementClientInterface) List(arg0 context.Context) ([]CloudProviderStatus, error)
- func (m *MockAWSCredentialManagementClientInterface) Put(arg0 context.Context, arg1 v20231001preview.AwsCredentialResource) error
- type MockAWSCredentialManagementClientInterfaceDeleteCall
- func (c *MockAWSCredentialManagementClientInterfaceDeleteCall) Do(f func(context.Context, string) (bool, error)) *MockAWSCredentialManagementClientInterfaceDeleteCall
- func (c *MockAWSCredentialManagementClientInterfaceDeleteCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockAWSCredentialManagementClientInterfaceDeleteCall
- func (c *MockAWSCredentialManagementClientInterfaceDeleteCall) Return(arg0 bool, arg1 error) *MockAWSCredentialManagementClientInterfaceDeleteCall
- type MockAWSCredentialManagementClientInterfaceGetCall
- func (c *MockAWSCredentialManagementClientInterfaceGetCall) Do(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockAWSCredentialManagementClientInterfaceGetCall
- func (c *MockAWSCredentialManagementClientInterfaceGetCall) DoAndReturn(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockAWSCredentialManagementClientInterfaceGetCall
- func (c *MockAWSCredentialManagementClientInterfaceGetCall) Return(arg0 ProviderCredentialConfiguration, arg1 error) *MockAWSCredentialManagementClientInterfaceGetCall
- type MockAWSCredentialManagementClientInterfaceListCall
- func (c *MockAWSCredentialManagementClientInterfaceListCall) Do(f func(context.Context) ([]CloudProviderStatus, error)) *MockAWSCredentialManagementClientInterfaceListCall
- func (c *MockAWSCredentialManagementClientInterfaceListCall) DoAndReturn(f func(context.Context) ([]CloudProviderStatus, error)) *MockAWSCredentialManagementClientInterfaceListCall
- func (c *MockAWSCredentialManagementClientInterfaceListCall) Return(arg0 []CloudProviderStatus, arg1 error) *MockAWSCredentialManagementClientInterfaceListCall
- type MockAWSCredentialManagementClientInterfaceMockRecorder
- func (mr *MockAWSCredentialManagementClientInterfaceMockRecorder) Delete(arg0, arg1 any) *MockAWSCredentialManagementClientInterfaceDeleteCall
- func (mr *MockAWSCredentialManagementClientInterfaceMockRecorder) Get(arg0, arg1 any) *MockAWSCredentialManagementClientInterfaceGetCall
- func (mr *MockAWSCredentialManagementClientInterfaceMockRecorder) List(arg0 any) *MockAWSCredentialManagementClientInterfaceListCall
- func (mr *MockAWSCredentialManagementClientInterfaceMockRecorder) Put(arg0, arg1 any) *MockAWSCredentialManagementClientInterfacePutCall
- type MockAWSCredentialManagementClientInterfacePutCall
- func (c *MockAWSCredentialManagementClientInterfacePutCall) Do(f func(context.Context, v20231001preview.AwsCredentialResource) error) *MockAWSCredentialManagementClientInterfacePutCall
- func (c *MockAWSCredentialManagementClientInterfacePutCall) DoAndReturn(f func(context.Context, v20231001preview.AwsCredentialResource) error) *MockAWSCredentialManagementClientInterfacePutCall
- func (c *MockAWSCredentialManagementClientInterfacePutCall) Return(arg0 error) *MockAWSCredentialManagementClientInterfacePutCall
- type MockAzureCredentialManagementClientInterface
- func (m *MockAzureCredentialManagementClientInterface) Delete(arg0 context.Context, arg1 string) (bool, error)
- func (m *MockAzureCredentialManagementClientInterface) EXPECT() *MockAzureCredentialManagementClientInterfaceMockRecorder
- func (m *MockAzureCredentialManagementClientInterface) Get(arg0 context.Context, arg1 string) (ProviderCredentialConfiguration, error)
- func (m *MockAzureCredentialManagementClientInterface) List(arg0 context.Context) ([]CloudProviderStatus, error)
- func (m *MockAzureCredentialManagementClientInterface) Put(arg0 context.Context, arg1 v20231001preview.AzureCredentialResource) error
- type MockAzureCredentialManagementClientInterfaceDeleteCall
- func (c *MockAzureCredentialManagementClientInterfaceDeleteCall) Do(f func(context.Context, string) (bool, error)) *MockAzureCredentialManagementClientInterfaceDeleteCall
- func (c *MockAzureCredentialManagementClientInterfaceDeleteCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockAzureCredentialManagementClientInterfaceDeleteCall
- func (c *MockAzureCredentialManagementClientInterfaceDeleteCall) Return(arg0 bool, arg1 error) *MockAzureCredentialManagementClientInterfaceDeleteCall
- type MockAzureCredentialManagementClientInterfaceGetCall
- func (c *MockAzureCredentialManagementClientInterfaceGetCall) Do(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockAzureCredentialManagementClientInterfaceGetCall
- func (c *MockAzureCredentialManagementClientInterfaceGetCall) DoAndReturn(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockAzureCredentialManagementClientInterfaceGetCall
- func (c *MockAzureCredentialManagementClientInterfaceGetCall) Return(arg0 ProviderCredentialConfiguration, arg1 error) *MockAzureCredentialManagementClientInterfaceGetCall
- type MockAzureCredentialManagementClientInterfaceListCall
- func (c *MockAzureCredentialManagementClientInterfaceListCall) Do(f func(context.Context) ([]CloudProviderStatus, error)) *MockAzureCredentialManagementClientInterfaceListCall
- func (c *MockAzureCredentialManagementClientInterfaceListCall) DoAndReturn(f func(context.Context) ([]CloudProviderStatus, error)) *MockAzureCredentialManagementClientInterfaceListCall
- func (c *MockAzureCredentialManagementClientInterfaceListCall) Return(arg0 []CloudProviderStatus, arg1 error) *MockAzureCredentialManagementClientInterfaceListCall
- type MockAzureCredentialManagementClientInterfaceMockRecorder
- func (mr *MockAzureCredentialManagementClientInterfaceMockRecorder) Delete(arg0, arg1 any) *MockAzureCredentialManagementClientInterfaceDeleteCall
- func (mr *MockAzureCredentialManagementClientInterfaceMockRecorder) Get(arg0, arg1 any) *MockAzureCredentialManagementClientInterfaceGetCall
- func (mr *MockAzureCredentialManagementClientInterfaceMockRecorder) List(arg0 any) *MockAzureCredentialManagementClientInterfaceListCall
- func (mr *MockAzureCredentialManagementClientInterfaceMockRecorder) Put(arg0, arg1 any) *MockAzureCredentialManagementClientInterfacePutCall
- type MockAzureCredentialManagementClientInterfacePutCall
- func (c *MockAzureCredentialManagementClientInterfacePutCall) Do(f func(context.Context, v20231001preview.AzureCredentialResource) error) *MockAzureCredentialManagementClientInterfacePutCall
- func (c *MockAzureCredentialManagementClientInterfacePutCall) DoAndReturn(f func(context.Context, v20231001preview.AzureCredentialResource) error) *MockAzureCredentialManagementClientInterfacePutCall
- func (c *MockAzureCredentialManagementClientInterfacePutCall) Return(arg0 error) *MockAzureCredentialManagementClientInterfacePutCall
- type MockCredentialManagementClient
- func (m *MockCredentialManagementClient) Delete(arg0 context.Context, arg1 string) (bool, error)
- func (m *MockCredentialManagementClient) EXPECT() *MockCredentialManagementClientMockRecorder
- func (m *MockCredentialManagementClient) Get(arg0 context.Context, arg1 string) (ProviderCredentialConfiguration, error)
- func (m *MockCredentialManagementClient) List(arg0 context.Context) ([]CloudProviderStatus, error)
- func (m *MockCredentialManagementClient) PutAWS(arg0 context.Context, arg1 v20231001preview.AwsCredentialResource) error
- func (m *MockCredentialManagementClient) PutAzure(arg0 context.Context, arg1 v20231001preview.AzureCredentialResource) error
- type MockCredentialManagementClientDeleteCall
- func (c *MockCredentialManagementClientDeleteCall) Do(f func(context.Context, string) (bool, error)) *MockCredentialManagementClientDeleteCall
- func (c *MockCredentialManagementClientDeleteCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockCredentialManagementClientDeleteCall
- func (c *MockCredentialManagementClientDeleteCall) Return(arg0 bool, arg1 error) *MockCredentialManagementClientDeleteCall
- type MockCredentialManagementClientGetCall
- func (c *MockCredentialManagementClientGetCall) Do(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockCredentialManagementClientGetCall
- func (c *MockCredentialManagementClientGetCall) DoAndReturn(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockCredentialManagementClientGetCall
- func (c *MockCredentialManagementClientGetCall) Return(arg0 ProviderCredentialConfiguration, arg1 error) *MockCredentialManagementClientGetCall
- type MockCredentialManagementClientListCall
- func (c *MockCredentialManagementClientListCall) Do(f func(context.Context) ([]CloudProviderStatus, error)) *MockCredentialManagementClientListCall
- func (c *MockCredentialManagementClientListCall) DoAndReturn(f func(context.Context) ([]CloudProviderStatus, error)) *MockCredentialManagementClientListCall
- func (c *MockCredentialManagementClientListCall) Return(arg0 []CloudProviderStatus, arg1 error) *MockCredentialManagementClientListCall
- type MockCredentialManagementClientMockRecorder
- func (mr *MockCredentialManagementClientMockRecorder) Delete(arg0, arg1 any) *MockCredentialManagementClientDeleteCall
- func (mr *MockCredentialManagementClientMockRecorder) Get(arg0, arg1 any) *MockCredentialManagementClientGetCall
- func (mr *MockCredentialManagementClientMockRecorder) List(arg0 any) *MockCredentialManagementClientListCall
- func (mr *MockCredentialManagementClientMockRecorder) PutAWS(arg0, arg1 any) *MockCredentialManagementClientPutAWSCall
- func (mr *MockCredentialManagementClientMockRecorder) PutAzure(arg0, arg1 any) *MockCredentialManagementClientPutAzureCall
- type MockCredentialManagementClientPutAWSCall
- func (c *MockCredentialManagementClientPutAWSCall) Do(f func(context.Context, v20231001preview.AwsCredentialResource) error) *MockCredentialManagementClientPutAWSCall
- func (c *MockCredentialManagementClientPutAWSCall) DoAndReturn(f func(context.Context, v20231001preview.AwsCredentialResource) error) *MockCredentialManagementClientPutAWSCall
- func (c *MockCredentialManagementClientPutAWSCall) Return(arg0 error) *MockCredentialManagementClientPutAWSCall
- type MockCredentialManagementClientPutAzureCall
- func (c *MockCredentialManagementClientPutAzureCall) Do(f func(context.Context, v20231001preview.AzureCredentialResource) error) *MockCredentialManagementClientPutAzureCall
- func (c *MockCredentialManagementClientPutAzureCall) DoAndReturn(f func(context.Context, v20231001preview.AzureCredentialResource) error) *MockCredentialManagementClientPutAzureCall
- func (c *MockCredentialManagementClientPutAzureCall) Return(arg0 error) *MockCredentialManagementClientPutAzureCall
- type ProviderCredentialConfiguration
- type UCPCredentialManagementClient
- func (cpm *UCPCredentialManagementClient) Delete(ctx context.Context, providerName string) (bool, error)
- func (cpm *UCPCredentialManagementClient) Get(ctx context.Context, providerName string) (ProviderCredentialConfiguration, error)
- func (cpm *UCPCredentialManagementClient) List(ctx context.Context) ([]CloudProviderStatus, error)
- func (cpm *UCPCredentialManagementClient) PutAWS(ctx context.Context, credential ucp.AwsCredentialResource) error
- func (cpm *UCPCredentialManagementClient) PutAzure(ctx context.Context, credential ucp.AzureCredentialResource) error
Constants ¶
const ( AWSCredential = "aws" AWSPlaneName = "aws" ValidInfoTemplate = "enter valid info for %s" )
const ( AzurePlaneType = "azure" AWSPlaneType = "aws" AzureCredential = "azure" AzurePlaneName = "azurecloud" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSAccessKeyCredentialProperties ¶ added in v0.37.0
type AWSCredentialManagementClient ¶
type AWSCredentialManagementClient struct {
AWSCredentialClient ucp.AwsCredentialsClient
}
AWSCredentialManagementClient is used to interface with cloud provider configuration and credentials.
func (*AWSCredentialManagementClient) Delete ¶
Delete checks if a credential for the provider plane is registered and if so, deletes it; if not, it returns true without an error. If an error occurs, it returns false and the error.
func (*AWSCredentialManagementClient) Get ¶
func (cpm *AWSCredentialManagementClient) Get(ctx context.Context, credentialName string) (ProviderCredentialConfiguration, error)
"Get" retrieves the credentials for the specified cloud provider from the backend and returns a ProviderCredentialConfiguration object containing the credentials or an error if the credentials could not be retrieved.
func (*AWSCredentialManagementClient) List ¶
func (cpm *AWSCredentialManagementClient) List(ctx context.Context) ([]CloudProviderStatus, error)
List retrieves a list of AWS credentials and returns a slice of CloudProviderStatus objects containing the name and enabled status of each credential. If an error occurs, an error is returned.
func (*AWSCredentialManagementClient) Put ¶
func (cpm *AWSCredentialManagementClient) Put(ctx context.Context, credential ucp.AwsCredentialResource) error
"Put" checks if the credential type is "AWSCredential" and if so, creates or updates the credential in the AWS plane, otherwise it returns an error.
type AWSCredentialManagementClientInterface ¶
type AWSCredentialManagementClientInterface interface { // Get gets the credential registered with the given ucp provider plane. Get(ctx context.Context, name string) (ProviderCredentialConfiguration, error) // List lists the credentials registered with all ucp provider planes. List(ctx context.Context) ([]CloudProviderStatus, error) // Put registers an AWS credential with the respective ucp provider plane. Put(ctx context.Context, credential_config ucp.AwsCredentialResource) error // Delete unregisters credential from the given ucp provider plane. Delete(ctx context.Context, name string) (bool, error) }
AWSCredentialManagementClient is used to interface with cloud provider configuration and credentials.
type AWSCredentialProperties ¶
type AWSCredentialProperties struct { // Kind is the credential kind (AccessKey or IRSA) Kind *string // AccessKey is the properties for an AWS access key credential AccessKey *AWSAccessKeyCredentialProperties // IRSA is the properties for an AWS IRSA credential IRSA *AWSIRSACredentialProperties }
type AWSIRSACredentialProperties ¶ added in v0.37.0
type AzureCredentialManagementClient ¶
type AzureCredentialManagementClient struct {
AzureCredentialClient ucp.AzureCredentialsClient
}
AzureCredentialManagementClient is used to interface with cloud provider configuration and credentials.
func (*AzureCredentialManagementClient) Delete ¶
"Delete" checks if the credential for the provider plane is registered and returns true if not found, otherwise returns false and an error if one occurs.
func (*AzureCredentialManagementClient) Get ¶
func (cpm *AzureCredentialManagementClient) Get(ctx context.Context, credentialName string) (ProviderCredentialConfiguration, error)
"Get" retrieves an AzureCredentialResource from the AzureCredentialClient and returns a ProviderCredentialConfiguration object, or an error if the retrieval fails.
func (*AzureCredentialManagementClient) List ¶
func (cpm *AzureCredentialManagementClient) List(ctx context.Context) ([]CloudProviderStatus, error)
List retrieves a list of Azure credentials and returns a slice of CloudProviderStatus objects containing the name and enabled status of each credential.
func (*AzureCredentialManagementClient) Put ¶
func (cpm *AzureCredentialManagementClient) Put(ctx context.Context, credential ucp.AzureCredentialResource) error
"Put" checks if the credential type is supported by the AzureCredentialManagementClient, and if so, creates or updates the credential in Azure, otherwise it returns an error.
type AzureCredentialManagementClientInterface ¶
type AzureCredentialManagementClientInterface interface { // Get gets the credential registered with the given ucp provider plane. Get(ctx context.Context, name string) (ProviderCredentialConfiguration, error) // List lists the credentials registered with all ucp provider planes. List(ctx context.Context) ([]CloudProviderStatus, error) // Put registers an AWS credential with the respective ucp provider plane. Put(ctx context.Context, credential_config ucp.AzureCredentialResource) error // Delete unregisters credential from the given ucp provider plane. Delete(ctx context.Context, name string) (bool, error) }
AzureCredentialManagementClient is used to interface with cloud provider configuration and credentials.
type AzureCredentialProperties ¶
type AzureCredentialProperties struct { // Kind is the credential kind (ServicePrincipal or WorkloadIdentity) Kind *string // ServicePrincipal is the properties for an Azure service principal credential ServicePrincipal *AzureServicePrincipalCredentialProperties // WorkloadIdentity is the properties for an Azure workload identity credential WorkloadIdentity *AzureWorkloadIdentityCredentialProperties }
AzureCredentialProperties is the representation of an Azure credential. It contains the kind of the credential (ServicePrincipal or WorkloadIdentity) and the properties for each kind.
type AzureServicePrincipalCredentialProperties ¶ added in v0.35.0
type AzureServicePrincipalCredentialProperties struct { // clientId for the Azure credential ClientID *string // kind for the Azure credential (must be ServicePrincipal) Kind *string // tenantId for the Azure credential TenantID *string }
AzureServicePrincipalCredentialProperties is the representation of an Azure service principal credential.
type AzureWorkloadIdentityCredentialProperties ¶ added in v0.35.0
type AzureWorkloadIdentityCredentialProperties struct { // clientId for the Azure credential ClientID *string // kind for the Azure credential (must be WorkloadIdentity) Kind *string // tenantId for the Azure credential TenantID *string }
AzureWorkloadIdentityCredentialProperties is the representation of an Azure workload identity credential.
type CloudProviderStatus ¶
type CloudProviderStatus struct { // Name is the name/kind of the provider. For right now this only supports Azure and AWS. Name string // Enabled is the enabled/disabled status of the provider. Enabled bool }
CloudProviderStatus is the representation of a cloud provider configuration.
type CredentialManagementClient ¶
type CredentialManagementClient interface { // Get gets the credential registered with the given ucp provider plane. Get(ctx context.Context, providerName string) (ProviderCredentialConfiguration, error) // List lists the credentials registered with all ucp provider planes. List(ctx context.Context) ([]CloudProviderStatus, error) // PutAWS registers an AWS credential with the respective ucp provider plane. PutAWS(ctx context.Context, credential_config ucp.AwsCredentialResource) error // PutAzure registers an Azure credential with the respective ucp provider plane. PutAzure(ctx context.Context, credential_config ucp.AzureCredentialResource) error // Delete unregisters credential from the given ucp provider plane. Delete(ctx context.Context, providerName string) (bool, error) }
CredentialManagementClient is used to interface with cloud provider configuration and credentials.
type ErrUnsupportedCloudProvider ¶
type ErrUnsupportedCloudProvider struct {
Message string
}
ErrUnsupportedCloudProvider represents error when the cloud provider is not supported by radius.
func (*ErrUnsupportedCloudProvider) Error ¶
func (fe *ErrUnsupportedCloudProvider) Error() string
ErrUnsupportedCloudProvider's Error() function returns a string indicating an unsupported cloud provider when called.
func (*ErrUnsupportedCloudProvider) Is ¶
func (fe *ErrUnsupportedCloudProvider) Is(target error) bool
Is() checks if the target error is of type ErrUnsupportedCloudProvider and returns a boolean value indicating the result.
type MockAWSCredentialManagementClientInterface ¶
type MockAWSCredentialManagementClientInterface struct {
// contains filtered or unexported fields
}
MockAWSCredentialManagementClientInterface is a mock of AWSCredentialManagementClientInterface interface.
func NewMockAWSCredentialManagementClientInterface ¶
func NewMockAWSCredentialManagementClientInterface(ctrl *gomock.Controller) *MockAWSCredentialManagementClientInterface
NewMockAWSCredentialManagementClientInterface creates a new mock instance.
func (*MockAWSCredentialManagementClientInterface) Delete ¶
func (m *MockAWSCredentialManagementClientInterface) Delete(arg0 context.Context, arg1 string) (bool, error)
Delete mocks base method.
func (*MockAWSCredentialManagementClientInterface) EXPECT ¶
func (m *MockAWSCredentialManagementClientInterface) EXPECT() *MockAWSCredentialManagementClientInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAWSCredentialManagementClientInterface) Get ¶
func (m *MockAWSCredentialManagementClientInterface) Get(arg0 context.Context, arg1 string) (ProviderCredentialConfiguration, error)
Get mocks base method.
func (*MockAWSCredentialManagementClientInterface) List ¶
func (m *MockAWSCredentialManagementClientInterface) List(arg0 context.Context) ([]CloudProviderStatus, error)
List mocks base method.
func (*MockAWSCredentialManagementClientInterface) Put ¶
func (m *MockAWSCredentialManagementClientInterface) Put(arg0 context.Context, arg1 v20231001preview.AwsCredentialResource) error
Put mocks base method.
type MockAWSCredentialManagementClientInterfaceDeleteCall ¶ added in v0.35.0
MockAWSCredentialManagementClientInterfaceDeleteCall wrap *gomock.Call
func (*MockAWSCredentialManagementClientInterfaceDeleteCall) Do ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfaceDeleteCall) Do(f func(context.Context, string) (bool, error)) *MockAWSCredentialManagementClientInterfaceDeleteCall
Do rewrite *gomock.Call.Do
func (*MockAWSCredentialManagementClientInterfaceDeleteCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfaceDeleteCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockAWSCredentialManagementClientInterfaceDeleteCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCredentialManagementClientInterfaceDeleteCall) Return ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfaceDeleteCall) Return(arg0 bool, arg1 error) *MockAWSCredentialManagementClientInterfaceDeleteCall
Return rewrite *gomock.Call.Return
type MockAWSCredentialManagementClientInterfaceGetCall ¶ added in v0.35.0
MockAWSCredentialManagementClientInterfaceGetCall wrap *gomock.Call
func (*MockAWSCredentialManagementClientInterfaceGetCall) Do ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfaceGetCall) Do(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockAWSCredentialManagementClientInterfaceGetCall
Do rewrite *gomock.Call.Do
func (*MockAWSCredentialManagementClientInterfaceGetCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfaceGetCall) DoAndReturn(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockAWSCredentialManagementClientInterfaceGetCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCredentialManagementClientInterfaceGetCall) Return ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfaceGetCall) Return(arg0 ProviderCredentialConfiguration, arg1 error) *MockAWSCredentialManagementClientInterfaceGetCall
Return rewrite *gomock.Call.Return
type MockAWSCredentialManagementClientInterfaceListCall ¶ added in v0.35.0
MockAWSCredentialManagementClientInterfaceListCall wrap *gomock.Call
func (*MockAWSCredentialManagementClientInterfaceListCall) Do ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfaceListCall) Do(f func(context.Context) ([]CloudProviderStatus, error)) *MockAWSCredentialManagementClientInterfaceListCall
Do rewrite *gomock.Call.Do
func (*MockAWSCredentialManagementClientInterfaceListCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfaceListCall) DoAndReturn(f func(context.Context) ([]CloudProviderStatus, error)) *MockAWSCredentialManagementClientInterfaceListCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCredentialManagementClientInterfaceListCall) Return ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfaceListCall) Return(arg0 []CloudProviderStatus, arg1 error) *MockAWSCredentialManagementClientInterfaceListCall
Return rewrite *gomock.Call.Return
type MockAWSCredentialManagementClientInterfaceMockRecorder ¶
type MockAWSCredentialManagementClientInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockAWSCredentialManagementClientInterfaceMockRecorder is the mock recorder for MockAWSCredentialManagementClientInterface.
func (*MockAWSCredentialManagementClientInterfaceMockRecorder) Delete ¶
func (mr *MockAWSCredentialManagementClientInterfaceMockRecorder) Delete(arg0, arg1 any) *MockAWSCredentialManagementClientInterfaceDeleteCall
Delete indicates an expected call of Delete.
func (*MockAWSCredentialManagementClientInterfaceMockRecorder) Get ¶
func (mr *MockAWSCredentialManagementClientInterfaceMockRecorder) Get(arg0, arg1 any) *MockAWSCredentialManagementClientInterfaceGetCall
Get indicates an expected call of Get.
func (*MockAWSCredentialManagementClientInterfaceMockRecorder) List ¶
func (mr *MockAWSCredentialManagementClientInterfaceMockRecorder) List(arg0 any) *MockAWSCredentialManagementClientInterfaceListCall
List indicates an expected call of List.
func (*MockAWSCredentialManagementClientInterfaceMockRecorder) Put ¶
func (mr *MockAWSCredentialManagementClientInterfaceMockRecorder) Put(arg0, arg1 any) *MockAWSCredentialManagementClientInterfacePutCall
Put indicates an expected call of Put.
type MockAWSCredentialManagementClientInterfacePutCall ¶ added in v0.35.0
MockAWSCredentialManagementClientInterfacePutCall wrap *gomock.Call
func (*MockAWSCredentialManagementClientInterfacePutCall) Do ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfacePutCall) Do(f func(context.Context, v20231001preview.AwsCredentialResource) error) *MockAWSCredentialManagementClientInterfacePutCall
Do rewrite *gomock.Call.Do
func (*MockAWSCredentialManagementClientInterfacePutCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfacePutCall) DoAndReturn(f func(context.Context, v20231001preview.AwsCredentialResource) error) *MockAWSCredentialManagementClientInterfacePutCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAWSCredentialManagementClientInterfacePutCall) Return ¶ added in v0.35.0
func (c *MockAWSCredentialManagementClientInterfacePutCall) Return(arg0 error) *MockAWSCredentialManagementClientInterfacePutCall
Return rewrite *gomock.Call.Return
type MockAzureCredentialManagementClientInterface ¶
type MockAzureCredentialManagementClientInterface struct {
// contains filtered or unexported fields
}
MockAzureCredentialManagementClientInterface is a mock of AzureCredentialManagementClientInterface interface.
func NewMockAzureCredentialManagementClientInterface ¶
func NewMockAzureCredentialManagementClientInterface(ctrl *gomock.Controller) *MockAzureCredentialManagementClientInterface
NewMockAzureCredentialManagementClientInterface creates a new mock instance.
func (*MockAzureCredentialManagementClientInterface) Delete ¶
func (m *MockAzureCredentialManagementClientInterface) Delete(arg0 context.Context, arg1 string) (bool, error)
Delete mocks base method.
func (*MockAzureCredentialManagementClientInterface) EXPECT ¶
func (m *MockAzureCredentialManagementClientInterface) EXPECT() *MockAzureCredentialManagementClientInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAzureCredentialManagementClientInterface) Get ¶
func (m *MockAzureCredentialManagementClientInterface) Get(arg0 context.Context, arg1 string) (ProviderCredentialConfiguration, error)
Get mocks base method.
func (*MockAzureCredentialManagementClientInterface) List ¶
func (m *MockAzureCredentialManagementClientInterface) List(arg0 context.Context) ([]CloudProviderStatus, error)
List mocks base method.
func (*MockAzureCredentialManagementClientInterface) Put ¶
func (m *MockAzureCredentialManagementClientInterface) Put(arg0 context.Context, arg1 v20231001preview.AzureCredentialResource) error
Put mocks base method.
type MockAzureCredentialManagementClientInterfaceDeleteCall ¶ added in v0.35.0
MockAzureCredentialManagementClientInterfaceDeleteCall wrap *gomock.Call
func (*MockAzureCredentialManagementClientInterfaceDeleteCall) Do ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfaceDeleteCall) Do(f func(context.Context, string) (bool, error)) *MockAzureCredentialManagementClientInterfaceDeleteCall
Do rewrite *gomock.Call.Do
func (*MockAzureCredentialManagementClientInterfaceDeleteCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfaceDeleteCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockAzureCredentialManagementClientInterfaceDeleteCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAzureCredentialManagementClientInterfaceDeleteCall) Return ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfaceDeleteCall) Return(arg0 bool, arg1 error) *MockAzureCredentialManagementClientInterfaceDeleteCall
Return rewrite *gomock.Call.Return
type MockAzureCredentialManagementClientInterfaceGetCall ¶ added in v0.35.0
MockAzureCredentialManagementClientInterfaceGetCall wrap *gomock.Call
func (*MockAzureCredentialManagementClientInterfaceGetCall) Do ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfaceGetCall) Do(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockAzureCredentialManagementClientInterfaceGetCall
Do rewrite *gomock.Call.Do
func (*MockAzureCredentialManagementClientInterfaceGetCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfaceGetCall) DoAndReturn(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockAzureCredentialManagementClientInterfaceGetCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAzureCredentialManagementClientInterfaceGetCall) Return ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfaceGetCall) Return(arg0 ProviderCredentialConfiguration, arg1 error) *MockAzureCredentialManagementClientInterfaceGetCall
Return rewrite *gomock.Call.Return
type MockAzureCredentialManagementClientInterfaceListCall ¶ added in v0.35.0
MockAzureCredentialManagementClientInterfaceListCall wrap *gomock.Call
func (*MockAzureCredentialManagementClientInterfaceListCall) Do ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfaceListCall) Do(f func(context.Context) ([]CloudProviderStatus, error)) *MockAzureCredentialManagementClientInterfaceListCall
Do rewrite *gomock.Call.Do
func (*MockAzureCredentialManagementClientInterfaceListCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfaceListCall) DoAndReturn(f func(context.Context) ([]CloudProviderStatus, error)) *MockAzureCredentialManagementClientInterfaceListCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAzureCredentialManagementClientInterfaceListCall) Return ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfaceListCall) Return(arg0 []CloudProviderStatus, arg1 error) *MockAzureCredentialManagementClientInterfaceListCall
Return rewrite *gomock.Call.Return
type MockAzureCredentialManagementClientInterfaceMockRecorder ¶
type MockAzureCredentialManagementClientInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockAzureCredentialManagementClientInterfaceMockRecorder is the mock recorder for MockAzureCredentialManagementClientInterface.
func (*MockAzureCredentialManagementClientInterfaceMockRecorder) Delete ¶
func (mr *MockAzureCredentialManagementClientInterfaceMockRecorder) Delete(arg0, arg1 any) *MockAzureCredentialManagementClientInterfaceDeleteCall
Delete indicates an expected call of Delete.
func (*MockAzureCredentialManagementClientInterfaceMockRecorder) Get ¶
func (mr *MockAzureCredentialManagementClientInterfaceMockRecorder) Get(arg0, arg1 any) *MockAzureCredentialManagementClientInterfaceGetCall
Get indicates an expected call of Get.
func (*MockAzureCredentialManagementClientInterfaceMockRecorder) List ¶
func (mr *MockAzureCredentialManagementClientInterfaceMockRecorder) List(arg0 any) *MockAzureCredentialManagementClientInterfaceListCall
List indicates an expected call of List.
func (*MockAzureCredentialManagementClientInterfaceMockRecorder) Put ¶
func (mr *MockAzureCredentialManagementClientInterfaceMockRecorder) Put(arg0, arg1 any) *MockAzureCredentialManagementClientInterfacePutCall
Put indicates an expected call of Put.
type MockAzureCredentialManagementClientInterfacePutCall ¶ added in v0.35.0
MockAzureCredentialManagementClientInterfacePutCall wrap *gomock.Call
func (*MockAzureCredentialManagementClientInterfacePutCall) Do ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfacePutCall) Do(f func(context.Context, v20231001preview.AzureCredentialResource) error) *MockAzureCredentialManagementClientInterfacePutCall
Do rewrite *gomock.Call.Do
func (*MockAzureCredentialManagementClientInterfacePutCall) DoAndReturn ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfacePutCall) DoAndReturn(f func(context.Context, v20231001preview.AzureCredentialResource) error) *MockAzureCredentialManagementClientInterfacePutCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAzureCredentialManagementClientInterfacePutCall) Return ¶ added in v0.35.0
func (c *MockAzureCredentialManagementClientInterfacePutCall) Return(arg0 error) *MockAzureCredentialManagementClientInterfacePutCall
Return rewrite *gomock.Call.Return
type MockCredentialManagementClient ¶
type MockCredentialManagementClient struct {
// contains filtered or unexported fields
}
MockCredentialManagementClient is a mock of CredentialManagementClient interface.
func NewMockCredentialManagementClient ¶
func NewMockCredentialManagementClient(ctrl *gomock.Controller) *MockCredentialManagementClient
NewMockCredentialManagementClient creates a new mock instance.
func (*MockCredentialManagementClient) EXPECT ¶
func (m *MockCredentialManagementClient) EXPECT() *MockCredentialManagementClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCredentialManagementClient) Get ¶
func (m *MockCredentialManagementClient) Get(arg0 context.Context, arg1 string) (ProviderCredentialConfiguration, error)
Get mocks base method.
func (*MockCredentialManagementClient) List ¶
func (m *MockCredentialManagementClient) List(arg0 context.Context) ([]CloudProviderStatus, error)
List mocks base method.
func (*MockCredentialManagementClient) PutAWS ¶
func (m *MockCredentialManagementClient) PutAWS(arg0 context.Context, arg1 v20231001preview.AwsCredentialResource) error
PutAWS mocks base method.
func (*MockCredentialManagementClient) PutAzure ¶
func (m *MockCredentialManagementClient) PutAzure(arg0 context.Context, arg1 v20231001preview.AzureCredentialResource) error
PutAzure mocks base method.
type MockCredentialManagementClientDeleteCall ¶ added in v0.35.0
MockCredentialManagementClientDeleteCall wrap *gomock.Call
func (*MockCredentialManagementClientDeleteCall) Do ¶ added in v0.35.0
func (c *MockCredentialManagementClientDeleteCall) Do(f func(context.Context, string) (bool, error)) *MockCredentialManagementClientDeleteCall
Do rewrite *gomock.Call.Do
func (*MockCredentialManagementClientDeleteCall) DoAndReturn ¶ added in v0.35.0
func (c *MockCredentialManagementClientDeleteCall) DoAndReturn(f func(context.Context, string) (bool, error)) *MockCredentialManagementClientDeleteCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockCredentialManagementClientDeleteCall) Return ¶ added in v0.35.0
func (c *MockCredentialManagementClientDeleteCall) Return(arg0 bool, arg1 error) *MockCredentialManagementClientDeleteCall
Return rewrite *gomock.Call.Return
type MockCredentialManagementClientGetCall ¶ added in v0.35.0
MockCredentialManagementClientGetCall wrap *gomock.Call
func (*MockCredentialManagementClientGetCall) Do ¶ added in v0.35.0
func (c *MockCredentialManagementClientGetCall) Do(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockCredentialManagementClientGetCall
Do rewrite *gomock.Call.Do
func (*MockCredentialManagementClientGetCall) DoAndReturn ¶ added in v0.35.0
func (c *MockCredentialManagementClientGetCall) DoAndReturn(f func(context.Context, string) (ProviderCredentialConfiguration, error)) *MockCredentialManagementClientGetCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockCredentialManagementClientGetCall) Return ¶ added in v0.35.0
func (c *MockCredentialManagementClientGetCall) Return(arg0 ProviderCredentialConfiguration, arg1 error) *MockCredentialManagementClientGetCall
Return rewrite *gomock.Call.Return
type MockCredentialManagementClientListCall ¶ added in v0.35.0
MockCredentialManagementClientListCall wrap *gomock.Call
func (*MockCredentialManagementClientListCall) Do ¶ added in v0.35.0
func (c *MockCredentialManagementClientListCall) Do(f func(context.Context) ([]CloudProviderStatus, error)) *MockCredentialManagementClientListCall
Do rewrite *gomock.Call.Do
func (*MockCredentialManagementClientListCall) DoAndReturn ¶ added in v0.35.0
func (c *MockCredentialManagementClientListCall) DoAndReturn(f func(context.Context) ([]CloudProviderStatus, error)) *MockCredentialManagementClientListCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockCredentialManagementClientListCall) Return ¶ added in v0.35.0
func (c *MockCredentialManagementClientListCall) Return(arg0 []CloudProviderStatus, arg1 error) *MockCredentialManagementClientListCall
Return rewrite *gomock.Call.Return
type MockCredentialManagementClientMockRecorder ¶
type MockCredentialManagementClientMockRecorder struct {
// contains filtered or unexported fields
}
MockCredentialManagementClientMockRecorder is the mock recorder for MockCredentialManagementClient.
func (*MockCredentialManagementClientMockRecorder) Delete ¶
func (mr *MockCredentialManagementClientMockRecorder) Delete(arg0, arg1 any) *MockCredentialManagementClientDeleteCall
Delete indicates an expected call of Delete.
func (*MockCredentialManagementClientMockRecorder) Get ¶
func (mr *MockCredentialManagementClientMockRecorder) Get(arg0, arg1 any) *MockCredentialManagementClientGetCall
Get indicates an expected call of Get.
func (*MockCredentialManagementClientMockRecorder) List ¶
func (mr *MockCredentialManagementClientMockRecorder) List(arg0 any) *MockCredentialManagementClientListCall
List indicates an expected call of List.
func (*MockCredentialManagementClientMockRecorder) PutAWS ¶
func (mr *MockCredentialManagementClientMockRecorder) PutAWS(arg0, arg1 any) *MockCredentialManagementClientPutAWSCall
PutAWS indicates an expected call of PutAWS.
func (*MockCredentialManagementClientMockRecorder) PutAzure ¶
func (mr *MockCredentialManagementClientMockRecorder) PutAzure(arg0, arg1 any) *MockCredentialManagementClientPutAzureCall
PutAzure indicates an expected call of PutAzure.
type MockCredentialManagementClientPutAWSCall ¶ added in v0.35.0
MockCredentialManagementClientPutAWSCall wrap *gomock.Call
func (*MockCredentialManagementClientPutAWSCall) Do ¶ added in v0.35.0
func (c *MockCredentialManagementClientPutAWSCall) Do(f func(context.Context, v20231001preview.AwsCredentialResource) error) *MockCredentialManagementClientPutAWSCall
Do rewrite *gomock.Call.Do
func (*MockCredentialManagementClientPutAWSCall) DoAndReturn ¶ added in v0.35.0
func (c *MockCredentialManagementClientPutAWSCall) DoAndReturn(f func(context.Context, v20231001preview.AwsCredentialResource) error) *MockCredentialManagementClientPutAWSCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockCredentialManagementClientPutAWSCall) Return ¶ added in v0.35.0
func (c *MockCredentialManagementClientPutAWSCall) Return(arg0 error) *MockCredentialManagementClientPutAWSCall
Return rewrite *gomock.Call.Return
type MockCredentialManagementClientPutAzureCall ¶ added in v0.35.0
MockCredentialManagementClientPutAzureCall wrap *gomock.Call
func (*MockCredentialManagementClientPutAzureCall) Do ¶ added in v0.35.0
func (c *MockCredentialManagementClientPutAzureCall) Do(f func(context.Context, v20231001preview.AzureCredentialResource) error) *MockCredentialManagementClientPutAzureCall
Do rewrite *gomock.Call.Do
func (*MockCredentialManagementClientPutAzureCall) DoAndReturn ¶ added in v0.35.0
func (c *MockCredentialManagementClientPutAzureCall) DoAndReturn(f func(context.Context, v20231001preview.AzureCredentialResource) error) *MockCredentialManagementClientPutAzureCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockCredentialManagementClientPutAzureCall) Return ¶ added in v0.35.0
func (c *MockCredentialManagementClientPutAzureCall) Return(arg0 error) *MockCredentialManagementClientPutAzureCall
Return rewrite *gomock.Call.Return
type ProviderCredentialConfiguration ¶
type ProviderCredentialConfiguration struct { CloudProviderStatus // AzureCredentials is used to set the credentials on Puts. It is NOT returned on Get/List. AzureCredentials *AzureCredentialProperties // AWSCredentials is used to set the credentials on Puts. It is NOT returned on Get/List. AWSCredentials *AWSCredentialProperties }
type UCPCredentialManagementClient ¶
type UCPCredentialManagementClient struct { AzClient AzureCredentialManagementClientInterface AWSClient AWSCredentialManagementClientInterface }
UCPCredentialManagementClient implements operations to manage credentials on ucp.
func (*UCPCredentialManagementClient) Delete ¶
func (cpm *UCPCredentialManagementClient) Delete(ctx context.Context, providerName string) (bool, error)
Delete() checks the provider name and calls the appropriate client's Delete function to delete the default secret name. It returns a boolean and an error if the provider name is invalid.
func (*UCPCredentialManagementClient) Get ¶
func (cpm *UCPCredentialManagementClient) Get(ctx context.Context, providerName string) (ProviderCredentialConfiguration, error)
Get retrieves the credential configuration for the specified cloud provider from the backend, or returns an error if the credential is not found or an error occurs. If the credential is not found, an empty credential configuration with the cloud provider's status set to disabled is returned.
func (*UCPCredentialManagementClient) List ¶
func (cpm *UCPCredentialManagementClient) List(ctx context.Context) ([]CloudProviderStatus, error)
List() lists the credentials from both Azure and AWS and returns a slice of CloudProviderStatus. It returns an error if either of the list operations fail.
func (*UCPCredentialManagementClient) PutAWS ¶
func (cpm *UCPCredentialManagementClient) PutAWS(ctx context.Context, credential ucp.AwsCredentialResource) error
PutAWS function takes in a context and an AWSCredentialResource object and returns an error if the AWSClient.Put call fails.
func (*UCPCredentialManagementClient) PutAzure ¶
func (cpm *UCPCredentialManagementClient) PutAzure(ctx context.Context, credential ucp.AzureCredentialResource) error
PutAzure takes in a context and an AzureCredentialResource object and attempts to store it through the Azure Client, returning an error if unsuccessful.