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 ConfigApp
- type ConfigDbs
- type ConfigDbsRdbms
- type ConfigDbsRedis
- type ConfigDefault
- type ConfigLog
- type ConfigNet
- 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 ConfigDbs ¶ added in v0.1.0
type ConfigDbs struct { Rdbms ConfigDbsRdbms `yaml:"rdbms"` Redis ConfigDbsRedis `yaml:"redis"` }
type ConfigDbsRdbms ¶ added in v0.1.0
type ConfigDbsRedis ¶ added in v0.1.0
type ConfigDefault ¶ added in v0.1.0
type ConfigDefault struct {
App ConfigApp `yaml:"app"`
}
func NewConfigDefault ¶ added in v0.1.0
func NewConfigDefault() *ConfigDefault
type LineFormatter ¶
type LineFormatter struct {
TimestampFormat string //2006/01/02 15:04:05.000
}
Click to show internal directories.
Click to hide internal directories.