Documentation
¶
Index ¶
- func MullvadAutoSetup(state *SetupState)
- func Run(dryRun bool)
- func RunAuto(dryRun bool)
- type ServiceState
- type SetupState
- type StepResult
- func CheckConnectivity(state *SetupState) StepResult
- func ConfigureDownloadClients(state *SetupState) StepResult
- func DeployStack(state *SetupState) StepResult
- func Detect(state *SetupState) StepResult
- func SelectServices(state *SetupState) StepResult
- func SyncIndexers() StepResult
- func SyncQualityProfiles(state *SetupState) StepResult
- func ValidateAPIKeys(state *SetupState) StepResult
- func ValidateRootFolders(state *SetupState) StepResult
- func VerifyIndexers(state *SetupState) StepResult
- func WireBazarr(state *SetupState) StepResult
- func WireSeerr(state *SetupState) StepResult
- func WriteConfig(state *SetupState) StepResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MullvadAutoSetup ¶
func MullvadAutoSetup(state *SetupState)
MullvadAutoSetup runs the automated Mullvad VPN setup flow. Exported so cmd/vpn.go can reuse it for `admirarr vpn setup`.
Types ¶
type ServiceState ¶
type ServiceState struct {
Detected bool
Reachable bool
IsDocker bool
Host string
Port int
APIKey string
}
ServiceState tracks the detected state of a single service.
type SetupState ¶
type SetupState struct {
DataPath string
ComposeDir string
ConfigDir string
Timezone string
VPNProvider string
VPNType string
RemoteHost string // Remote host IP for non-Docker services (auto-detected on WSL)
SelectedServices []string
Services map[string]*ServiceState
Keys map[string]string
// ManualKeys tracks keys the user entered manually (need persisting).
ManualKeys map[string]string
// VPNCreds holds provider-specific VPN credentials for Gluetun.
VPNCreds map[string]string
// Indexers holds the desired indexer set (populated during Phase 7).
Indexers map[string]config.IndexerConfig
// JellyfinUser and JellyfinPassword store credentials set during Jellyfin init.
JellyfinUser string
JellyfinPassword string
// SeerrInitialized is set to true when initSeerr() completes successfully.
SeerrInitialized bool
// AutoMode skips interactive prompts, using detected/configured defaults.
AutoMode bool
// DryRun previews changes without applying mutations.
DryRun bool
}
SetupState accumulates validated configuration across all phases.
func (*SetupState) InternalURL ¶
func (s *SetupState) InternalURL(service string) string
InternalURL returns the inter-service URL for a service. Docker services use container names; remote services use the remote host IP; native services use localhost.
type StepResult ¶
StepResult tracks what happened in each phase.
func CheckConnectivity ¶
func CheckConnectivity(state *SetupState) StepResult
CheckConnectivity runs Phase 3: service reachability and restart offers.
func ConfigureDownloadClients ¶
func ConfigureDownloadClients(state *SetupState) StepResult
ConfigureDownloadClients runs Phase 5: download client + qBittorrent configuration.
func DeployStack ¶
func DeployStack(state *SetupState) StepResult
DeployStack runs Phase 2: deploy missing services via Docker Compose.
func SelectServices ¶
func SelectServices(state *SetupState) StepResult
SelectServices runs Phase 0: service tier selection.
func SyncIndexers ¶
func SyncIndexers() StepResult
SyncIndexers is the standalone version called by `indexers sync`.
func SyncQualityProfiles ¶
func SyncQualityProfiles(state *SetupState) StepResult
SyncQualityProfiles runs Phase 10: deploy Recyclarr if needed, generate config, sync TRaSH Guides, then ensure all items use the configured quality profile.
func ValidateAPIKeys ¶
func ValidateAPIKeys(state *SetupState) StepResult
ValidateAPIKeys runs Phase 4: API key discovery and validation. Two-pass approach: silent auto-discovery first, manual prompt only if needed.
func ValidateRootFolders ¶
func ValidateRootFolders(state *SetupState) StepResult
ValidateRootFolders runs Phase 6: root folder and media path validation.
func VerifyIndexers ¶
func VerifyIndexers(state *SetupState) StepResult
VerifyIndexers runs Phase 7: declarative indexer sync + Prowlarr wiring. Reads config.Indexers and converges Prowlarr to match.
func WireBazarr ¶
func WireBazarr(state *SetupState) StepResult
WireBazarr runs Phase 9: connect Bazarr to Radarr/Sonarr.
func WireSeerr ¶
func WireSeerr(state *SetupState) StepResult
WireSeerr runs Phase 8: connect Seerr to Radarr/Sonarr/media server.
func WriteConfig ¶
func WriteConfig(state *SetupState) StepResult
WriteConfig runs Phase 11: write validated config to disk.