added auth service to go backend

This commit is contained in:
2025-01-03 20:45:39 +00:00
parent 98fb6942fe
commit d0d88de15c
10 changed files with 297 additions and 9 deletions
+3 -1
View File
@@ -28,15 +28,17 @@ func main() {
projectRepo := repository.NewProjectRepository(database.Projects())
projectTaskRepo := repository.NewProjectTaskRepository(database.ProjectTasks())
timeEntryRepo := repository.NewTimeEntryRepository(database.TimeEntries())
authRepo := repository.NewInMemoryAuthRepository("secret")
// Initialize services
userService := services.NewUserService(userRepo)
projectService := services.NewProjectService(projectRepo)
projectTaskService := services.NewProjectTaskService(projectTaskRepo)
timeEntryService := services.NewTimeEntryService(timeEntryRepo)
authService := services.NewAuthService(authRepo, userRepo)
// Initialize and start the server
server := http.NewServer(cfg, userService, projectService, projectTaskService, timeEntryService)
server := http.NewServer(cfg, userService, projectService, projectTaskService, timeEntryService, authService)
fmt.Println("Starting ActaTempus server on port 8080...")
if err := server.Start(); err != nil {