6 Star 1 Fork 1

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

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config.go 2.05 KB
一键复制 编辑 原始数据 按行查看 历史
deiva 提交于 2025-03-21 13:38 +08:00 . #
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"`
RoleType string `mapstructure:"role_type"`
LoginServer string `mapstructure:"login_server"`
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"`
Cluster bool `mapstructure:"cluster"`
}
type AmqpConfig struct {
Host string `mapstructure:"host"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Prefix string `mapstructure:"prefix"`
Ssl bool `mapstructure:"ssl"`
}
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 RedisConfigs map[string]RedisConfig
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"`
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/sosotec/gwork.git
git@gitee.com:sosotec/gwork.git
sosotec
gwork
GO 应用开发框架
v1.0.7

搜索帮助