aboutsummaryrefslogtreecommitdiff
path: root/internal/conf/static.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/conf/static.go')
-rw-r--r--internal/conf/static.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/conf/static.go b/internal/conf/static.go
index c9fff1dc..80857f3a 100644
--- a/internal/conf/static.go
+++ b/internal/conf/static.go
@@ -123,6 +123,22 @@ var (
MaxFiles int
} `ini:"repository.upload"`
}
+
+ // Database settings
+ Database struct {
+ Type string
+ Host string
+ Name string
+ User string
+ Password string
+ SSLMode string `ini:"SSL_MODE"`
+ Path string
+
+ // Deprecated: Use Type instead, will be removed in 0.13.
+ DbType string
+ // Deprecated: Use Password instead, will be removed in 0.13.
+ Passwd string
+ }
)
// handleDeprecated transfers deprecated values to the new ones when set.
@@ -140,4 +156,13 @@ func handleDeprecated() {
Server.LandingURL = "/explore"
Server.LangdingPage = ""
}
+
+ if Database.DbType != "" {
+ Database.Type = Database.DbType
+ Database.DbType = ""
+ }
+ if Database.Passwd != "" {
+ Database.Password = Database.Passwd
+ Database.Passwd = ""
+ }
}