package config // HostConfig defines a recoverable host type HostConfig struct { Name string // Short name (proton, elektron, etc.) FQDN string // Full domain name DNSZone string // DNS zone for A/AAAA records Services []string // Docker services to restore BackupDir string // Subdirectory in backup source } // KnownHosts contains all configured hosts var KnownHosts = map[string]HostConfig{ "proton": { Name: "proton", FQDN: "proton.obr.sh", DNSZone: "obr.sh", Services: []string{"gitea", "traefik", "portainer"}, BackupDir: "proton", }, "photon": { Name: "photon", FQDN: "photon.obnh.io", DNSZone: "obnh.io", Services: []string{"gitea", "nginx"}, BackupDir: "photon", }, "elektron": { Name: "elektron", FQDN: "elektron.obr.sh", DNSZone: "obr.sh", Services: []string{"gitea", "dns", "monitoring"}, BackupDir: "elektron", }, "fry": { Name: "fry", FQDN: "fry.obr.sh", DNSZone: "obr.sh", Services: []string{"mastodon", "gitea", "traefik"}, BackupDir: "fry", }, } // GetHost returns host config by name func GetHost(name string) (*HostConfig, bool) { h, ok := KnownHosts[name] if !ok { return nil, false } return &h, true } // ListHosts returns all known host names func ListHosts() []string { hosts := make([]string, 0, len(KnownHosts)) for name := range KnownHosts { hosts = append(hosts, name) } return hosts }