Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidStatusCodes = [...]int{100, 101, 200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 307, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 500, 501, 502, 503, 504, 505}
ValidStatusCodes is valid http status codes.
Functions ¶
func GetMockFileName ¶
GetMockFileName returns the base name of a mock.
func ValidateStatusCode ¶
ValidateStatusCode checks if string is valid http code.
Types ¶
type MockConf ¶
type MockConf struct { URI string `json:"uri"` Method string `json:"method"` ContentType string `json:"contenttype"` StatusCode int `json:"status"` Header map[string]string `json:"header"` Errors map[string]string }
MockConf represent a http call mock entity.
func ReadResponse ¶
ReadResponse from reading target response.
func (*MockConf) GetFileName ¶
GetFileName returns the filename for a MockConf enitiy.
Click to show internal directories.
Click to hide internal directories.