Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶ added in v1.0.1
func InitConfig()
Types ¶
type Aliyun ¶ added in v1.0.1
type Aliyun struct {
AccessKeyID string `mapstructure:"accessKeyId"`
AccessKeySecret string `mapstructure:"accessKeySecret"`
Endpoint string `mapstructure:"endpoint"`
Bucket string `mapstructure:"bucket"`
}
Aliyun 阿里云配置
type Config ¶
type Config struct {
Pay Pay `mapstructure:"pay"`
Server Server `mapstructure:"server"`
Cache Cache `mapstructure:"cache"`
Upload Upload `mapstructure:"upload"`
Qiniu Qiniu `mapstructure:"qiniu"`
DB DB `mapstructure:"db"`
Auth Auth `mapstructure:"auth"`
Wx Wx `mapstructure:"wx"`
Jwt Jwt `mapstructure:"jwt"`
Log LogConfig `mapstructure:"log"`
}
type LogConfig ¶ added in v1.0.1
type LogConfig struct {
Level string `mapstructure:"level"`
Format string `mapstructure:"format"`
AddSource bool `mapstructure:"addSource"`
Filename string `mapstructure:"filename"`
MaxSize int `mapstructure:"maxSize"`
MaxAge int `mapstructure:"maxAge"`
MaxBackups int `mapstructure:"maxBackups"`
Output io.Writer `mapstructure:"output"`
}
type Mysql ¶
type Mysql struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
User string `mapstructure:"user"`
Password string `mapstructure:"password"`
Database string `mapstructure:"database"`
MaxIdleConns int `mapstructure:"maxIdleConns"`
PingTimeout time.Duration `mapstructure:"pingTimeout"`
MaxOpenConns int `mapstructure:"maxOpenConns"`
}
type Postgres ¶ added in v1.0.1
type Postgres struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
User string `mapstructure:"user"`
Password string `mapstructure:"password"`
Database string `mapstructure:"database"`
SSLMode string `mapstructure:"sslmode"`
MaxIdleConns int `mapstructure:"maxIdleConns"`
PingTimeout time.Duration `mapstructure:"pingTimeout"`
MaxOpenConns int `mapstructure:"maxOpenConns"`
}
type Redis ¶
type Redis struct {
Addr string `mapstructure:"addr"`
Password string `mapstructure:"password"`
DB int `mapstructure:"db"`
PoolSize int `mapstructure:"poolSize"`
IdleTimeout int `mapstructure:"idleTimeout"`
MaxOpenConns int `mapstructure:"maxOpenConns"`
MaxIdleConns int `mapstructure:"maxIdleConns"`
}
type Server ¶
type Server struct {
Port int `mapstructure:"port"`
Cros []string `mapstructure:"cros"`
AllowOrigins []string `mapstructure:"allowOrigins"`
Mode string `mapstructure:"mode"`
Name string `mapstructure:"name"`
Version string `mapstructure:"version"`
Host string `mapstructure:"host"`
ReadTimeout time.Duration `mapstructure:"readTimeout"`
WriteTimeout time.Duration `mapstructure:"writeTimeout"`
}
type WxPay ¶
type WxPay struct {
AppId string `mapstructure:"appId"`
MchId string `mapstructure:"mchId"` //商户证书的证书序列号
MchSerialNo string `mapstructure:"mchSerialNo"` //商户证书的证书序列号
ApiV3Key string `mapstructure:"apiV3Key"` //apiV3Key,商户平台获取
PrivateKey string `mapstructure:"privateKey"` //私钥 apiclient_key.pem 读取后的内容
AppSecret string `mapstructure:"appSecret"`
NotifyUrl string `mapstructure:"notifyUrl"`
MchCertPath string `mapstructure:"mchCertPath"`
MchKeyPath string `mapstructure:"mchKeyPath"`
}
Click to show internal directories.
Click to hide internal directories.