-
Notifications
You must be signed in to change notification settings - Fork 46
/
rest_router.go
19 lines (17 loc) · 1.13 KB
/
rest_router.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package interfaces
import "net/http"
// RESTRouter for REST routing abstraction
type RESTRouter interface {
Use(middlewares ...func(http.Handler) http.Handler)
Group(pattern string, middlewares ...func(http.Handler) http.Handler) RESTRouter
HandleFunc(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
CONNECT(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
DELETE(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
GET(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
HEAD(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
OPTIONS(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
PATCH(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
POST(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
PUT(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
TRACE(pattern string, h http.HandlerFunc, middlewares ...func(http.Handler) http.Handler)
}