feat: Multi-DB Driver

This commit is contained in:
tbphp
2025-07-17 18:15:46 +08:00
parent 068e63137e
commit 9575608fa7
13 changed files with 253 additions and 155 deletions

View File

@@ -95,10 +95,10 @@ func (m *Manager) ReloadConfig() error {
Level: utils.GetEnvOrDefault("LOG_LEVEL", "info"),
Format: utils.GetEnvOrDefault("LOG_FORMAT", "text"),
EnableFile: utils.ParseBoolean(os.Getenv("LOG_ENABLE_FILE"), false),
FilePath: utils.GetEnvOrDefault("LOG_FILE_PATH", "logs/app.log"),
FilePath: utils.GetEnvOrDefault("LOG_FILE_PATH", "./data/logs/app.log"),
},
Database: types.DatabaseConfig{
DSN: os.Getenv("DATABASE_DSN"),
DSN: utils.GetEnvOrDefault("DATABASE_DSN", "./data/gpt-load.db"),
},
RedisDSN: os.Getenv("REDIS_DSN"),
}