mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-20 19:38:39 +00:00
feat: Use databaseBackend config repace databaseEtcd
databaseBackend config contains type and url sub config, It can facilitate the expansion of other types of databases in the future.
This commit is contained in:
@@ -41,6 +41,14 @@ type ConfigStructure struct { // nolint: maligned
|
||||
LogFormat string `json:"logFormat"`
|
||||
ServeInAPIMode bool `json:"serveInAPIMode"`
|
||||
DatabaseEtcd string `json:"databaseEtcd"`
|
||||
DatabaseBackend DBConfig `json:"databaseBackend"`
|
||||
}
|
||||
|
||||
// DBConfig
|
||||
type DBConfig struct {
|
||||
Type string `json:"type"`
|
||||
URL string `json:"url"`
|
||||
DbPath string `json:"dbPath"`
|
||||
}
|
||||
|
||||
type LocalPoolStorage struct {
|
||||
|
||||
@@ -144,7 +144,11 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
|
||||
" \"logLevel\": \"info\",\n"+
|
||||
" \"logFormat\": \"json\",\n"+
|
||||
" \"serveInAPIMode\": false,\n"+
|
||||
" \"databaseEtcd\": \"\"\n"+
|
||||
" \"databaseEtcd\": \"\",\n"+
|
||||
" \"databaseBackend\": {\n"+
|
||||
" \"type\": \"\",\n"+
|
||||
" \"url\": \"\"\n"+
|
||||
" }\n"+
|
||||
"}")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user