6 Star 1 Fork 0

深圳市格麦信息技术有限公司 / GO 应用开发框架

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
config.go 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
Deiva Liang 提交于 2022-09-01 12:09 . 修改命名
package config
var Amqp *AmqpConfig
var Redis *RedisConfig
var Server *ServerConfig
type SnowflakeConfig struct {
Node uint16 `mapstructure:"node"`
}
type ServerConfig struct {
Debug bool `mapstructure:"debug"`
Host string `mapstructure:"host"`
Secret string `mapstructure:"secret"`
Timezone int `mapstructure:"timezone"`
FileStorage string `mapstructure:"file_storage"`
FileDomain string `mapstructure:"file_domain"`
DefaultRouterText string `mapstructure:"default_router_text"`
}
type RedisConfig struct {
DB int `mapstructure:"db"`
Host string `mapstructure:"host"`
Password string `mapstructure:"password"`
Prefix string `mapstructure:"prefix"`
}
type AmqpConfig struct {
Host string `mapstructure:"host"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Prefix string `mapstructure:"prefix"`
}
type MySqlConfig struct {
Host string `mapstructure:"host"`
Config string `mapstructure:"config"`
DbName string `mapstructure:"dbname"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
MaxIdleConns int `mapstructure:"max_idle_conns"`
MaxOpenConns int `mapstructure:"max_open_conns"`
LogMode bool `mapstructure:"log_mode"`
LogZap string `mapstructure:"log_zap"`
}
type MySqlConfigs map[string]MySqlConfig
type WeiXinMcpConfig struct {
AppId string `mapstructure:"appid"`
Secret string `mapstructure:"secret"`
Token string `mapstructure:"token"`
}
type CosConfig struct {
AppId string `mapstructure:"appid"`
Bucket string `mapstructure:"bucket"`
Domain string `mapstructure:"domain"`
Region string `mapstructure:"region"`
SecretId string `mapstructure:"secret_id"`
SecretKey string `mapstructure:"secret_key"`
}
Go
1
https://gitee.com/sosotec/gwork.git
git@gitee.com:sosotec/gwork.git
sosotec
gwork
GO 应用开发框架
v1.0.0

搜索帮助