2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-20 09:42:21 +00:00
restic/internal/migrations/interface.go

28 lines
567 B
Go
Raw Normal View History

package migrations
import (
"context"
2017-07-23 12:21:03 +00:00
2017-07-24 15:42:25 +00:00
"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
// Name returns a short name.
Name() string
// Descr returns a description what the migration does.
Desc() string
}