confighelpers

module
v0.0.0-...-349d5a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2019 License: MIT

README

confighelpers

Package confighelpers helps you define and validate configuration files more easily.

It's designed to provide dev an easy way to create and validate YAML configuration files, in order to make development/operation more convenient.

Specifically, the packages try to help you with these scenarios:

unvalidated config

After hours of troubleshooting a failed deployment, you realized the problem was misconfigured/missing key.

Unlike the standard library's flag, which provide default values and type-check, when we use YAML config files, we are back to the land of text and zero-values.

If would be convenient if the config struct(s) we unmarshal comes with a Check() error function. The library provide you exactly that.

power-on self-test

Sometimes you would need to go further than validating that values in the config YAML is correct. For example, you might need to check if dependencies (e.g., DB, external services, etc) are up before starting your own app.

The library also provide common functions for that, too (e.g., Ping() over mutual TLS).

Directories

Path Synopsis
Package tls provides shared functionality for configurations related to TLS.
Package tls provides shared functionality for configurations related to TLS.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL