Improve core module to take care of dir structures and db init
This commit is contained in:
@@ -2,21 +2,12 @@ package core
|
||||
|
||||
import (
|
||||
"github.com/safing/portbase/database"
|
||||
"github.com/safing/portbase/modules"
|
||||
"github.com/safing/portbase/notifications"
|
||||
|
||||
// module dependencies
|
||||
_ "github.com/safing/portbase/database/dbmodule"
|
||||
_ "github.com/safing/portbase/database/storage/bbolt"
|
||||
)
|
||||
|
||||
func init() {
|
||||
modules.Register("core", nil, start, nil, "database")
|
||||
|
||||
notifications.SetPersistenceBasePath("core:notifications")
|
||||
}
|
||||
|
||||
func start() error {
|
||||
func registerDatabases() error {
|
||||
_, err := database.Register(&database.Database{
|
||||
Name: "core",
|
||||
Description: "Holds core data, such as settings and profiles",
|
||||
|
||||
Reference in New Issue
Block a user