Documentation ¶
Index ¶
- type BHandler
- type Middleware
- type Web
- func (w *Web) AttachProfiler()
- func (w *Web) Delete(path string, f http.HandlerFunc)
- func (w *Web) Get(path string, f http.HandlerFunc)
- func (w *Web) Handler(res http.ResponseWriter, req *http.Request)
- func (w *Web) Head(path string, f http.HandlerFunc)
- func (w *Web) Options(path string, f http.HandlerFunc)
- func (w *Web) Patch(path string, f http.HandlerFunc)
- func (w *Web) Post(path string, f http.HandlerFunc)
- func (w *Web) Put(path string, f http.HandlerFunc)
- func (w *Web) SetStaticFiles()
- func (w *Web) StartServer(port int, cert, key string)
- func (w *Web) Use(m Middleware)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BHandler ¶
type BHandler struct { Path string Func http.HandlerFunc }
BHandler is handler path and func
type Web ¶
type Web struct { Mux *http.ServeMux Router map[string][]BHandler Middleware []Middleware }
Web is web object including Mux, Router, Middleware
func (*Web) Delete ¶
func (w *Web) Delete(path string, f http.HandlerFunc)
Delete is to set delete request
func (*Web) Handler ¶
func (w *Web) Handler(res http.ResponseWriter, req *http.Request)
endpoint of router
func (*Web) Options ¶
func (w *Web) Options(path string, f http.HandlerFunc)
Options is to set options request
func (*Web) Patch ¶
func (w *Web) Patch(path string, f http.HandlerFunc)
Patch is to set patch request
func (*Web) StartServer ¶
StartServer is to start server with setting handler
Click to show internal directories.
Click to hide internal directories.