Documentation ¶
Index ¶
- type FakeHTTPClient
- func (c *FakeHTTPClient) Delete(endpoint string) (*http.Response, error)
- func (c *FakeHTTPClient) DeleteCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)
- func (c *FakeHTTPClient) Get(endpoint string) (*http.Response, error)
- func (c *FakeHTTPClient) GetCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)
- func (c *FakeHTTPClient) Post(endpoint string, payload []byte) (*http.Response, error)
- func (c *FakeHTTPClient) PostCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)
- func (c *FakeHTTPClient) Put(endpoint string, payload []byte) (*http.Response, error)
- func (c *FakeHTTPClient) PutCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)
- func (c *FakeHTTPClient) SetDeleteBehavior(body string, statusCode int, err error)
- func (c *FakeHTTPClient) SetGetBehavior(body string, statusCode int, err error)
- func (c *FakeHTTPClient) SetPostBehavior(body string, statusCode int, err error)
- func (c *FakeHTTPClient) SetPutBehavior(body string, statusCode int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeHTTPClient ¶
type FakeHTTPClient struct { PostInputs []postInput GetInputs []getInput DeleteInputs []deleteInput PutInputs []putInput // contains filtered or unexported fields }
func NewFakeHTTPClient ¶
func NewFakeHTTPClient() *FakeHTTPClient
func (*FakeHTTPClient) Delete ¶
func (c *FakeHTTPClient) Delete(endpoint string) (*http.Response, error)
func (*FakeHTTPClient) DeleteCustomized ¶
func (*FakeHTTPClient) GetCustomized ¶
func (*FakeHTTPClient) PostCustomized ¶
func (*FakeHTTPClient) PutCustomized ¶
func (*FakeHTTPClient) SetDeleteBehavior ¶
func (c *FakeHTTPClient) SetDeleteBehavior(body string, statusCode int, err error)
func (*FakeHTTPClient) SetGetBehavior ¶
func (c *FakeHTTPClient) SetGetBehavior(body string, statusCode int, err error)
func (*FakeHTTPClient) SetPostBehavior ¶
func (c *FakeHTTPClient) SetPostBehavior(body string, statusCode int, err error)
func (*FakeHTTPClient) SetPutBehavior ¶
func (c *FakeHTTPClient) SetPutBehavior(body string, statusCode int, err error)
Click to show internal directories.
Click to hide internal directories.