-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.go
More file actions
25 lines (22 loc) · 858 Bytes
/
interface.go
File metadata and controls
25 lines (22 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package gRouter
import "net/http"
type IRouter interface {
Use(handler ...HandlerFunc) IRouter
Handle(method, relativePath string, handlers ...HandlerFunc)
POST(relativePath string, handlers ...HandlerFunc)
GET(relativePath string, handlers ...HandlerFunc)
HEAD(relativePath string, handlers ...HandlerFunc)
PUT(relativePath string, handlers ...HandlerFunc)
OPTIONS(relativePath string, handlers ...HandlerFunc)
PATCH(relativePath string, handlers ...HandlerFunc)
DELETE(relativePath string, handlers ...HandlerFunc)
CONNECT(relativePath string, handlers ...HandlerFunc)
TRACE(relativePath string, handlers ...HandlerFunc)
ANY(relativePath string, handlers ...HandlerFunc)
}
type IEngine interface {
IRouter
ServeHTTP(w http.ResponseWriter, req *http.Request)
NewRouter(basePath string, handlers ...HandlerFunc) IRouter
SetLog(log ILog)
}