Documentation
¶
Overview ¶
deploy contains reusable infrastructure for Bicep deployments.
Package deploy is a generated GoMock package.
Index ¶
- func DeployWithProgress(ctx context.Context, options Options) (clients.DeploymentResult, error)
- type Impl
- type Interface
- type MockInterface
- type MockInterfaceDeployWithProgressCall
- func (c *MockInterfaceDeployWithProgressCall) Do(f func(context.Context, Options) (clients.DeploymentResult, error)) *MockInterfaceDeployWithProgressCall
- func (c *MockInterfaceDeployWithProgressCall) DoAndReturn(f func(context.Context, Options) (clients.DeploymentResult, error)) *MockInterfaceDeployWithProgressCall
- func (c *MockInterfaceDeployWithProgressCall) Return(arg0 clients.DeploymentResult, arg1 error) *MockInterfaceDeployWithProgressCall
- type MockInterfaceMockRecorder
- type Options
- type PublicEndpoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeployWithProgress ¶
DeployWithProgress injects environment and application parameters into the template, displays progress updates while deploying, and logs the deployment results and public endpoints. If an error occurs, an error is returned.
Types ¶
type Impl ¶
type Impl struct {
}
func (*Impl) DeployWithProgress ¶
func (*Impl) DeployWithProgress(ctx context.Context, options Options) (clients.DeploymentResult, error)
DeployWithProgress runs a deployment and displays progress to the user. This is intended to be used from the CLI and thus logs to the console.
type Interface ¶
type Interface interface {
// DeployWithProgress runs a deployment and displays progress to the user. This is intended to be used
// from the CLI and thus logs to the console.
DeployWithProgress(ctx context.Context, options Options) (clients.DeploymentResult, error)
}
Interface is the interface for executing Bicep deployments in the CLI.
type MockInterface ¶
type MockInterface struct {
// contains filtered or unexported fields
}
MockInterface is a mock of Interface interface.
func NewMockInterface ¶
func NewMockInterface(ctrl *gomock.Controller) *MockInterface
NewMockInterface creates a new mock instance.
func (*MockInterface) DeployWithProgress ¶
func (m *MockInterface) DeployWithProgress(ctx context.Context, options Options) (clients.DeploymentResult, error)
DeployWithProgress mocks base method.
func (*MockInterface) EXPECT ¶
func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockInterfaceDeployWithProgressCall ¶ added in v0.35.0
MockInterfaceDeployWithProgressCall wrap *gomock.Call
func (*MockInterfaceDeployWithProgressCall) Do ¶ added in v0.35.0
func (c *MockInterfaceDeployWithProgressCall) Do(f func(context.Context, Options) (clients.DeploymentResult, error)) *MockInterfaceDeployWithProgressCall
Do rewrite *gomock.Call.Do
func (*MockInterfaceDeployWithProgressCall) DoAndReturn ¶ added in v0.35.0
func (c *MockInterfaceDeployWithProgressCall) DoAndReturn(f func(context.Context, Options) (clients.DeploymentResult, error)) *MockInterfaceDeployWithProgressCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockInterfaceDeployWithProgressCall) Return ¶ added in v0.35.0
func (c *MockInterfaceDeployWithProgressCall) Return(arg0 clients.DeploymentResult, arg1 error) *MockInterfaceDeployWithProgressCall
Return rewrite *gomock.Call.Return
type MockInterfaceMockRecorder ¶
type MockInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockInterfaceMockRecorder is the mock recorder for MockInterface.
func (*MockInterfaceMockRecorder) DeployWithProgress ¶
func (mr *MockInterfaceMockRecorder) DeployWithProgress(ctx, options any) *MockInterfaceDeployWithProgressCall
DeployWithProgress indicates an expected call of DeployWithProgress.
type Options ¶
type Options struct {
// ConnectionFactory is used to create the deployment client.
ConnectionFactory connections.Factory
// Parameters should contain the parameters to set for the deployment.
Parameters clients.DeploymentParameters
// Template should contain a parsed ARM-JSON template.
Template map[string]any
// Workspace is the workspace to use for deployment.
Workspace workspaces.Workspace
// Providers are cloud and radius providers configured on the env for deployment
Providers *clients.Providers
// ProgressText is a message displayed on the console when deployment begins.
ProgressText string
// CompleteText is a message displayed on the console when deployment completes.
CompletionText string
}
Options contains options to be used with DeployWithProgress.
type PublicEndpoint ¶
type PublicEndpoint struct {
Resource ucpresources.ID
Endpoint string
}
func FindPublicEndpoints ¶
func FindPublicEndpoints(ctx context.Context, diag clients.DiagnosticsClient, result clients.DeploymentResult) ([]PublicEndpoint, error)
FindPublicEndpoints iterates through a list of resources and attempts to retrieve a public endpoint for each one, returning a list of public endpoints and an error if one occurs.