-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
26 lines (20 loc) · 778 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main
import (
"github.com/GerardSoleCa/PubKeyManager/infrastructure"
"github.com/GerardSoleCa/PubKeyManager/interfaces"
"github.com/GerardSoleCa/PubKeyManager/server"
"github.com/GerardSoleCa/PubKeyManager/usecases"
)
func main() {
config := infrastructure.LoadConfigurations()
dbHandler := infrastructure.NewSqliteHandler("PubKeyManager.db", config.DbPassword)
keyInteractor := new(usecases.KeyInteractor)
keyInteractor.KeyRepository = interfaces.NewDbKeyRepository(dbHandler)
userInteractor := new(usecases.UserInteractor)
userInteractor.UserRepository = interfaces.NewDbUserRepository(dbHandler)
server := &server.Server{}
server.KeyInteractor = keyInteractor
server.UserInteractor = userInteractor
server.Configuration = config
server.Start()
}