mirror of
https://github.com/restic/restic.git
synced 2026-07-12 18:25:10 +00:00
migrate: Allow migrations to request a check run
This is currently only used by upgrade_repo_v2.
This commit is contained in:
@@ -6,11 +6,16 @@ import (
|
||||
"github.com/restic/restic/internal/restic"
|
||||
)
|
||||
|
||||
type RepositoryCheckOptions struct {
|
||||
}
|
||||
|
||||
// Migration implements a data migration.
|
||||
type Migration interface {
|
||||
// Check returns true if the migration can be applied to a repo.
|
||||
Check(context.Context, restic.Repository) (bool, error)
|
||||
|
||||
RepoCheckOptions() *RepositoryCheckOptions
|
||||
|
||||
// Apply runs the migration.
|
||||
Apply(context.Context, restic.Repository) error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user