1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-30 00:00:14 +01:00
restic/internal/migrations/interface.go
2025-03-22 18:20:30 +00:00

24 lines
573 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. If the option is not applicable it can return a specific reason.
Check(context.Context, restic.Repository) (bool, string, error)
RepoCheck() bool
// Apply runs the migration.
Apply(context.Context, restic.Repository) error
// Name returns a short name.
Name() string
// Desc returns a description what the migration does.
Desc() string
}