feat: Add PostgreSQL support and refactor MySQL DSN handling (#284)

This commit is contained in:
lejianwen
2025-06-16 12:26:08 +08:00
parent ca068816ae
commit 60b7a18fe7
8 changed files with 142 additions and 39 deletions
+15 -14
View File
@@ -32,20 +32,21 @@ type Admin struct {
RelayServerPort int `mapstructure:"relay-server-port"`
}
type Config struct {
Lang string `mapstructure:"lang"`
App App
Admin Admin
Gorm Gorm
Mysql Mysql
Gin Gin
Logger Logger
Redis Redis
Cache Cache
Oss Oss
Jwt Jwt
Rustdesk Rustdesk
Proxy Proxy
Ldap Ldap
Lang string `mapstructure:"lang"`
App App
Admin Admin
Gorm Gorm
Mysql Mysql
Postgresql Postgresql
Gin Gin
Logger Logger
Redis Redis
Cache Cache
Oss Oss
Jwt Jwt
Rustdesk Rustdesk
Proxy Proxy
Ldap Ldap
}
func (a *Admin) Init() {