Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfigWithPath ¶
Types ¶
type BaseConfig ¶
type BaseConfig struct { Debug bool `mapstructure:"debug,omitempty"` // debug, default false Domain string `mapstructure:"domain,omitempty"` // domain=127.0.0.1:8090 Databases []DatabaseConfig `mapstructure:"databases,omitempty"` // databases Caches []CacheConfig `mapstructure:"caches,omitempty"` // caches MemoryCache MemoryCacheConfig `mapstructure:"memoryCache,omitempty"` // caches }
func GetBaseConfig ¶
func GetBaseConfig() *BaseConfig
type CacheConfig ¶
type CacheConfig struct { Alias string `mapstructure:"alias"` // alias=forum Section string `mapstructure:"section"` // section=forum Adapter string `mapstructure:"adapter"` // adapter=redis Host string `mapstructure:"host"` // host=127.0.0.1 Port int `mapstructure:"port"` // port=6379 Password string `mapstructure:"password"` // password=123456 DB int `mapstructure:"db"` // db, select db }
type DatabaseConfig ¶
type DatabaseConfig struct { Alias string `mapstructure:"alias"` // alias=forum Dialect string `mapstructure:"dialect"` // dialect=mysql Host string `mapstructure:"host"` // host=127.0.0.1 Port int `mapstructure:"port"` // port=3306 DbName string `mapstructure:"dbName"` // name=forum Username string `mapstructure:"username"` // username=root Password string `mapstructure:"password"` // password=123456 MaxIdleConns int `mapstructure:"maxIdleConns"` // maxIdleConns MaxOpenConns int `mapstructure:"maxOpenConns"` // maxOpenConns }
type MemoryCacheConfig ¶
Click to show internal directories.
Click to hide internal directories.