quick implementation of middleware

This commit is contained in:
luke.rodham
2018-03-12 10:08:30 +00:00
parent 6740568afb
commit 1e787689aa
12 changed files with 187 additions and 84 deletions

View File

@@ -5,9 +5,6 @@ import "net/http"
type Handler func(Context) error
type Router interface {
Prefix(path string)
SetEnv(env string)
GET(path string, h Handler)
POST(path string, h Handler)
Static(path string, root http.FileSystem)
@@ -15,4 +12,5 @@ type Router interface {
GetRoutes() []*Route
GetStaticRoutes() []*StaticRoute
GetOptions() *RouterOptions
}