Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RewriteReport ¶
type RewriteReport struct {
Scanned int
Matched int
Rewritten int
SkippedWrongPrefix int // symlinks whose target didn't point at sourceMountPath/.ids/ — usually a misconfigured mount path
Unmatched []string // symlink paths that had no matching migration row
Errors []string // errors encountered (non-fatal)
}
RewriteReport summarizes results of a symlink rewrite operation.
func RewriteLibrarySymlinks ¶
func RewriteLibrarySymlinks( ctx context.Context, libraryPath string, sourceMountPath string, altmountPath string, source string, lookup SymlinkLookup, dryRun bool, ) (*RewriteReport, error)
RewriteLibrarySymlinks walks libraryPath, finds symlinks (real OS symlinks or rclone .rclonelink text files) whose target starts with sourceMountPath+"/.ids/", looks up the GUID in the lookup, and rewrites the target to filepath.Join(altmountPath, finalPath).
If dryRun is true, no filesystem changes are made but the report is populated.
type SymlinkLookup ¶
type SymlinkLookup interface {
LookupFinalPath(ctx context.Context, source, externalID string) (finalPath string, found bool, err error)
MarkSymlinksMigrated(ctx context.Context, ids []int64) error
}
SymlinkLookup looks up the final AltMount path for a given source and external ID.
Click to show internal directories.
Click to hide internal directories.