|
@@ -1,70 +1,70 @@
|
|
|
package config
|
|
|
|
|
|
type Server struct {
|
|
|
- Mysql Mysql `mapstructure:"mysql" json:"mysql"`
|
|
|
- Sqlite Sqlite `mapstructure:"sqlite" json:"sqlite"`
|
|
|
- Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu"`
|
|
|
- Casbin Casbin `mapstructure:"casbin" json:"casbin"`
|
|
|
- Redis Redis `mapstructure:"redis" json:"redis"`
|
|
|
- System System `mapstructure:"system" json:"system"`
|
|
|
- JWT JWT `mapstructure:"jwt" json:"jwt"`
|
|
|
- Captcha Captcha `mapstructure:"captcha" json:"captcha"`
|
|
|
- Log Log `mapstructure:"log" json:"log"`
|
|
|
+ Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"`
|
|
|
+ Sqlite Sqlite `mapstructure:"sqlite" json:"sqlite" yaml:"sqlite"`
|
|
|
+ Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu" yaml:"qiniu"`
|
|
|
+ Casbin Casbin `mapstructure:"casbin" json:"casbin" yaml:"casbin"`
|
|
|
+ Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"`
|
|
|
+ System System `mapstructure:"system" json:"system" yaml:"system"`
|
|
|
+ JWT JWT `mapstructure:"jwt" json:"jwt" yaml:"jwt"`
|
|
|
+ Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"`
|
|
|
+ Log Log `mapstructure:"log" json:"log" yaml:"log"`
|
|
|
}
|
|
|
|
|
|
type System struct {
|
|
|
- UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint"`
|
|
|
- Env string `mapstructure:"env" json:"env"`
|
|
|
- Addr int `mapstructure:"addr" json:"addr"`
|
|
|
- DbType string `mapstructure:"db-type" json:"dbType"`
|
|
|
+ UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"`
|
|
|
+ Env string `mapstructure:"env" json:"env" yaml:"env"`
|
|
|
+ Addr int `mapstructure:"addr" json:"addr" yaml:"addr"`
|
|
|
+ DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"`
|
|
|
}
|
|
|
|
|
|
type JWT struct {
|
|
|
- SigningKey string `mapstructure:"signing-key" json:"signingKey"`
|
|
|
+ SigningKey string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"`
|
|
|
}
|
|
|
|
|
|
type Casbin struct {
|
|
|
- ModelPath string `mapstructure:"model-path" json:"modelPath"`
|
|
|
+ ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"`
|
|
|
}
|
|
|
|
|
|
type Mysql struct {
|
|
|
- Username string `mapstructure:"username" json:"username"`
|
|
|
- Password string `mapstructure:"password" json:"password"`
|
|
|
- Path string `mapstructure:"path" json:"path"`
|
|
|
- Dbname string `mapstructure:"db-name" json:"dbname"`
|
|
|
- Config string `mapstructure:"config" json:"config"`
|
|
|
- MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns"`
|
|
|
- MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns"`
|
|
|
- LogMode bool `mapstructure:"log-mode" json:"logMode"`
|
|
|
+ Username string `mapstructure:"username" json:"username" yaml:"username"`
|
|
|
+ Password string `mapstructure:"password" json:"password" yaml:"password"`
|
|
|
+ Path string `mapstructure:"path" json:"path" yaml:"path"`
|
|
|
+ Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
|
|
|
+ Config string `mapstructure:"config" json:"config" yaml:"config"`
|
|
|
+ MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
|
|
|
+ MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
|
|
|
+ LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
|
|
|
}
|
|
|
|
|
|
type Redis struct {
|
|
|
- Addr string `mapstructure:"addr" json:"addr"`
|
|
|
- Password string `mapstructure:"password" json:"password"`
|
|
|
- DB int `mapstructure:"db" json:"db"`
|
|
|
+ Addr string `mapstructure:"addr" json:"addr" yaml:"addr"`
|
|
|
+ Password string `mapstructure:"password" json:"password" yaml:"password"`
|
|
|
+ DB int `mapstructure:"db" json:"db" yaml:"db"`
|
|
|
}
|
|
|
type Qiniu struct {
|
|
|
- AccessKey string `mapstructure:"access-key" json:"accessKey"`
|
|
|
- SecretKey string `mapstructure:"secret-key" json:"secretKey"`
|
|
|
+ AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`
|
|
|
+ SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
|
|
|
}
|
|
|
|
|
|
type Captcha struct {
|
|
|
- KeyLong int `mapstructure:"key-long" json:"keyLong"`
|
|
|
- ImgWidth int `mapstructure:"img-width" json:"imgWidth"`
|
|
|
- ImgHeight int `mapstructure:"img-height" json:"imgHeight"`
|
|
|
+ KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"`
|
|
|
+ ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"`
|
|
|
+ ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"`
|
|
|
}
|
|
|
|
|
|
type Log struct {
|
|
|
- Prefix string `mapstructure:"prefix" json:"prefix"`
|
|
|
- LogFile bool `mapstructure:"log-file" json:"logFile"`
|
|
|
- Stdout string `mapstructure:"stdout" json:"stdout"`
|
|
|
- File string `mapstructure:"file" json:"file"`
|
|
|
+ Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"`
|
|
|
+ LogFile bool `mapstructure:"log-file" json:"logFile" yaml:"log-file"`
|
|
|
+ Stdout string `mapstructure:"stdout" json:"stdout" yaml:"stdout"`
|
|
|
+ File string `mapstructure:"file" json:"file" yaml:"file"`
|
|
|
}
|
|
|
|
|
|
type Sqlite struct {
|
|
|
- Username string `mapstructure:"username" json:"username"`
|
|
|
- Password string `mapstructure:"password" json:"password"`
|
|
|
- Path string `mapstructure:"path" json:"path"`
|
|
|
- Config string `mapstructure:"config" json:"config"`
|
|
|
- LogMode bool `mapstructure:"log-mode" json:"logMode"`
|
|
|
+ Username string `mapstructure:"username" json:"username" yaml:"username"`
|
|
|
+ Password string `mapstructure:"password" json:"password" yaml:"password"`
|
|
|
+ Path string `mapstructure:"path" json:"path" yaml:"path"`
|
|
|
+ Config string `mapstructure:"config" json:"config" yaml:"config"`
|
|
|
+ LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
|
|
|
}
|