diff options
Diffstat (limited to 'pkg/handler/handler.go')
-rw-r--r-- | pkg/handler/handler.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/handler/handler.go b/pkg/handler/handler.go new file mode 100644 index 0000000..15eb42d --- /dev/null +++ b/pkg/handler/handler.go @@ -0,0 +1,15 @@ +package handler + +import "github.com/labstack/echo/v4" + +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)) + } +} |