@@ -15,6 +15,7 @@ import (
1515 "github.com/maniac-en/req/internal/app"
1616 "github.com/maniac-en/req/internal/collections"
1717 "github.com/maniac-en/req/internal/database"
18+ "github.com/maniac-en/req/internal/endpoints"
1819 "github.com/maniac-en/req/internal/history"
1920 "github.com/maniac-en/req/internal/http"
2021 "github.com/maniac-en/req/internal/log"
3839type Config struct {
3940 DB * database.Queries
4041 Collections * collections.CollectionsManager
42+ Endpoints * endpoints.EndpointsManager
4143 HTTP * http.HTTPManager
4244 History * history.HistoryManager
43- // TODO: Add Endpoints *endpoints.EndpointsManager when endpoints package is refactored
4445}
4546
4647func initPaths () error {
@@ -134,18 +135,20 @@ func main() {
134135 // create database client and managers
135136 db := database .New (DB )
136137 collectionsManager := collections .NewCollectionsManager (db )
138+ endpointsManager := endpoints .NewEndpointsManager (db )
137139 httpManager := http .NewHTTPManager ()
138140 historyManager := history .NewHistoryManager (db )
139141
140142 config := & Config {
141143 DB : db ,
142144 Collections : collectionsManager ,
145+ Endpoints : endpointsManager ,
143146 HTTP : httpManager ,
144147 History : historyManager ,
145148 }
146149
147- log .Info ("application initialized" , "components" , []string {"database" , "collections" , "http" , "history" , "logging" })
148- log .Debug ("configuration loaded" , "collections_manager" , config .Collections != nil , "database" , config .DB != nil , "http_manager" , config .HTTP != nil , "history_manager" , config .History != nil )
150+ log .Info ("application initialized" , "components" , []string {"database" , "collections" , "endpoints" , " http" , "history" , "logging" })
151+ log .Debug ("configuration loaded" , "collections_manager" , config .Collections != nil , "endpoints" , config . Endpoints != nil , " database" , config .DB != nil , "http_manager" , config .HTTP != nil , "history_manager" , config .History != nil )
149152 log .Info ("application started successfully" )
150153
151154 // Entry point for UI
0 commit comments