migrations

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2025 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package migrations contains migrations that can be applied to a repository and/or backend.

Index

Constants

This section is empty.

Variables

All contains all migrations.

Functions

This section is empty.

Types

type 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
}

Migration implements a data migration.

type UpgradeRepoV2

type UpgradeRepoV2 struct{}

func (*UpgradeRepoV2) Apply

func (m *UpgradeRepoV2) Apply(ctx context.Context, repo restic.Repository) error

func (*UpgradeRepoV2) Check

func (*UpgradeRepoV2) Desc

func (*UpgradeRepoV2) Desc() string

func (*UpgradeRepoV2) Name

func (*UpgradeRepoV2) Name() string

func (*UpgradeRepoV2) RepoCheck

func (*UpgradeRepoV2) RepoCheck() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL