Documentation ¶
Index ¶
- func GetConnURL(info *DBConfigInfo) (url string)
- func ParseConfig(fpath string, conf *GatewayMainConfig) error
- type AppConfig
- type Cache
- type DB
- type DBConfigInfo
- type DBEngines
- type DbConfig
- type Etcd
- type GatewayMainConfig
- type GatewayWebConfig
- type GatewayWebConfigRefKey
- type IrisConfig
- type Jobs
- type LogConfig
- type Other
- type RedisConfig
- type Registry
- type ServerRefKey
- type TomlConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConnURL ¶
func GetConnURL(info *DBConfigInfo) (url string)
Types ¶
type DB ¶
type DB struct { Master DBConfigInfo Slave DBConfigInfo }
type DBConfigInfo ¶
type DBConfigInfo struct { Dialect string `toml:"dialect"` User string `toml:"user"` Password string `toml:"password"` Host string `toml:"host"` Port int `toml:"port"` Database string `toml:"database"` Charset string `toml:"charset"` ShowSql bool `toml:"showSql"` LogLevel string `toml:"logLevel"` MaxOpenConns int `toml:"maxOpenConns"` MaxIdleConns int `toml:"maxIdleConns"` //ParseTime bool `toml:"parseTime"` //MaxIdleConns int `toml:"maxIdleConns"` //MaxOpenConns int `toml:"maxOpenConns"` ConnMaxLifetime int64 `toml:"connMaxLifetime"` }
type DBEngines ¶
type DBEngines struct { DbMasterConfigInfo *DBConfigInfo DbSlaveConfigInfo *DBConfigInfo // contains filtered or unexported fields }
type GatewayMainConfig ¶
type GatewayMainConfig struct {
GatewayWebConfig GatewayWebConfig `toml:"gateway"`
}
type GatewayWebConfig ¶
type GatewayWebConfig struct { Addr string `toml:"addr"` IrisLogFile bool `toml:"irisLogFile"` LogLevel string `toml:"loglevel"` IrisConfig IrisConfig `toml:"irisconfig"` Other Other `toml:"other"` }
Config 配置参数
type GatewayWebConfigRefKey ¶
type GatewayWebConfigRefKey struct{}
type IrisConfig ¶
type IrisConfig struct { DisablePathCorrection bool `toml:"DisablePathCorrection"` EnablePathEscape bool `toml:"EnablePathEscape"` FireMethodNotAllowed bool `toml:"FireMethodNotAllowed"` DisableBodyConsumptionOnUnmarshal bool `toml:"DisableBodyConsumptionOnUnmarshal"` TimeFormat string `toml:"TimeFormat"` Charset string `toml:"Charset"` }
func (*IrisConfig) ConvertIrisConfig ¶
func (conf *IrisConfig) ConvertIrisConfig() (iconf iris.Configuration)
type LogConfig ¶
type LogConfig struct { OutPut string `toml:"outPut"` Dir string `toml:"dir"` TestDir string `toml:"testDir"` FileName string `toml:"fileName"` // 文件最大保存时间 MaxAge string `toml:"maxAge"` // = "24h" // 日志切割时间间隔 RotationTime string `toml:"rotationTime"` // = "1h" Format string `toml:"format"` Level string `toml:"level"` //= "debug" }
type Other ¶
type Other struct { Port int `toml:"Port"` IgnoreURLs []string `toml:"IgnoreURLs"` JWTTimeout int `toml:"JWTTimeout"` LogLevel string `toml:"LogLevel"` Secret string `toml:"Secret"` }
func (*Other) ConvertOtherToMap ¶
type RedisConfig ¶
type ServerRefKey ¶
type ServerRefKey struct{}
type TomlConfig ¶
Click to show internal directories.
Click to hide internal directories.