32 lines
593 B
Go
32 lines
593 B
Go
package handlers
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"gitea.d3m0k1d.ru/d3m0k1d/rostpoliplast/backend/internal/mq"
|
|
"gitea.d3m0k1d.ru/d3m0k1d/rostpoliplast/backend/internal/storage"
|
|
)
|
|
|
|
type Handlers struct {
|
|
Repo *storage.Repository
|
|
MQ *mq.RabbitMQ
|
|
}
|
|
|
|
func (h *Handlers) RegisterRoutes(r *gin.RouterGroup) {
|
|
baleHandlers := &BaleHandlers{
|
|
Repo: h.Repo,
|
|
MQ: h.MQ,
|
|
}
|
|
baleHandlers.RegisterRoutes(r)
|
|
|
|
baleTypeHandlers := &BaleTypeHandlers{
|
|
Repo: h.Repo,
|
|
}
|
|
baleTypeHandlers.RegisterRoutes(r)
|
|
|
|
queueHandlers := &QueueHandlers{
|
|
MQ: h.MQ,
|
|
}
|
|
queueHandlers.RegisterRoutes(r)
|
|
}
|