aboutsummaryrefslogtreecommitdiff
path: root/pkg/handler/handler.go
blob: 15eb42d18aaf56b0cbbb0e78f0f498b220d4bf5a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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))
	}
}