config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPathToEnvConfigFile string = "./config/consulConfig.yml"

DefaultPathToEnvConfigFile : If path is not provided by the user then default file is used.

Variables

This section is empty.

Functions

func GetConsulConfigMap

func GetConsulConfigMap(consuls *AllConsuls) map[string]ConsulDetail

GetConsulConfigMap : Get Map of AllConsuls

Types

type AllConsuls

type AllConsuls struct {
	ConsulConfigs []ConsulDetail `yaml:"consul.details"`
}

AllConsuls : Single struct for all the environments

func ParseConfigFile

func ParseConfigFile(configFilePath string) (*AllConsuls, error)

ParseConfigFile : based on the path provided

type ConsulDetail

type ConsulDetail struct {
	ConsulName string `yaml:"name"`
	DataCentre string `yaml:"dc"`
	BaseURL    string `yaml:"url"`
	BasePath   string `yaml:"base.path"`
	Token      string `yaml:"token"`
}

ConsulDetail : Struct for Environment Details

Jump to

Keyboard shortcuts

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