testhttp

package
v0.0.0-...-0a453af Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockHTTP

type MockHTTP struct {
	Server *httptest.Server
	Client http.Client

	Responses map[string]TestHTTPResponse
}

func InitMockHTTP

func InitMockHTTP() *MockHTTP

func (*MockHTTP) AddTestData

func (mock *MockHTTP) AddTestData(testUrl string, code int, body []byte)

func (*MockHTTP) Close

func (mock *MockHTTP) Close()

func (*MockHTTP) DeleteTestData

func (mock *MockHTTP) DeleteTestData(testUrl string)

type TestHTTPResponse

type TestHTTPResponse struct {
	Status int
	Body   []byte
}

Jump to

Keyboard shortcuts

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