Documentation ¶
Overview ¶
connections contains functionality for using the workspace.Connection concept of the CLI to connect and interact with the remote endpoints that are described by the workspace concept (Radius control plane, environment, et al).
Index ¶
- Variables
- type Factory
- type MockFactory
- func (f *MockFactory) CreateApplicationsManagementClient(ctx context.Context, workspace workspaces.Workspace) (clients.ApplicationsManagementClient, error)
- func (f *MockFactory) CreateCredentialManagementClient(ctx context.Context, workspace workspaces.Workspace) (cli_credential.CredentialManagementClient, error)
- func (f *MockFactory) CreateDeploymentClient(ctx context.Context, workspace workspaces.Workspace) (clients.DeploymentClient, error)
- func (f *MockFactory) CreateDiagnosticsClient(ctx context.Context, workspace workspaces.Workspace) (clients.DiagnosticsClient, error)
Constants ¶
This section is empty.
Variables ¶
var DefaultFactory = &impl{}
DefaultFactory provides easy access to the default implementation of the factory. DO NOT modify this in your code. Even if it's for tests. DO NOT DO IT.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory interface { CreateDeploymentClient(ctx context.Context, workspace workspaces.Workspace) (clients.DeploymentClient, error) CreateDiagnosticsClient(ctx context.Context, workspace workspaces.Workspace) (clients.DiagnosticsClient, error) CreateApplicationsManagementClient(ctx context.Context, workspace workspaces.Workspace) (clients.ApplicationsManagementClient, error) CreateCredentialManagementClient(ctx context.Context, workspace workspaces.Workspace) (cli_credential.CredentialManagementClient, error) }
ConnectionFactory is a mockable abstraction for our client-server interactions.
type MockFactory ¶
type MockFactory struct { ApplicationsManagementClient clients.ApplicationsManagementClient CredentialManagementClient cli_credential.CredentialManagementClient DiagnosticsClient clients.DiagnosticsClient }
func (*MockFactory) CreateApplicationsManagementClient ¶
func (f *MockFactory) CreateApplicationsManagementClient(ctx context.Context, workspace workspaces.Workspace) (clients.ApplicationsManagementClient, error)
CreateApplicationsManagementClient function takes in a context and a workspace and returns an ApplicationsManagementClient and an error if one occurs.
func (*MockFactory) CreateCredentialManagementClient ¶
func (f *MockFactory) CreateCredentialManagementClient(ctx context.Context, workspace workspaces.Workspace) (cli_credential.CredentialManagementClient, error)
CreateCredentialManagementClient function takes in a context and a workspace and returns a CredentialManagementClient and does not return an error.
func (*MockFactory) CreateDeploymentClient ¶
func (f *MockFactory) CreateDeploymentClient(ctx context.Context, workspace workspaces.Workspace) (clients.DeploymentClient, error)
CreateDeploymentClient function takes in a context and a workspace and returns a DeploymentClient and an error, if any.
func (*MockFactory) CreateDiagnosticsClient ¶
func (f *MockFactory) CreateDiagnosticsClient(ctx context.Context, workspace workspaces.Workspace) (clients.DiagnosticsClient, error)
CreateDiagnosticsClient function takes in a context and a workspace and returns a DiagnosticsClient without any errors.