Documentation ¶
Index ¶
- Constants
- func Bool(k string) bool
- func Config() *viper.Viper
- func DefaultObject(k string, def interface{}) interface{}
- func Env() string
- func Float(k string) float64
- func Int(k string) int
- func IntSlice(k string) []int
- func Logger() *logrus.Logger
- func Object(k string) interface{}
- func String(k string) string
- func StringMap(k string) map[string]interface{}
- func StringMapString(k string) map[string]string
- func StringMapStringSlice(k string) map[string][]string
- func StringSlice(k string) []string
- type ConfigDefault
- type ConfigLog
- type ConfigRdbms
- type ConfigRedis
- type ConfigSys
- type ConfigToken
- type LineFormatter
Constants ¶
View Source
const ( DEV = "dev" STG = "stg" PRD = "prd" )
Variables ¶
This section is empty.
Functions ¶
func DefaultObject ¶
func DefaultObject(k string, def interface{}) interface{}
func StringMapString ¶
func StringMapStringSlice ¶
func StringSlice ¶
Types ¶
type ConfigDefault ¶ added in v0.1.14
type ConfigDefault struct { Sys ConfigSys `toml:"sys"` Log ConfigLog `toml:"log"` Token ConfigToken `toml:"token"` Rdbms ConfigRdbms `toml:"rdbms"` Redis ConfigRedis `toml:"redis"` }
ConfigDefault default config
func NewConfigDefault ¶ added in v0.1.14
func NewConfigDefault() *ConfigDefault
type ConfigRdbms ¶ added in v0.1.17
type ConfigRedis ¶ added in v0.1.17
type ConfigToken ¶ added in v0.1.17
type LineFormatter ¶
type LineFormatter struct {
TimestampFormat string //2006/01/02 15:04:05.000
}
Click to show internal directories.
Click to hide internal directories.