Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(t *testing.T, in interface{}, out interface{}) http.HandlerFunc
Handler returns a http handler which decodes and matches JSON request bodies with the in interface{}, and writes the out interface{} as JSON to the response writer
func Server ¶
func Server(pattern string, mock http.HandlerFunc) *httptest.Server
Server starts an insecure http2 enabled server for testing a route
func StreamingHandler ¶
func StreamingHandler(t *testing.T, in interface{}, outs ...interface{}) http.HandlerFunc
StreamingHandler matches an initial JSON request body with the given in param, then writes each of the given outs params to the response waiting 100ms inbetween each
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.