-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add profile support to app configuration (#6)
* Rename the api_key field since the key may not, and probably won't, be a JWT. * Replace 'config-rs' usage with our own custom config handling. 'config-rs' is handy, but we plan to restructure the configuration file in a way that does not align well with that project's design. Rather than fight it, we've opted to replace it. * Break configuration loading up a bit to make testing easier. * Split up the `config` module to make the code easier to follow. * Make `ConfigFile` the primary entry point for loading configuration from YAML. * Allow loading non-default profiles from the application config file. * Add new CLI option for selecting the configuration profile to use. * Make `config` responsible for providing default values. * Split up code for loading settings from environment variables. * Split up code for loading settings from config files. Also change profile merging to be a functional operation since it makes testing easier and it's not on a hot enough path to worry about extra data copies. * Add support for profile inheritance in the app config file. This change also adds error handling for config file issues. * Update config file template to work with profiles. * Update docs for new config file format supporting multiple profiles.
- Loading branch information
Showing
9 changed files
with
567 additions
and
146 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.