Documentation
¶
Index ¶
- Variables
- func IsValidFQDN(fqdn string) bool
- func IsValidPortNumber(port int) bool
- func IsValidPortString(port string) bool
- 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) Respond(res http.ResponseWriter, rb ResponseBody) 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 ResponseBody
- type Route
Constants ¶
This section is empty.
Variables ¶
View Source
var VERSION string = "0.0.1"
Functions ¶
func IsValidFQDN ¶ added in v0.0.2
func IsValidPortNumber ¶ added in v0.0.2
func IsValidPortString ¶ added in v0.0.2
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 ¶
func (*Http) Respond ¶ added in v0.0.3
func (h *Http) Respond(res http.ResponseWriter, rb ResponseBody) error
type HttpConfig ¶
func (*HttpConfig) New ¶
func (h *HttpConfig) New() *HttpConfig
type ResponseBody ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.