Skip to content

Enable easy configuration and handling of secrets for Go projects

License

Notifications You must be signed in to change notification settings

SamuelTissot/flowconf

Repository files navigation

FlowConf

The extendable, configurable application configuration and secret manager package for the Go language.

At its core, FlowConf permits the declaration of configurations and secrets in an easily understandable format. FlowConf does not hide the implementation details or where each secret is stored. In order to resolve a secret, a user needs to have permission to view that secret.

Usage

import "github.com/SamuelTissot/flowconf"

// load source from file
sources, err := flowconf.NewSourcesFromFilepaths("fileOne.json", "fileTwo.toml")
if err != nil {
	// handle error
}

// create the builder
builder := flowconf.NewBuilder(sources...)

var conf Configuration // your declared Configuration struct
err = builder.Build(&conf)
if err != nil {
// handle error
}

// USE Configuration

Examples

With Only Static (files) Source

see static source example

Full Example with a Secret Manager

see Secret Manager Example

About

Enable easy configuration and handling of secrets for Go projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages