Documentation
¶
Index ¶
- Constants
- type ApiRoute
- type HttpServer
- func (self *HttpServer) AttachFileServer(path, directory string)
- func (self *HttpServer) AttachHandler(path string, handler http.Handler)
- func (self *HttpServer) AttachHandlerFunc(route ApiRoute)
- func (self *HttpServer) AttachHandlerFuncs(routes []ApiRoute)
- func (self *HttpServer) ListenAndServe(port int)
Constants ¶
View Source
const DEFAULT_HTTP_PORT = 8080
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiRoute ¶
type ApiRoute struct {
Name string
Methods []string
Pattern string
HandlerFunc http.HandlerFunc
}
type HttpServer ¶
func NewServer ¶
func NewServer() (*HttpServer, error)
func (*HttpServer) AttachFileServer ¶
func (self *HttpServer) AttachFileServer(path, directory string)
func (*HttpServer) AttachHandler ¶
func (self *HttpServer) AttachHandler(path string, handler http.Handler)
func (*HttpServer) AttachHandlerFunc ¶
func (self *HttpServer) AttachHandlerFunc(route ApiRoute)
func (*HttpServer) AttachHandlerFuncs ¶
func (self *HttpServer) AttachHandlerFuncs(routes []ApiRoute)
func (*HttpServer) ListenAndServe ¶
func (self *HttpServer) ListenAndServe(port int)
Click to show internal directories.
Click to hide internal directories.