Documentation ¶
Overview ¶
mockrest is scriptable server which wraps httptest. Allows for client testing by responding back with appropriate schemas
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { URL string // contains filtered or unexported fields }
Server holds state relaced to the handlers and tests.
func StartNewWithBody ¶
Create a new Server and start it with the specified body as the response
func StartNewWithFile ¶
Start a new server with the specified file as the response
func StartNewWithStatusCode ¶
Create a new Server and start it with the specified status as the response
func (*Server) Enqueue ¶
func (s *Server) Enqueue(h http.HandlerFunc)
func (*Server) TakeRequest ¶
Click to show internal directories.
Click to hide internal directories.