hstest

package
v0.0.1-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMockClient = &MockClient{}

Functions

func BuildResponseBodyForMock

func BuildResponseBodyForMock(json string) io.ReadCloser

func CrerateRequest

func CrerateRequest(method string, path string, body io.Reader, vars map[string]string) *http.Request

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type MockClient

type MockClient struct {
	mock.Mock
}

func (*MockClient) Do

func (m *MockClient) Do(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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