Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow accepting env vars for config #128

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Dec 14, 2018

  1. Rename to GetConfigFromFile

    This function reads the map of config environments to Environment
    structs from the dbconfig.yml file. We want to allow these commands to
    also read from the shell environment, so for unambiguous names this is
    being renamed.
    Quinten Palmer committed Dec 14, 2018
    Configuration menu
    Copy the full SHA
    9974f3d View commit details
    Browse the repository at this point in the history
  2. ReadEnvFromFile now returns the env instead of a config

    This is in the same vein of the previous commit where we want to be able
    to parse an Environment from the shell environment, so to make that
    switch easier, this function now returns the Environemnt and can be
    substituted for another function which reads from the environment.
    Quinten Palmer committed Dec 14, 2018
    Configuration menu
    Copy the full SHA
    0c5f5e4 View commit details
    Browse the repository at this point in the history
  3. Fallback to reading Environment from shell Env

    We want to build the ability for this command to accept the Environment
    through the shell env. If the file is not present, we optimistically
    look for the Environment in said shell env. There are existing
    zero-value checks to make sure that a user doesn't accidentally end up
    with no values for anything if their file was empty. We do a separate
    stat to check for the file to keep the complexity of the fallback
    simpler.
    
    The envconfig package can be researched more here:
    
    https://github.com/kelseyhightower/envconfig
    Quinten Palmer committed Dec 14, 2018
    Configuration menu
    Copy the full SHA
    b0d4230 View commit details
    Browse the repository at this point in the history