fakes

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2015 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeClient

type FakeClient struct {
	StatusCode int
	CallCount  int
	Error      error

	RequestBodies []string
	Requests      []*http.Request
	// contains filtered or unexported fields
}

func NewFakeClient

func NewFakeClient() (fakeClient *FakeClient)

func (*FakeClient) AddDoBehavior

func (c *FakeClient) AddDoBehavior(resp *http.Response, err error)

func (*FakeClient) Do

func (c *FakeClient) Do(req *http.Request) (*http.Response, error)

func (*FakeClient) SetMessage

func (c *FakeClient) SetMessage(message string)

func (*FakeClient) SetNilResponse

func (c *FakeClient) SetNilResponse()

type FakeRequestRetryable

type FakeRequestRetryable struct {
	AttemptCalled int
	// contains filtered or unexported fields
}

func NewFakeRequestRetryable

func NewFakeRequestRetryable() *FakeRequestRetryable

func (*FakeRequestRetryable) AddAttemptBehavior

func (r *FakeRequestRetryable) AddAttemptBehavior(response *http.Response, isRetryable bool, err error)

func (*FakeRequestRetryable) Attempt

func (r *FakeRequestRetryable) Attempt() (bool, error)

func (*FakeRequestRetryable) Attempts

func (r *FakeRequestRetryable) Attempts() int

func (*FakeRequestRetryable) Response

func (r *FakeRequestRetryable) Response() *http.Response

Jump to

Keyboard shortcuts

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