1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 01:06:39 +00:00
restic/internal/migrations/interface.go
2022-06-04 23:45:00 +02:00

24 lines
501 B
Go

package migrations
import (
"context"
"github.com/restic/restic/internal/restic"
)
// 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)
RepoCheck() bool
// 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
}