Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
Loads config into the target struct from the given path - an INI file. Can override config values with environment variables. Don't put secrets in the INI file. It first loads the INI file and then overrides the values with environment variables.
Types ¶
type BootConfig ¶
type BootConfig struct {
// ssl
SslBucket string `env:"SSL-BUCKET" ini:"ssl_bucket"`
Domain string `env:"DOMAIN" ini:"domain"`
// Cloud
AzureStorageAccount string `env:"AZURE-STORAGE-ACCOUNT" ini:"azure_storage_account"`
GcpProjectId string `env:"GCP-PROJECT-ID" ini:"gcp_project_id"`
}
Note: go-api-boot holds clear distinction between config and secrets. Config is for application configuration that can be stored in version control. Secrets are sensitive information like API keys, passwords, etc. that should not be stored in version control. Secrets should be exclusively read from environment variables.
Click to show internal directories.
Click to hide internal directories.