systemcfg

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CfgStore is a storage driver that configurations
	// can be read from and wrote to
	CfgStore store.Driver
)

Functions

func AddMissedKey added in v1.5.2

func AddMissedKey(cfg map[string]interface{})

AddMissedKey ... If the configure key is missing in the cfg map, add default value to it

func GetDatabaseFromCfg

func GetDatabaseFromCfg(cfg map[string]interface{}) *models.Database

GetDatabaseFromCfg Create database object from config

func Init

func Init() (err error)

Init system configurations. If env RESET is set or configurations read from storage driver is null, load all configurations from env

func LoadFromEnv

func LoadFromEnv(cfgs map[string]interface{}, all bool) error

LoadFromEnv loads the configurations from allEnvs, if all is false, it just loads the repeatLoadEnvs and the env which is absent in cfgs

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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