Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestServer ¶
RestServer wraps gorilla mux router
func NewRestServer ¶
func NewRestServer(data ...map[string]interface{}) *RestServer
NewRestServer create a RestServer instance
func (*RestServer) AddMiddleware ¶
func (srv *RestServer) AddMiddleware(mwf ...func(http.Handler) http.Handler)
AddMiddleware adds middlewares to the end of chain
func (*RestServer) AddRoute ¶
func (srv *RestServer) AddRoute(route ...rest.Route)
AddRoute adds routes to router
func (*RestServer) PreMiddleware ¶
func (srv *RestServer) PreMiddleware(mwf ...func(http.Handler) http.Handler)
PreMiddleware adds middlewares to the head of chain
Click to show internal directories.
Click to hide internal directories.