Versions in this module Expand all Collapse all v0 v0.0.1 May 26, 2023 Changes in this version + var VERSION string = "0.0.1" + func ShiftPath(p string) (head, tail string) + type Http struct + Closer io.Closer + Config HttpConfig + DefaultRouteRegexp *regexp.Regexp + DefaultRoutes []Route + Routes []Route + 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 struct + Host string + Port int + func (h *HttpConfig) New() *HttpConfig + type HttpError struct + func (e *HttpError) Error() string + type Method byte + const CONNECT + const DELETE + const GET + const HEAD + const OPTIONS + const PATCH + const POST + const PUT + const STATUS + const TRACE + func (m Method) Byte() byte + type PathType byte + const EXACT + const REGEX + func (pt PathType) Byte() byte + type ResponseResult struct + Error error + ResponseCode int + type Route struct + Action actionDef + CompiledPath *regexp.Regexp + Method Method + Name string + Path string + PathType PathType