Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackupFileEntry ¶
type BackupFileEntry struct {
// Source is the path relative to the project directory.
Source string `json:"source"`
// Dest is the path relative to the backup directory.
Dest string `json:"dest"`
}
BackupFileEntry describes a single backed-up file or directory.
type BackupInfo ¶
type BackupInfo struct {
Timestamp string
Dir string
// Size is the total size of all files in the backup directory, in bytes.
Size int64
}
BackupInfo describes an available backup for listing.
func ListBackups ¶
func ListBackups(projectDir string) ([]BackupInfo, error)
ListBackups returns all available backups sorted newest-first. Returns an empty slice (not an error) when no backups exist.
type BackupManifest ¶
type BackupManifest struct {
Timestamp string `json:"timestamp"`
ProjectDir string `json:"project_dir"`
Files []BackupFileEntry `json:"files"`
}
BackupManifest records what was backed up during a migration.
type LegacyArtifact ¶
type LegacyArtifact struct {
Path string
Description string
Action string // what the user should do
}
LegacyArtifact describes a v1 artifact found in a project directory.
func Detect ¶
func Detect(projectDir string) []LegacyArtifact
Detect scans the given directory for v1 artifacts. Returns an empty slice if no artifacts are found (clean v2 project or new project). No os.Exit calls — errors from file reads are treated as absent artifacts.
Click to show internal directories.
Click to hide internal directories.