niki/patientapp/delivery/http/analytic/router.go

23 lines
573 B
Go

package analytic
import (
repo "git.gocasts.ir/ebhomengo/niki/patientapp/repository/mysql"
analytic2 "git.gocasts.ir/ebhomengo/niki/patientapp/service/analytic"
"git.gocasts.ir/ebhomengo/niki/repository/mysql"
"github.com/labstack/echo/v4"
)
func NewPatientAnalyticRouter(s *echo.Group, db *mysql.DB) {
mysqlRepo := repo.NewPatientRepo(db)
analyticService := analytic2.NewPatientAnalyticService(mysqlRepo)
h := NewHandler(analyticService)
s.GET("/patients", h.PatientsAnalytic)
s.GET("/patients-summary", h.PatientsMapSummary)
s.GET("/health", h.Health)
}