quackduck/devzat

Make constants configurable

quackduck opened this issue · 2 comments

It would be nice to have the following definable in a YAML config file.

  • The admin list
  • Data directory (stores bans and logs inside)
  • SSH host key location
  • Credentials file
  • SSH listen port (should also be definable as an env var)
  • Profiling port (or maybe profiling should just be removed)

The following could be merged into a single credentials file:

  • Slack API key
  • Slack channel ID
  • Twitter credentials

If you wanted to get really fancy, you could use cobra + viper
Then you would have:

  • A really nice CLI interface
  • A configuration file (Viper can handle reading config files for you)
  • The ability to override values in the configuration file using CLI flags
  • The ability override both the configuration file and CLI flags using environment variables

Commit 382708a concludes this change.