Documentation
¶
Index ¶
- type Server
- func (s *Server) Execute(handler web.HandlerFunc) (int, *httptest.ResponseRecorder)
- func (s *Server) ExecuteAsJSON(handler web.HandlerFunc) (int, *jsonq.JsonQuery)
- func (s *Server) ExecutePost(handler web.HandlerFunc, body string) (int, *httptest.ResponseRecorder)
- func (s *Server) Use(middleware web.MiddlewareFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server is a HTTP server wrapper for testing purpose
func NewSingleTenantServer ¶
func NewSingleTenantServer() *Server
NewSingleTenantServer creates a new multitenant test server
func (*Server) Execute ¶
func (s *Server) Execute(handler web.HandlerFunc) (int, *httptest.ResponseRecorder)
Execute given handler and return response
func (*Server) ExecuteAsJSON ¶
ExecuteAsJSON given handler and return json response
func (*Server) ExecutePost ¶
func (s *Server) ExecutePost(handler web.HandlerFunc, body string) (int, *httptest.ResponseRecorder)
ExecutePost executes given handler as POST and return response
func (*Server) Use ¶
func (s *Server) Use(middleware web.MiddlewareFunc)
Use adds a new middleware to pipeline
Click to show internal directories.
Click to hide internal directories.