diff options
Diffstat (limited to 'echo')
-rw-r--r-- | echo/interfaces.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/echo/interfaces.go b/echo/interfaces.go new file mode 100644 index 0000000..f3380c6 --- /dev/null +++ b/echo/interfaces.go | |||
@@ -0,0 +1,20 @@ | |||
1 | package echo | ||
2 | |||
3 | import ( | ||
4 | "github.com/labstack/echo/v4" | ||
5 | ) | ||
6 | |||
7 | // URLRouter is an interface that identifies the core traits of a URL router. | ||
8 | // This mainly exists to work around the fact that our server is actually a | ||
9 | // golib.EchoWrapper and not an echo.Echo. | ||
10 | type URLRouter interface { | ||
11 | DELETE(string, echo.HandlerFunc, ...echo.MiddlewareFunc) *echo.Route | ||
12 | GET(string, echo.HandlerFunc, ...echo.MiddlewareFunc) *echo.Route | ||
13 | HEAD(string, echo.HandlerFunc, ...echo.MiddlewareFunc) *echo.Route | ||
14 | OPTIONS(string, echo.HandlerFunc, ...echo.MiddlewareFunc) *echo.Route | ||
15 | PATCH(string, echo.HandlerFunc, ...echo.MiddlewareFunc) *echo.Route | ||
16 | POST(string, echo.HandlerFunc, ...echo.MiddlewareFunc) *echo.Route | ||
17 | PUT(string, echo.HandlerFunc, ...echo.MiddlewareFunc) *echo.Route | ||
18 | Group(string, ...echo.MiddlewareFunc) *echo.Group | ||
19 | Add(string, string, echo.HandlerFunc, ...echo.MiddlewareFunc) *echo.Route | ||
20 | } | ||