This commit is contained in:
oneao committed 2026-01-26 22:31:12 +08:00
1 parent 5a79414319
commit 8663cb2e3d
28 files changed
+744 -756

No files matched your search

+8
View File
@@ -23,6 +23,7 @@ type Config struct {
Pgsql PgsqlConfig `mapstructure:"pgsql" yaml:"pgsql"`
Log LogConfig `mapstructure:"log" yaml:"log"`
Wx WxConfig `mapstructure:"wx" yaml:"wx"`
Redis RedisConfig `mapstructure:"redis" yaml:"redis"`
}
type ServerConfig struct {
@@ -67,6 +68,13 @@ type WxConfig struct {
AppSecret string `mapstructure:"app_secret" yaml:"app_secret"`
}
type RedisConfig struct {
Host string `mapstructure:"host" yaml:"host"`
Port int `mapstructure:"port" yaml:"port"`
Db int `mapstructure:"db" yaml:"db"`
Password string `mapstructure:"password" yaml:"password"`
}
func GetConf() *Config {
once.Do(initConf)
return conf
+7
View File
@@ -22,6 +22,12 @@ pgsql:
conn_max_lifetime: 30m
sll_mode: false
redis:
host: 117.72.182.135
port: 6379
password: zhang520..
db: 0
log:
level: "debug"
dir: "./logs"
@@ -33,3 +39,4 @@ log:
wx:
app_id: wxdab3e21a1f7e392f
app_secret: 0895443c6fedfc21cb92c9cd60de2a26