mirror of
https://github.com/restic/restic.git
synced 2025-08-14 03:27:41 +00:00
Moves files
This commit is contained in:
21
internal/migrations/interface.go
Normal file
21
internal/migrations/interface.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"context"
|
||||
"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)
|
||||
|
||||
// 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
|
||||
}
|
Reference in New Issue
Block a user