be7803c0ac
- Add [DEBUG] logging across all modules (backup, storage, sync, selfupdate, monitor, notify, report, assets, setup) gated behind logging.level: "debug" - Add /api/debug/dump endpoint returning full controller state JSON (debug only) - Add startup self-test validating 9 subsystems (Docker, dirs, storage, hub, restic repos, metrics DB) with pass/warn/fail summary - New packages: internal/selftest, internal/util - Constructor/signature changes: debug bool params, logger params on RunHealthCheck and BuildReport, smart watchdog probe logging Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
1.0 KiB
Go
27 lines
1.0 KiB
Go
package storage
|
|
|
|
import "log"
|
|
|
|
// AttachRequest holds parameters for attaching an existing partition
|
|
// without formatting — using a bind mount from a subfolder.
|
|
type AttachRequest struct {
|
|
DevicePath string // "/dev/sdb1" — must have an existing filesystem
|
|
MountName string // "hdd_1" → bind-mounts at /mnt/hdd_1
|
|
SubPath string // full path on raw mount to bind-mount (e.g., "/mnt/.felhom-raw/hdd_1/felhom_data")
|
|
Label string // Display label for the UI
|
|
SetDefault bool // Register as default storage path
|
|
Logger *log.Logger // Optional logger for debug output
|
|
Debug bool // Enable debug logging
|
|
}
|
|
|
|
// DirEntry represents a directory entry returned by ListDirectories.
|
|
type DirEntry struct {
|
|
Name string `json:"name"`
|
|
Path string `json:"path"`
|
|
HasChildren bool `json:"has_children"`
|
|
}
|
|
|
|
// RawMountBase is the hidden staging directory where partitions are
|
|
// temporarily mounted for browsing before the final bind mount.
|
|
const RawMountBase = "/mnt/.felhom-raw"
|