mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
27 lines
852 B
Go
27 lines
852 B
Go
package kandangs
|
|
|
|
import (
|
|
"github.com/go-playground/validator/v10"
|
|
"github.com/gofiber/fiber/v2"
|
|
"gorm.io/gorm"
|
|
|
|
rKandang "gitlab.com/mbugroup/lti-api.git/internal/modules/master/kandangs/repositories"
|
|
sKandang "gitlab.com/mbugroup/lti-api.git/internal/modules/master/kandangs/services"
|
|
|
|
rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
|
|
sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
|
)
|
|
|
|
type KandangModule struct{}
|
|
|
|
func (KandangModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
|
|
kandangRepo := rKandang.NewKandangRepository(db)
|
|
userRepo := rUser.NewUserRepository(db)
|
|
|
|
kandangService := sKandang.NewKandangService(kandangRepo, validate)
|
|
userService := sUser.NewUserService(userRepo, validate)
|
|
|
|
KandangRoutes(router, userService, kandangService)
|
|
}
|
|
|