feat: 添加认证、日志、响应等基础中间件与服务
This commit is contained in:
1 parent
16a9f64109
commit
329a22f0b1
30 files changed
+1835
-12
No files matched your search
@@ -12,6 +12,7 @@ type Config struct {
|
||||
Database DatabaseConfig `mapstructure:"database" yaml:"database"`
|
||||
Logger LoggerConfig `mapstructure:"logger" yaml:"logger"`
|
||||
Jwt JwtConfig `mapstructure:"logger" yaml:"jwt"`
|
||||
Redis RedisConfig `mapstructure:"redis" yaml:"redis"`
|
||||
}
|
||||
|
||||
// LoadConfig 读取并解析配置文件
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package conf
|
||||
|
||||
type RedisConfig struct {
|
||||
Addr string `mapstructure:"addr" yaml:"addr"`
|
||||
Password string `mapstructure:"password" yaml:"password"`
|
||||
Db int `mapstructure:"db" yaml:"db"`
|
||||
}
|
||||
Reference in new issue
Block a user