Documentation ¶
Index ¶
- Variables
- func GetHttpParam(ctx context.Context, name string) string
- func WrapperHandler(metric metric.MetricInterface) http.Handler
- type Handle
- type MyRouter
- func (mr *MyRouter) DELETE(path string, handle Handle)
- func (mr *MyRouter) GET(path string, handle Handle)
- func (mr *MyRouter) GETFile(path string, handle httprouter.Handle)
- func (mr *MyRouter) OPTIONS(path string, handle Handle)
- func (mr *MyRouter) PATCH(path string, handle Handle)
- func (mr *MyRouter) POST(path string, handle Handle)
- func (mr *MyRouter) PUT(path string, handle Handle)
- func (mr *MyRouter) ServeFiles(path string, root http.FileSystem)
- func (mr *MyRouter) TestHack(fullPath string, handle Handle) httprouter.Handle
- type Options
- type WrittenResponseWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var HttpRouter *httprouter.Router
Functions ¶
func WrapperHandler ¶
func WrapperHandler(metric metric.MetricInterface) http.Handler
WrapperHandler used to wrap web handler
Types ¶
type Handle ¶
type Handle func(http.ResponseWriter, *http.Request, httprouter.Params) *response.JSONResponse
type MyRouter ¶
type MyRouter struct { Httprouter *httprouter.Router WrappedHandler http.Handler Options *Options }
func (*MyRouter) ServeFiles ¶
func (mr *MyRouter) ServeFiles(path string, root http.FileSystem)
type WrittenResponseWriter ¶
type WrittenResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
func (*WrittenResponseWriter) WriteHeader ¶
func (w *WrittenResponseWriter) WriteHeader(status int)
func (*WrittenResponseWriter) Written ¶
func (w *WrittenResponseWriter) Written() bool
Click to show internal directories.
Click to hide internal directories.