Middle layer wiring for verify command
This commit is contained in:
parent
651714fb4c
commit
7b0171cdd1
@ -746,3 +746,12 @@ func (w *Wrapper) UpdatePersistentConfig(
|
|||||||
) error {
|
) error {
|
||||||
return clues.Stack(w.c.updatePersistentConfig(ctx, config)).OrNil()
|
return clues.Stack(w.c.updatePersistentConfig(ctx, config)).OrNil()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (w *Wrapper) VerifyBackups(
|
||||||
|
ctx context.Context,
|
||||||
|
storer store.Storer,
|
||||||
|
) error {
|
||||||
|
return clues.Wrap(
|
||||||
|
verifyBackups(ctx, storer, w.c),
|
||||||
|
"verifying completeness of backups").OrNil()
|
||||||
|
}
|
||||||
|
|||||||
@ -53,6 +53,7 @@ type Backuper interface {
|
|||||||
failOnMissing bool,
|
failOnMissing bool,
|
||||||
ids ...string,
|
ids ...string,
|
||||||
) error
|
) error
|
||||||
|
VerifyBackups(ctx context.Context) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewBackup generates a BackupOperation runner.
|
// NewBackup generates a BackupOperation runner.
|
||||||
@ -356,3 +357,8 @@ func deleteBackups(
|
|||||||
|
|
||||||
return sw.DeleteWithModelStoreIDs(ctx, toDelete...)
|
return sw.DeleteWithModelStoreIDs(ctx, toDelete...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r repository) VerifyBackups(ctx context.Context) error {
|
||||||
|
return clues.Stack(r.dataLayer.VerifyBackups(ctx, store.NewWrapper(r.modelStore))).
|
||||||
|
OrNil()
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user