@@ -13,6 +13,7 @@ import (
1313
1414 "github.com/maniac-en/req/internal/collections"
1515 "github.com/maniac-en/req/internal/database"
16+ "github.com/maniac-en/req/internal/history"
1617 "github.com/maniac-en/req/internal/http"
1718 "github.com/maniac-en/req/internal/log"
1819 _ "github.com/mattn/go-sqlite3"
@@ -36,6 +37,7 @@ type Config struct {
3637 DB * database.Queries
3738 Collections * collections.CollectionsManager
3839 HTTP * http.HTTPManager
40+ History * history.HistoryManager
3941}
4042
4143func initPaths () error {
@@ -130,14 +132,16 @@ func main() {
130132 db := database .New (DB )
131133 collectionsManager := collections .NewCollectionsManager (db )
132134 httpManager := http .NewHTTPManager ()
135+ historyManager := history .NewHistoryManager (db )
133136
134137 config := & Config {
135138 DB : db ,
136139 Collections : collectionsManager ,
137140 HTTP : httpManager ,
141+ History : historyManager ,
138142 }
139143
140- log .Info ("application initialized" , "components" , []string {"database" , "collections" , "http" , "logging" })
141- log .Debug ("configuration loaded" , "collections_manager" , config .Collections != nil , "database" , config .DB != nil , "http_manager" , config .HTTP != nil )
144+ log .Info ("application initialized" , "components" , []string {"database" , "collections" , "http" , "history" , " logging" })
145+ log .Debug ("configuration loaded" , "collections_manager" , config .Collections != nil , "database" , config .DB != nil , "http_manager" , config .HTTP != nil , "history_manager" , config . History != nil )
142146 log .Info ("application started successfully" )
143147}
0 commit comments