Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpHandler ¶
type HttpHandler func(w http.ResponseWriter, r *http.Request) (interface{}, error)
type HttpHandlerWithoutReturn ¶
type HttpHandlerWithoutReturn func(w http.ResponseWriter, r *http.Request)
func HandleRequest ¶
func HandleRequest(route RouteDefinition) HttpHandlerWithoutReturn
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func New ¶
func New() *HttpServer
func (*HttpServer) GetRoutes ¶
func (s *HttpServer) GetRoutes() *RoutesMap
func (*HttpServer) RegisterRoutes ¶
func (s *HttpServer) RegisterRoutes(routes map[string]RouteDefinition)
func (*HttpServer) Start ¶
func (s *HttpServer) Start() error
type RouteDefinition ¶
type RouteDefinition struct { Method string Function HttpHandler }
type RoutesMap ¶
type RoutesMap map[string]RouteDefinition
Click to show internal directories.
Click to hide internal directories.