Plan imports from published product inventories

This commit is contained in:
2026-12-02 16:02:48 +00:00
parent 4f50a57a38
commit ad8a5df97b
9 changed files with 414 additions and 37 deletions

View File

@@ -26,6 +26,7 @@ type commandDependencies struct {
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)
}
@@ -62,6 +63,9 @@ func normalizeCommandDependencies(deps commandDependencies) commandDependencies
if deps.buildRestorePlan == nil {
deps.buildRestorePlan = buildRestorePlan
}
if deps.buildInventoryRestorePlan == nil {
deps.buildInventoryRestorePlan = buildInventoryRestorePlan
}
if deps.executeRestorePlan == nil {
deps.executeRestorePlan = executeRestorePlan
}