Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CfgType = "yaml" CfgName = "config" CfgDir = env.Get("app_cfg_home", "project_cfg_home", consts.EnvCfgHome) CfgPath = filepath.Join("configs", "config", "config.yaml") EnvPrefix = utils.FirstNotEmpty(env.Get("cfg_env_prefix", "app_env_prefix", "project_env_prefix", consts.EnvCfgPrefix), "lava") )
Functions ¶
Types ¶
type App ¶ added in v0.2.2
type Config ¶
type Config interface {
LoadPath(path string)
UnmarshalKey(key string, rawVal interface{}, opts ...DecoderOption) error
Decode(name string, cfgMap interface{}) error
Get(key string) interface{}
Set(string, interface{})
GetString(key string) string
GetMap(keys ...string) CfgMap
AllKeys() []string
MergeConfig(in io.Reader) error
All() map[string]interface{}
}
type DecoderOption ¶ added in v0.2.4
type DecoderOption = viper.DecoderConfigOption
Click to show internal directories.
Click to hide internal directories.