Files
admin 95c821deb2 feat: comprehensive debug logging across all controller modules
Add detailed [DEBUG] logging to every controller module when
logging.level is set to "debug". Each module with stateful debug
uses SetDebug(bool) wired from main.go. Covers stacks, backup,
cloudflare, integrations, system, monitor, settings, scheduler,
web handlers, storage, metrics, API, selfupdate, and assets.

Also includes the app export/import (.fab bundles) feature from
v0.32.0 and its debug page integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:14:43 +01:00

43 lines
1.3 KiB
Go

package appexport
import (
"encoding/json"
"time"
)
// ManifestVersion is the current bundle format version.
const ManifestVersion = 1
// Manifest is the JSON metadata stored inside a .fab file.
type Manifest struct {
Version int `json:"version"`
AppName string `json:"app_name"`
DisplayName string `json:"display_name"`
ExportedAt time.Time `json:"exported_at"`
ControllerVer string `json:"controller_version"`
NeedsHDD bool `json:"needs_hdd"`
Encrypted bool `json:"encrypted"`
HasDatabase bool `json:"has_database"`
HasHDDData bool `json:"has_hdd_data"`
HasVolumeData bool `json:"has_volume_data"`
DBType string `json:"db_type,omitempty"`
TotalSizeBytes int64 `json:"total_size_bytes"`
ConfigFiles []string `json:"config_files"`
VolumeNames []string `json:"volume_names,omitempty"`
HDDSubdirs []string `json:"hdd_subdirs,omitempty"`
}
// Marshal returns the manifest as indented JSON.
func (m *Manifest) Marshal() ([]byte, error) {
return json.MarshalIndent(m, "", " ")
}
// UnmarshalManifest parses a manifest from JSON bytes.
func UnmarshalManifest(data []byte) (*Manifest, error) {
var m Manifest
if err := json.Unmarshal(data, &m); err != nil {
return nil, err
}
return &m, nil
}