Documentation ¶
Index ¶
- func GzipMiddleware(next http.HandlerFunc) http.HandlerFunc
- type CorsHandler
- type GZipResponseWriter
- type IRouter
- type IRoutes
- type MiddlewareFunc
- type Params
- type Scope
- func (s *Scope) Connect(path string, handler http.HandlerFunc)
- func (s *Scope) Delete(path string, handler http.HandlerFunc)
- func (s *Scope) Get(path string, handler http.HandlerFunc)
- func (s *Scope) Handle(method, path string, handler http.Handler)
- func (s *Scope) Options(path string, handler http.HandlerFunc)
- func (s *Scope) Patch(path string, handler http.HandlerFunc)
- func (s *Scope) Post(path string, handler http.HandlerFunc)
- func (s *Scope) Put(path string, handler http.HandlerFunc)
- func (s *Scope) Scope(prefix string) IRoutes
- func (s *Scope) Use(middleware MiddlewareFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GzipMiddleware ¶
func GzipMiddleware(next http.HandlerFunc) http.HandlerFunc
Types ¶
type CorsHandler ¶
func (*CorsHandler) Middleware ¶
func (cors *CorsHandler) Middleware(next http.HandlerFunc) http.HandlerFunc
type GZipResponseWriter ¶
type GZipResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
type IRouter ¶
type IRouter interface { IRoutes HandleErr(errorCode int, handler http.HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request) }
type IRoutes ¶
type IRoutes interface { Scope(prefix string) IRoutes Use(MiddlewareFunc) Handle(method, path string, handler http.Handler) Get(path string, handler http.HandlerFunc) Post(path string, handler http.HandlerFunc) Put(path string, handler http.HandlerFunc) Patch(path string, handler http.HandlerFunc) Delete(path string, handler http.HandlerFunc) Connect(paath string, handler http.HandlerFunc) Options(paath string, handler http.HandlerFunc) }
type MiddlewareFunc ¶
type MiddlewareFunc func(next http.HandlerFunc) http.HandlerFunc
Source Files ¶
Click to show internal directories.
Click to hide internal directories.