mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 13:22:26 +03:00
Rename packages under /auth (#114)
Previously, all database stuff was under the helpfully named package 'storage'. However, this convention is used throughout all of dendrite, which will clash the moment we want to add auth to all the CS API endpoints. To prevent the package name clash, add sub-directories which represent what is being stored so the final usage ends up being: ``` func doThing(db *storage.SyncServerDatabase, authDB *accounts.Database) { // ... } ```
This commit is contained in:
parent
0325459e7f
commit
d63a1ddc7c
6 changed files with 60 additions and 12 deletions
|
@ -19,7 +19,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/matrix-org/dendrite/clientapi/auth/storage"
|
||||
"github.com/matrix-org/dendrite/clientapi/auth/storage/accounts"
|
||||
"github.com/matrix-org/dendrite/clientapi/config"
|
||||
"github.com/matrix-org/dendrite/clientapi/producers"
|
||||
"github.com/matrix-org/dendrite/clientapi/routing"
|
||||
|
@ -81,7 +81,7 @@ func main() {
|
|||
}
|
||||
|
||||
queryAPI := api.NewRoomserverQueryAPIHTTP(cfg.RoomserverURL, nil)
|
||||
accountDB, err := storage.NewAccountDatabase(accountDataSource, serverName)
|
||||
accountDB, err := accounts.NewDatabase(accountDataSource, serverName)
|
||||
if err != nil {
|
||||
log.Panicf("Failed to setup account database(%s): %s", accountDataSource, err.Error())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue