mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
30 lines
1.1 KiB
Go
30 lines
1.1 KiB
Go
package dashboards
|
|
|
|
import (
|
|
"github.com/go-playground/validator/v10"
|
|
"github.com/gofiber/fiber/v2"
|
|
"gorm.io/gorm"
|
|
|
|
commonRepo "gitlab.com/mbugroup/lti-api.git/internal/common/repository"
|
|
commonService "gitlab.com/mbugroup/lti-api.git/internal/common/service"
|
|
rDashboard "gitlab.com/mbugroup/lti-api.git/internal/modules/dashboards/repositories"
|
|
sDashboard "gitlab.com/mbugroup/lti-api.git/internal/modules/dashboards/services"
|
|
|
|
rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
|
|
sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
|
)
|
|
|
|
type DashboardModule struct{}
|
|
|
|
func (DashboardModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
|
|
dashboardRepo := rDashboard.NewDashboardRepository(db)
|
|
hppV2CostRepo := commonRepo.NewHppV2CostRepository(db)
|
|
userRepo := rUser.NewUserRepository(db)
|
|
|
|
hppV2Svc := commonService.NewHppV2Service(hppV2CostRepo)
|
|
dashboardService := sDashboard.NewDashboardService(dashboardRepo, validate, hppV2Svc)
|
|
userService := sUser.NewUserService(userRepo, validate)
|
|
|
|
DashboardRoutes(router, userService, dashboardService)
|
|
}
|