2024-10-06 17:04:37 +03:00
|
|
|
package handler
|
|
|
|
|
2024-10-08 03:43:08 +03:00
|
|
|
import "github.com/labstack/echo/v4"
|
2024-10-06 17:04:37 +03:00
|
|
|
|
2024-10-08 03:43:08 +03:00
|
|
|
type Handler interface {
|
|
|
|
Register(g *echo.Group)
|
|
|
|
}
|
|
|
|
|
|
|
|
type Router map[string]Handler
|
|
|
|
|
|
|
|
func (r Router) Register(e *echo.Echo) {
|
|
|
|
for groupName, handlers := range r {
|
|
|
|
handlers.Register(e.Group(groupName))
|
|
|
|
}
|
2024-10-06 17:04:37 +03:00
|
|
|
}
|