fix: use redis config

This commit is contained in:
ericprd
2025-03-06 13:30:24 +08:00
parent cf410bdf05
commit a2a6fe6374
3 changed files with 22 additions and 5 deletions
+1
View File
@@ -28,6 +28,7 @@ type Config struct {
Database Database `mapstructure:"postgresql"`
Jwt Jwt `mapstructure:"jwt"`
OSSConfig OSSConfig `mapstructure:"oss"`
Redis Redis `mapstructure:"redis"`
}
var (
+14
View File
@@ -0,0 +1,14 @@
package config
type Redis struct {
Host string `mapstructure:"host"`
Port string `mapstructure:"port"`
DB int `mapstructure:"db"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
SslMode string `mapstructure:"ssl-mode"`
Debug bool `mapstructure:"debug"`
MaxIdleConnectionsInSecond int `mapstructure:"max-idle-connections-in-second"`
MaxOpenConnectionsInSecond int `mapstructure:"max-open-connections-in-second"`
ConnectionMaxLifetimeInSecond int64 `mapstructure:"connection-max-life-time-in-second"`
}