Documentation
¶
Overview ¶
Package config loads holt's connection profiles from ~/.holt/config.yaml: how to reach a hub, including one fronted by an authenticating proxy. A profile carries the admin URL, the tunnel URL to advertise in tokens, and any extra HTTP headers to send; header values expand ${ENV} references so secrets stay out of the file.
It is what the CLI resolves --profile against, and what pkg/expose reads to serve a handler with no configuration in the program. The file is optional: with none, callers fall back to their built-in defaults.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
DefaultProfile string `yaml:"default_profile"`
Profiles map[string]Profile `yaml:"profiles"`
}
Config is the on-disk CLI config: named profiles and which one is used when none is requested.
type Profile ¶
type Profile struct {
AdminURL string `yaml:"admin_url"`
Headers map[string]string `yaml:"headers"`
TunnelURL string `yaml:"tunnel_url"`
}
Profile is one hub connection: its admin URL, extra headers, and the tunnel URL enroll advertises in tokens.
func (Profile) ResolvedHeaders ¶
ResolvedHeaders returns the profile headers with ${ENV} / $ENV references expanded from the environment, so secrets can live in env rather than in the file.