Documentation ¶
Index ¶
- Variables
- func ShiftPath(p string) (head, tail string)
- type Http
- func (h *Http) AddRoute(route Route) error
- func (h *Http) AddRoutes(routes []Route) error
- func (h *Http) AsyncStart() error
- func (h *Http) Init(config *HttpConfig) error
- func (h *Http) RemoveRoute(name string) error
- func (h *Http) Restart() error
- func (h *Http) Serve() error
- func (h *Http) ServeHTTP(res http.ResponseWriter, req *http.Request)
- func (h *Http) Start() error
- func (h *Http) Status() (string, error)
- func (h *Http) Stop() error
- func (h *Http) Version() string
- type HttpConfig
- type HttpError
- type Method
- type PathType
- type ResponseResult
- type Route
Constants ¶
This section is empty.
Variables ¶
View Source
var VERSION string = "0.0.1"
Functions ¶
Types ¶
type Http ¶
type Http struct { Config HttpConfig Routes []Route DefaultRoutes []Route Closer io.Closer DefaultRouteRegexp *regexp.Regexp }
func (*Http) AsyncStart ¶
func (*Http) Init ¶
func (h *Http) Init(config *HttpConfig) error
func (*Http) RemoveRoute ¶
type HttpConfig ¶
func (*HttpConfig) New ¶
func (h *HttpConfig) New() *HttpConfig
type ResponseResult ¶
Click to show internal directories.
Click to hide internal directories.