Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyEnvOverrides ¶
func ApplyEnvOverrides(server *ServerConfig, database *DatabaseConfig, tailscale *TailscaleConfig, prefix string)
ApplyEnvOverrides applies environment variable overrides using the given prefix. For example, with prefix "MYAPP", it checks MYAPP_SERVER_HOST, MYAPP_DB_HOST, etc.
Types ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Name string `yaml:"name"`
User string `yaml:"user"`
SSLMode string `yaml:"sslmode"`
}
func (DatabaseConfig) DSN ¶
func (d DatabaseConfig) DSN(password string) string
func (DatabaseConfig) Validate ¶
func (d DatabaseConfig) Validate() error
type SecretBackendConfig ¶
type SecretBackendConfig struct {
Type string `yaml:"type"` // "setec" or ""
SetecURL string `yaml:"setec_url"` // e.g. "https://setec.tail-scale.ts.net"
}
type ServerConfig ¶
type TailscaleConfig ¶
Click to show internal directories.
Click to hide internal directories.