configs

module
v0.0.0-...-6eb2448 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT

README

Configs

Can fetch the configuration from secret management services like vault. Currently we support vault

Usage

func main() {
	v, err := config.NewVault()
	checkError(err)
	config, err := v.GetConfig("auth-service")
	checkError(err)
	fmt.Println(config)
}

func checkError(err error) {
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}

It do require the following environment variables to work

export CUTTLE_AI_CONFIG_VAULT_ADDRESS='vault.cuttle.ai'
export CUTTLE_AI_CONFIG_VAULT_TOKEN='<token-provied-to-access-vault>'
export CUTTLE_AI_CONFIG_VAULT_DEFAULT_PATH='cuttle-ai-development'

Directories

Path Synopsis
Package config has the definitions and utility function required for managing configurations for the applications
Package config has the definitions and utility function required for managing configurations for the applications
Package version has the version information about the application
Package version has the version information about the application

Jump to

Keyboard shortcuts

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