mocks

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MockDomain = "mock"
	MockApiKey = "apikey"
	MockSecret = "secret"
)

Variables

View Source
var (
	// GetDoFunc fetches the mock client's `Do` func
	GetDoFunc func(req *http.Request) (*http.Response, error)
)

Functions

func CheckHeader

func CheckHeader(t *testing.T, headers http.Header)

func CheckTimestampAndSignature

func CheckTimestampAndSignature(t *testing.T, params url.Values)

Types

type MockHTTPClient

type MockHTTPClient struct {
	DoFunc func(req *http.Request) (*http.Response, error)
}

MockClient is the mock client

func (*MockHTTPClient) Do

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

Do is the mock client's `Do` func

Jump to

Keyboard shortcuts

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