Documentation ¶
Overview ¶
Package engine is a generated GoMock package.
Index ¶
- func NewEngine(options Options) *engine
- type BaseOptions
- type DeleteOptions
- type Engine
- type ExecuteOptions
- type GetRecipeMetadataOptions
- type MockEngine
- func (m *MockEngine) Delete(arg0 context.Context, arg1 DeleteOptions) error
- func (m *MockEngine) EXPECT() *MockEngineMockRecorder
- func (m *MockEngine) Execute(arg0 context.Context, arg1 ExecuteOptions) (*recipes.RecipeOutput, error)
- func (m *MockEngine) GetRecipeMetadata(arg0 context.Context, arg1 GetRecipeMetadataOptions) (map[string]any, error)
- type MockEngineDeleteCall
- type MockEngineExecuteCall
- func (c *MockEngineExecuteCall) Do(f func(context.Context, ExecuteOptions) (*recipes.RecipeOutput, error)) *MockEngineExecuteCall
- func (c *MockEngineExecuteCall) DoAndReturn(f func(context.Context, ExecuteOptions) (*recipes.RecipeOutput, error)) *MockEngineExecuteCall
- func (c *MockEngineExecuteCall) Return(arg0 *recipes.RecipeOutput, arg1 error) *MockEngineExecuteCall
- type MockEngineGetRecipeMetadataCall
- func (c *MockEngineGetRecipeMetadataCall) Do(f func(context.Context, GetRecipeMetadataOptions) (map[string]any, error)) *MockEngineGetRecipeMetadataCall
- func (c *MockEngineGetRecipeMetadataCall) DoAndReturn(f func(context.Context, GetRecipeMetadataOptions) (map[string]any, error)) *MockEngineGetRecipeMetadataCall
- func (c *MockEngineGetRecipeMetadataCall) Return(arg0 map[string]any, arg1 error) *MockEngineGetRecipeMetadataCall
- type MockEngineMockRecorder
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseOptions ¶
type BaseOptions struct { // Recipe is the recipe metadata. Recipe recipes.ResourceMetadata }
BaseOptions is the base options for the engine operations.
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 Engine ¶
type Engine interface { // Execute gathers environment configuration, recipe definition and calls the driver to deploy the recipe. // prevState is added to the driver execute options, which is used to get the obsolete resources for cleanup. It consists list of recipe output resource IDs that were created in the previous deployment. 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 GetRecipeMetadataOptions) (map[string]any, error) }
type ExecuteOptions ¶
type ExecuteOptions struct { BaseOptions // PreviousState represents previously deployed state of output resource IDs. PreviousState []string // Simulated is the flag to indicate if the execution is a simulation. Simulated bool }
ExecuteOptions is the options for the Execute method.
type GetRecipeMetadataOptions ¶ added in v0.35.0
type GetRecipeMetadataOptions struct { BaseOptions RecipeDefinition recipes.EnvironmentDefinition }
type MockEngine ¶
type MockEngine struct {
// contains filtered or unexported fields
}
MockEngine is a mock of Engine interface.
func NewMockEngine ¶
func NewMockEngine(ctrl *gomock.Controller) *MockEngine
NewMockEngine creates a new mock instance.
func (*MockEngine) Delete ¶
func (m *MockEngine) Delete(arg0 context.Context, arg1 DeleteOptions) error
Delete mocks base method.
func (*MockEngine) EXPECT ¶
func (m *MockEngine) EXPECT() *MockEngineMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEngine) Execute ¶
func (m *MockEngine) Execute(arg0 context.Context, arg1 ExecuteOptions) (*recipes.RecipeOutput, error)
Execute mocks base method.
func (*MockEngine) GetRecipeMetadata ¶
func (m *MockEngine) GetRecipeMetadata(arg0 context.Context, arg1 GetRecipeMetadataOptions) (map[string]any, error)
GetRecipeMetadata mocks base method.
type MockEngineDeleteCall ¶ added in v0.35.0
MockEngineDeleteCall wrap *gomock.Call
func (*MockEngineDeleteCall) Do ¶ added in v0.35.0
func (c *MockEngineDeleteCall) Do(f func(context.Context, DeleteOptions) error) *MockEngineDeleteCall
Do rewrite *gomock.Call.Do
func (*MockEngineDeleteCall) DoAndReturn ¶ added in v0.35.0
func (c *MockEngineDeleteCall) DoAndReturn(f func(context.Context, DeleteOptions) error) *MockEngineDeleteCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockEngineDeleteCall) Return ¶ added in v0.35.0
func (c *MockEngineDeleteCall) Return(arg0 error) *MockEngineDeleteCall
Return rewrite *gomock.Call.Return
type MockEngineExecuteCall ¶ added in v0.35.0
MockEngineExecuteCall wrap *gomock.Call
func (*MockEngineExecuteCall) Do ¶ added in v0.35.0
func (c *MockEngineExecuteCall) Do(f func(context.Context, ExecuteOptions) (*recipes.RecipeOutput, error)) *MockEngineExecuteCall
Do rewrite *gomock.Call.Do
func (*MockEngineExecuteCall) DoAndReturn ¶ added in v0.35.0
func (c *MockEngineExecuteCall) DoAndReturn(f func(context.Context, ExecuteOptions) (*recipes.RecipeOutput, error)) *MockEngineExecuteCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockEngineExecuteCall) Return ¶ added in v0.35.0
func (c *MockEngineExecuteCall) Return(arg0 *recipes.RecipeOutput, arg1 error) *MockEngineExecuteCall
Return rewrite *gomock.Call.Return
type MockEngineGetRecipeMetadataCall ¶ added in v0.35.0
MockEngineGetRecipeMetadataCall wrap *gomock.Call
func (*MockEngineGetRecipeMetadataCall) Do ¶ added in v0.35.0
func (c *MockEngineGetRecipeMetadataCall) Do(f func(context.Context, GetRecipeMetadataOptions) (map[string]any, error)) *MockEngineGetRecipeMetadataCall
Do rewrite *gomock.Call.Do
func (*MockEngineGetRecipeMetadataCall) DoAndReturn ¶ added in v0.35.0
func (c *MockEngineGetRecipeMetadataCall) DoAndReturn(f func(context.Context, GetRecipeMetadataOptions) (map[string]any, error)) *MockEngineGetRecipeMetadataCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockEngineGetRecipeMetadataCall) Return ¶ added in v0.35.0
func (c *MockEngineGetRecipeMetadataCall) Return(arg0 map[string]any, arg1 error) *MockEngineGetRecipeMetadataCall
Return rewrite *gomock.Call.Return
type MockEngineMockRecorder ¶
type MockEngineMockRecorder struct {
// contains filtered or unexported fields
}
MockEngineMockRecorder is the mock recorder for MockEngine.
func (*MockEngineMockRecorder) Delete ¶
func (mr *MockEngineMockRecorder) Delete(arg0, arg1 any) *MockEngineDeleteCall
Delete indicates an expected call of Delete.
func (*MockEngineMockRecorder) Execute ¶
func (mr *MockEngineMockRecorder) Execute(arg0, arg1 any) *MockEngineExecuteCall
Execute indicates an expected call of Execute.
func (*MockEngineMockRecorder) GetRecipeMetadata ¶
func (mr *MockEngineMockRecorder) GetRecipeMetadata(arg0, arg1 any) *MockEngineGetRecipeMetadataCall
GetRecipeMetadata indicates an expected call of GetRecipeMetadata.
type Options ¶
type Options struct { ConfigurationLoader configloader.ConfigurationLoader SecretsLoader configloader.SecretsLoader Drivers map[string]recipedriver.Driver }
Options represents the configuration loader and type of driver used to deploy recipe.