working commit

This commit is contained in:
2026-06-05 18:35:25 +02:00
parent 16c52424ed
commit 557aea269d
13 changed files with 82 additions and 73 deletions
+5 -5
View File
@@ -15,8 +15,8 @@ import (
"time"
"mbase/app/config"
"mbase/app/database"
"mbase/app/descriptor"
"mbase/app/maindb"
"mbase/app/descr"
"mbase/app/logic"
"sigs.k8s.io/yaml"
@@ -61,8 +61,8 @@ type Util struct {
conf *config.Config
lg *logic.Logic
db *database.Database
state descriptor.Server
db *maindb.Database
state descr.Server
sfile string
accessUsername string
@@ -287,7 +287,7 @@ func (util *Util) Build() error {
util.sfile = filepath.Join(util.conf.DataDir, "certmanager.yaml")
db, err := database.NewDatabase(util.conf.DataDir)
db, err := maindb.NewDatabase(util.conf.DataDir)
if err != nil {
return err
}
+6 -6
View File
@@ -11,8 +11,8 @@ import (
"path/filepath"
"mbase/app/config"
"mbase/app/database"
"mbase/app/descriptor"
"mbase/app/maindb"
"mbase/app/descr"
"mbase/pkg/auxtool"
"mbase/pkg/logger"
@@ -97,7 +97,7 @@ func (util *Util) dumpDatabase(params dumpDatabaseParams) (dumpDatabaseResult, e
if err != nil {
return res, err
}
db, err := database.NewDatabase(conf.DataDir)
db, err := maindb.NewDatabase(conf.DataDir)
if err != nil {
return res, err
}
@@ -121,7 +121,7 @@ func (util *Util) dumpDatabase(params dumpDatabaseParams) (dumpDatabaseResult, e
if err != nil {
return res, err
}
dump := descriptor.Dump{
dump := descr.Dump{
Timestamp: auxtool.TimeNow(),
Accounts: listAccounts,
Grants: listGrants,
@@ -165,7 +165,7 @@ func (util *Util) restoreDatabase(params restoreDatabaseParams) (restoreDatabase
return res, err
}
db, err := database.NewDatabase(conf.DataDir)
db, err := maindb.NewDatabase(conf.DataDir)
if err != nil {
return res, err
}
@@ -186,7 +186,7 @@ func (util *Util) restoreDatabase(params restoreDatabaseParams) (restoreDatabase
if err != nil {
return res, err
}
dump := descriptor.Dump{}
dump := descr.Dump{}
err = yaml.Unmarshal(buffer.Bytes(), &dump)
if err != nil {
return res, err