Documentation
¶
Overview ¶
Package config holds the deploy configuration and persists it (0600) under ~/.config/pocketdev/config.json so re-runs remember your choices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HCloudCLIToken ¶
HCloudCLIToken reads the active context's token from the official hcloud CLI config (~/.config/hcloud/cli.toml). Best-effort: returns ok=false on any miss, so users who already ran `hcloud context create` skip the token step.
Types ¶
type Config ¶
type Config struct {
Agents []string `json:"agents"`
Name string `json:"name"`
Region string `json:"region"`
ServerType string `json:"server_type"`
WithoutIPv4 bool `json:"without_ipv4"`
RebootTime string `json:"reboot_time"`
TSTag string `json:"ts_tag"`
SSHPublicKeys []string `json:"ssh_public_keys"`
Source string `json:"source"` // "github" | "rsync" | "fresh"
GitHub bool `json:"github"` // set up gh + clone on the box (source=github)
RepoURL string `json:"repo_url"` // repo to clone (owner/repo or URL)
LocalPath string `json:"local_path"` // local folder/file to rsync (source=rsync)
SSHIDHandle string `json:"sshid_handle"` // Termius SSH ID handle; its public keys are added to the box for keyless mobile
UseExisting bool `json:"use_existing"` // adopt a server you already own instead of creating
ExistingServer string `json:"existing_server"` // Hetzner server name chosen to adopt
SSHHost string `json:"ssh_host"` // IPv4 or tailnet/MagicDNS name to reach an adopted box
SSHUser string `json:"ssh_user"` // login user for adoption; default "root"
Category string `json:"category"` // selected size category (create path)
HCloudToken string `json:"hcloud_token"`
TSOAuthID string `json:"ts_oauth_client_id"`
TSOAuthSecret string `json:"ts_oauth_client_secret"`
TSAuthKey string `json:"ts_authkey"`
}
Config is everything needed to provision a box. Secrets are stored too, so the file is written with 0600 perms.
Click to show internal directories.
Click to hide internal directories.