 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package driver is a generated GoMock package.
Index ¶
- Constants
- type BaseOptions
- type BicepOptions
- type DeleteOptions
- type Driver
- type ExecuteOptions
- type MockDriver
- func (m *MockDriver) Delete(arg0 context.Context, arg1 DeleteOptions) error
- func (m *MockDriver) EXPECT() *MockDriverMockRecorder
- func (m *MockDriver) Execute(arg0 context.Context, arg1 ExecuteOptions) (*recipes.RecipeOutput, error)
- func (m *MockDriver) GetRecipeMetadata(arg0 context.Context, arg1 BaseOptions) (map[string]interface{}, error)
 
- type MockDriverMockRecorder
- type TerraformOptions
Constants ¶
const ( TerraformAzureProvider = "registry.terraform.io/hashicorp/azurerm" TerraformAWSProvider = "registry.terraform.io/hashicorp/aws" TerraformKubernetesProvider = "registry.terraform.io/hashicorp/kubernetes" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseOptions ¶
type BaseOptions struct {
	// Configuration is the configuration for the recipe.
	Configuration recipes.Configuration
	// Recipe is the recipe metadata.
	Recipe recipes.ResourceMetadata
	// Definition is the environment definition for the recipe.
	Definition recipes.EnvironmentDefinition
	// Secrets specifies the module authentication information stored in the secret store.
	Secrets v20231001preview.SecretStoresClientListSecretsResponse
}
    BaseOptions is the base options for the driver operations.
type BicepOptions ¶ added in v0.26.0
type DeleteOptions ¶
type DeleteOptions struct {
	BaseOptions
	// OutputResources is the list of output resources for the recipe.
	OutputResources []rpv1.OutputResource
}
    DeleteOptions is the options for the Delete method.
type Driver ¶
type Driver interface {
	// Execute fetches the recipe contents and deploys the recipe and returns deployed resources, secrets and values.
	Execute(ctx context.Context, opts ExecuteOptions) (*recipes.RecipeOutput, error)
	// Delete handles deletion of output resources for the recipe deployment.
	Delete(ctx context.Context, opts DeleteOptions) error
	// Gets the Recipe metadata and parameters from Recipe's template path
	GetRecipeMetadata(ctx context.Context, opts BaseOptions) (map[string]any, error)
}
    Driver is an interface to implement recipe deployment and recipe resources deletion.
func NewBicepDriver ¶
func NewBicepDriver(armOptions *arm.ClientOptions, deploymentClient *clients.ResourceDeploymentsClient, client processors.ResourceClient, options BicepOptions) Driver
NewBicepDriver creates a new bicep driver instance with the given ARM client options, deployment client, resource client, and options.
func NewTerraformDriver ¶
func NewTerraformDriver(ucpConn sdk.Connection, secretProvider *ucp_provider.SecretProvider, options TerraformOptions, k8sClientSet kubernetes.Interface) Driver
NewTerraformDriver creates a new instance of driver to execute a Terraform recipe.
type ExecuteOptions ¶
type ExecuteOptions struct {
	BaseOptions
	// Previously deployed state of output resource IDs.
	PrevState []string
}
    ExecuteOptions is the options for the Execute method.
type MockDriver ¶
type MockDriver struct {
	// contains filtered or unexported fields
}
    MockDriver is a mock of Driver interface.
func NewMockDriver ¶
func NewMockDriver(ctrl *gomock.Controller) *MockDriver
NewMockDriver creates a new mock instance.
func (*MockDriver) Delete ¶
func (m *MockDriver) Delete(arg0 context.Context, arg1 DeleteOptions) error
Delete mocks base method.
func (*MockDriver) EXPECT ¶
func (m *MockDriver) EXPECT() *MockDriverMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDriver) Execute ¶
func (m *MockDriver) Execute(arg0 context.Context, arg1 ExecuteOptions) (*recipes.RecipeOutput, error)
Execute mocks base method.
func (*MockDriver) GetRecipeMetadata ¶
func (m *MockDriver) GetRecipeMetadata(arg0 context.Context, arg1 BaseOptions) (map[string]interface{}, error)
GetRecipeMetadata mocks base method.
type MockDriverMockRecorder ¶
type MockDriverMockRecorder struct {
	// contains filtered or unexported fields
}
    MockDriverMockRecorder is the mock recorder for MockDriver.
func (*MockDriverMockRecorder) Delete ¶
func (mr *MockDriverMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockDriverMockRecorder) Execute ¶
func (mr *MockDriverMockRecorder) Execute(arg0, arg1 interface{}) *gomock.Call
Execute indicates an expected call of Execute.
func (*MockDriverMockRecorder) GetRecipeMetadata ¶
func (mr *MockDriverMockRecorder) GetRecipeMetadata(arg0, arg1 interface{}) *gomock.Call
GetRecipeMetadata indicates an expected call of GetRecipeMetadata.
type TerraformOptions ¶
type TerraformOptions struct {
	// Path is the path to the directory mounted to the container where terraform can be installed and executed.
	Path string
}
    Options represents the options required for execution of Terraform driver.