Documentation ¶ Index ¶ func NewMockHTTPClient(t *testing.T, calls ...Call) *mockHTTPClient func ValidateRequest(t *testing.T, req *http.Request, method string, url string, body string) bool type Call Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewMockHTTPClient ¶ func NewMockHTTPClient(t *testing.T, calls ...Call) *mockHTTPClient func ValidateRequest ¶ func ValidateRequest(t *testing.T, req *http.Request, method string, url string, body string) bool ValidateRequest is a utility Types ¶ type Call ¶ type Call struct { // Validate is an optional function that, if set, will validate an incoming request Validate func(req *http.Request) bool ResponseStatus int ResponseBody string ResponseError error } Source Files ¶ View all Source files mockhttp.go Click to show internal directories. Click to hide internal directories.