Merge imported products into local session state
This commit is contained in:
@@ -14,20 +14,18 @@ import (
|
||||
)
|
||||
|
||||
type commandDependencies struct {
|
||||
reporter logging.Reporter
|
||||
pipelineSearch *configkit.Search
|
||||
preparePipelineSource func(configkit.Source) (*configkit.SecretsReport, configkit.Source, error)
|
||||
loadPipelineSource func(configkit.Source, config.PipelineLoadOptions) (*config.PipelineConfig, error)
|
||||
newObjectStore func(context.Context, *config.Config) (storage.ObjectStore, error)
|
||||
newWorkspaceStore func(string) artifacts.Store
|
||||
newScriptorium func() scriptorium.Runner
|
||||
newAudita func(*config.Config) (audita.Runner, error)
|
||||
newNotarius func() notarius.Runner
|
||||
discoverRemoteCurrentState func(context.Context, *config.Config, storage.ObjectStore) (*RemoteCurrentState, error)
|
||||
discoverRemotePublication func(context.Context, *config.Config, storage.ObjectStore) (*RemoteCurrentState, error)
|
||||
buildRestorePlan func(context.Context, *config.Config, *RemoteCurrentState, storage.ObjectStore, RestorePlanOptions) (*RestorePlan, error)
|
||||
buildInventoryRestorePlan func(context.Context, *config.Config, *RemoteCurrentState, storage.ObjectStore, RestorePlanOptions) (*RestorePlan, error)
|
||||
executeRestorePlan func(context.Context, *config.Config, *RemoteCurrentState, *RestorePlan, *RestoreReport, storage.ObjectStore) (*RestoreExecutionResult, error)
|
||||
reporter logging.Reporter
|
||||
pipelineSearch *configkit.Search
|
||||
preparePipelineSource func(configkit.Source) (*configkit.SecretsReport, configkit.Source, error)
|
||||
loadPipelineSource func(configkit.Source, config.PipelineLoadOptions) (*config.PipelineConfig, error)
|
||||
newObjectStore func(context.Context, *config.Config) (storage.ObjectStore, error)
|
||||
newWorkspaceStore func(string) artifacts.Store
|
||||
newScriptorium func() scriptorium.Runner
|
||||
newAudita func(*config.Config) (audita.Runner, error)
|
||||
newNotarius func() notarius.Runner
|
||||
discoverRemotePublication func(context.Context, *config.Config, storage.ObjectStore) (*RemoteCurrentState, error)
|
||||
buildInventoryRestorePlan func(context.Context, *config.Config, *RemoteCurrentState, storage.ObjectStore, RestorePlanOptions) (*RestorePlan, error)
|
||||
executeRestorePlan func(context.Context, *config.Config, *RemoteCurrentState, *RestorePlan, *RestoreReport, storage.ObjectStore) (*RestoreExecutionResult, error)
|
||||
}
|
||||
|
||||
func normalizeCommandDependencies(deps commandDependencies) commandDependencies {
|
||||
@@ -54,15 +52,9 @@ func normalizeCommandDependencies(deps commandDependencies) commandDependencies
|
||||
if deps.newScriptorium == nil {
|
||||
deps.newScriptorium = defaultScriptoriumRunner
|
||||
}
|
||||
if deps.discoverRemoteCurrentState == nil {
|
||||
deps.discoverRemoteCurrentState = discoverRemoteCurrentState
|
||||
}
|
||||
if deps.discoverRemotePublication == nil {
|
||||
deps.discoverRemotePublication = discoverRemotePublication
|
||||
}
|
||||
if deps.buildRestorePlan == nil {
|
||||
deps.buildRestorePlan = buildRestorePlan
|
||||
}
|
||||
if deps.buildInventoryRestorePlan == nil {
|
||||
deps.buildInventoryRestorePlan = buildInventoryRestorePlan
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user