add games operations

This commit is contained in:
2026-07-26 22:38:33 +07:00
parent cf32a6114f
commit 6fc19833d3
24 changed files with 2430 additions and 96 deletions
+12
View File
@@ -8,10 +8,13 @@ import (
"evening_detective_server/internal/modules/file_storage"
"evening_detective_server/internal/modules/password_generator"
"evening_detective_server/internal/modules/processor_jwt"
"evening_detective_server/internal/repos/games_repo"
"evening_detective_server/internal/repos/refresh_tokens_repo"
"evening_detective_server/internal/repos/scenarios_repo"
"evening_detective_server/internal/repos/teams_repo"
"evening_detective_server/internal/repos/users_repo"
"evening_detective_server/internal/services/file_service"
"evening_detective_server/internal/services/game_service"
"evening_detective_server/internal/services/scenarios_service"
"evening_detective_server/internal/services/ui_service"
"evening_detective_server/internal/services/users_service"
@@ -76,6 +79,14 @@ func main() {
scenariosRepo,
os.Getenv("FILE_PREFIX_DOMAIN"),
)
gameRepo := games_repo.NewGamesRepo(dbpool)
teamRepo := teams_repo.NewTeamsRepo(dbpool)
gameService := game_service.NewGameService(
gameRepo,
teamRepo,
scenariosRepo,
os.Getenv("FILE_PREFIX_DOMAIN"),
)
// Create a listener on TCP port
lis, err := net.Listen("tcp", ":8080")
@@ -110,6 +121,7 @@ func main() {
uiService,
fileService,
scenarioService,
gameService,
),
)