Documentation
¶
Index ¶
- type FakeResponse
- type HTTPClient
- func (m *HTTPClient) Delete(url string, body interface{}, header map[string]string) (httpClient.Response, error)
- func (m *HTTPClient) Get(url string, query interface{}, header map[string]string) (httpClient.Response, error)
- func (m *HTTPClient) Patch(url string, body interface{}, header map[string]string) (httpClient.Response, error)
- func (m *HTTPClient) Post(url string, body interface{}, header map[string]string) (httpClient.Response, error)
- func (m *HTTPClient) Put(url string, body interface{}, header map[string]string) (httpClient.Response, error)
- func (m *HTTPClient) Request(method, url string, body interface{}, header map[string]string) (httpClient.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeResponse ¶
type FakeResponse struct {
StatusCodeProperty int
BodyProperty []byte
StatusProperty string
HeaderProperty http.Header
CookiesProperty []*http.Cookie
}
FakeResponse is a fake http.Response
func (*FakeResponse) Body ¶
func (m *FakeResponse) Body() []byte
Body returns the body of the response
func (*FakeResponse) Cookies ¶
func (m *FakeResponse) Cookies() []*http.Cookie
Cookies returns cookies
func (*FakeResponse) Header ¶
func (m *FakeResponse) Header() http.Header
Header returns the http.Header
func (*FakeResponse) Status ¶
func (m *FakeResponse) Status() string
Status returns the response status
func (*FakeResponse) StatusCode ¶
func (m *FakeResponse) StatusCode() int
StatusCode returns the StatusCodeProperty
type HTTPClient ¶
HTTPClient is a mock of http.Client
func (*HTTPClient) Delete ¶
func (m *HTTPClient) Delete(url string, body interface{}, header map[string]string) (httpClient.Response, error)
Delete is a mocking a method
func (*HTTPClient) Get ¶
func (m *HTTPClient) Get(url string, query interface{}, header map[string]string) (httpClient.Response, error)
Get is a mocking a method
func (*HTTPClient) Patch ¶
func (m *HTTPClient) Patch(url string, body interface{}, header map[string]string) (httpClient.Response, error)
Patch is a mocking a method
func (*HTTPClient) Post ¶
func (m *HTTPClient) Post(url string, body interface{}, header map[string]string) (httpClient.Response, error)
Post is a mocking a method
func (*HTTPClient) Put ¶
func (m *HTTPClient) Put(url string, body interface{}, header map[string]string) (httpClient.Response, error)
Put is a mocking a method
func (*HTTPClient) Request ¶
func (m *HTTPClient) Request(method, url string, body interface{}, header map[string]string) (httpClient.Response, error)
Request is a mocking a method
Click to show internal directories.
Click to hide internal directories.