Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load resolves the configuration into the provided conf object. Config is merged in order from the following sources:
- config.yaml embedded in this package. These are the curiostack defaults where applicable.
- config.yaml at the base of the repository, identified by being next to go.work, if present.
- config.yaml in the provided fs.FS if present.
- config-local.yaml in the provided fs.FS if present and CONFIG_ENV is unset (local development).
- config-nonlocal.yaml in the provided fs.FS if present and CONFIG_ENV is set.
- config-${CONFIG_ENV}.yaml in the provided fs.FS if present and CONFIG_ENV is set.
- Environment variables, where the config key is capitalized with '.' replaced with '_'.
Types ¶
type Common ¶
type Common struct { // Server holds the configuration for the server. Server Server `koanf:"server"` // Google holds the configruation for using common GCP functionality. Google Google `koanf:"google"` // Logging holds the configuration for logging. Logging Logging `koanf:"logging"` }
Common holds curiostack standard configuration objects. Server configuration objects should embed this and define their own fields on top of it.
type Google ¶
type Google struct { // Project is the GCP project ID. Project string `koanf:"project"` // Region is the default region development resources are deployed to. Region string `koanf:"region"` }
Google holds the configuration for using common GCP functionality.
Click to show internal directories.
Click to hide internal directories.