Validate sessions with prepared downstream inputs

This commit is contained in:
2026-11-27 16:48:38 +00:00
parent d178e2c437
commit 410a4109ad
6 changed files with 211 additions and 17 deletions

View File

@@ -3,6 +3,7 @@ package app
import (
"context"
"gitea.maximumdirect.net/eric/narratio/internal/adapters/audita"
"gitea.maximumdirect.net/eric/narratio/internal/adapters/scriptorium"
"gitea.maximumdirect.net/eric/narratio/internal/adapters/storage"
"gitea.maximumdirect.net/eric/narratio/internal/config"
@@ -17,6 +18,7 @@ type commandDependencies struct {
loadPipelineSource func(configkit.Source, config.PipelineLoadOptions) (*config.PipelineConfig, error)
newObjectStore func(context.Context, *config.Config) (storage.ObjectStore, error)
newScriptorium func() scriptorium.Runner
newAudita func(*config.Config) (audita.Runner, error)
discoverRemoteCurrentState func(context.Context, *config.Config, storage.ObjectStore) (*RemoteCurrentState, error)
buildRestorePlan func(context.Context, *config.Config, *RemoteCurrentState, storage.ObjectStore, RestorePlanOptions) (*RestorePlan, error)
executeRestorePlan func(context.Context, *config.Config, *RemoteCurrentState, *RestorePlan, *RestoreReport, storage.ObjectStore) (*RestoreExecutionResult, error)
@@ -34,6 +36,9 @@ func normalizeCommandDependencies(deps commandDependencies) commandDependencies
if deps.newObjectStore == nil {
deps.newObjectStore = storage.NewObjectStoreFromConfig
}
if deps.newAudita == nil {
deps.newAudita = buildDefaultAuditaRunner
}
if deps.newScriptorium == nil {
deps.newScriptorium = defaultScriptoriumRunner
}