fakes

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2018 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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 (c *FakeHTTPClient) DeleteCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)

func (*FakeHTTPClient) Get

func (c *FakeHTTPClient) Get(endpoint string) (*http.Response, error)

func (*FakeHTTPClient) GetCustomized

func (c *FakeHTTPClient) GetCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)

func (*FakeHTTPClient) Post

func (c *FakeHTTPClient) Post(endpoint string, payload []byte) (*http.Response, error)

func (*FakeHTTPClient) PostCustomized

func (c *FakeHTTPClient) PostCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)

func (*FakeHTTPClient) Put

func (c *FakeHTTPClient) Put(endpoint string, payload []byte) (*http.Response, error)

func (*FakeHTTPClient) PutCustomized

func (c *FakeHTTPClient) PutCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL