cfg

package
v0.0.0-...-a0612fc Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBsInfos map[string]DBInfo `yaml:"dbs_infos"`
	ZapLog   ZapLogInfos       `yaml:"zap_log"`
}

Config represents the structure of the yaml file

func NewConfig

func NewConfig(path string) (*Config, error)

App Config factory takes a path to a yaml file and produces a parsed Config

type DBInfo

type DBInfo struct {
	UserName string `yaml:"user_name"`
	Password string `yaml:"password"`
	Url      string `yaml:"url"`
	Port     int16  `yaml:"port"`
}

type ZapLogInfos

type ZapLogInfos struct {
	LogsPath       string `yaml:"logsPath"`
	ConsoleFileOut string `yaml:"consoleFileOut"`
	ConsoleFileErr string `yaml:"consoleFileErr"`
	JsonFileOut    string `yaml:"jsonFileOut"`
	JsonFileErr    string `yaml:"jsonFileErr"`
}

Zap details for zap

Jump to

Keyboard shortcuts

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