Documentation
¶
Overview ¶
Package driver is a generated GoMock package.
Package driver is a generated GoMock package.
Index ¶
- Constants
- type BaseOptions
- type BicepOptions
- type DeleteOptions
- type Driver
- type DriverWithSecrets
- 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 MockDriverWithSecrets
- func (m *MockDriverWithSecrets) Delete(arg0 context.Context, arg1 DeleteOptions) error
- func (m *MockDriverWithSecrets) EXPECT() *MockDriverWithSecretsMockRecorder
- func (m *MockDriverWithSecrets) Execute(arg0 context.Context, arg1 ExecuteOptions) (*recipes.RecipeOutput, error)
- func (m *MockDriverWithSecrets) FindSecretIDs(arg0 context.Context, arg1 recipes.Configuration, ...) (string, error)
- func (m *MockDriverWithSecrets) GetRecipeMetadata(arg0 context.Context, arg1 BaseOptions) (map[string]interface{}, error)
- type MockDriverWithSecretsMockRecorder
- func (mr *MockDriverWithSecretsMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDriverWithSecretsMockRecorder) Execute(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDriverWithSecretsMockRecorder) FindSecretIDs(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockDriverWithSecretsMockRecorder) GetRecipeMetadata(arg0, arg1 interface{}) *gomock.Call
- 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 DriverWithSecrets ¶ added in v0.33.0
type DriverWithSecrets interface {
// Driver is an interface to implement recipe deployment and recipe resources deletion.
Driver
// FindSecretIDs gets the secret store resource ID references associated with git private terraform repository source.
// In the future it will be extended to get secret references for provider secrets.
FindSecretIDs(ctx context.Context, config recipes.Configuration, definition recipes.EnvironmentDefinition) (string, error)
}
DriverWithSecrets is an optional interface and used when the driver needs to load secrets for recipe deployment.
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 MockDriverWithSecrets ¶ added in v0.33.0
type MockDriverWithSecrets struct {
// contains filtered or unexported fields
}
MockDriverWithSecrets is a mock of DriverWithSecrets interface.
func NewMockDriverWithSecrets ¶ added in v0.33.0
func NewMockDriverWithSecrets(ctrl *gomock.Controller) *MockDriverWithSecrets
NewMockDriverWithSecrets creates a new mock instance.
func (*MockDriverWithSecrets) Delete ¶ added in v0.33.0
func (m *MockDriverWithSecrets) Delete(arg0 context.Context, arg1 DeleteOptions) error
Delete mocks base method.
func (*MockDriverWithSecrets) EXPECT ¶ added in v0.33.0
func (m *MockDriverWithSecrets) EXPECT() *MockDriverWithSecretsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDriverWithSecrets) Execute ¶ added in v0.33.0
func (m *MockDriverWithSecrets) Execute(arg0 context.Context, arg1 ExecuteOptions) (*recipes.RecipeOutput, error)
Execute mocks base method.
func (*MockDriverWithSecrets) FindSecretIDs ¶ added in v0.33.0
func (m *MockDriverWithSecrets) FindSecretIDs(arg0 context.Context, arg1 recipes.Configuration, arg2 recipes.EnvironmentDefinition) (string, error)
FindSecretIDs mocks base method.
func (*MockDriverWithSecrets) GetRecipeMetadata ¶ added in v0.33.0
func (m *MockDriverWithSecrets) GetRecipeMetadata(arg0 context.Context, arg1 BaseOptions) (map[string]interface{}, error)
GetRecipeMetadata mocks base method.
type MockDriverWithSecretsMockRecorder ¶ added in v0.33.0
type MockDriverWithSecretsMockRecorder struct {
// contains filtered or unexported fields
}
MockDriverWithSecretsMockRecorder is the mock recorder for MockDriverWithSecrets.
func (*MockDriverWithSecretsMockRecorder) Delete ¶ added in v0.33.0
func (mr *MockDriverWithSecretsMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockDriverWithSecretsMockRecorder) Execute ¶ added in v0.33.0
func (mr *MockDriverWithSecretsMockRecorder) Execute(arg0, arg1 interface{}) *gomock.Call
Execute indicates an expected call of Execute.
func (*MockDriverWithSecretsMockRecorder) FindSecretIDs ¶ added in v0.33.0
func (mr *MockDriverWithSecretsMockRecorder) FindSecretIDs(arg0, arg1, arg2 interface{}) *gomock.Call
FindSecretIDs indicates an expected call of FindSecretIDs.
func (*MockDriverWithSecretsMockRecorder) GetRecipeMetadata ¶ added in v0.33.0
func (mr *MockDriverWithSecretsMockRecorder) 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.