mock

package
v0.0.0-...-5b4c5eb Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTMLTransport

type HTMLTransport struct {
	sync.Mutex
	NumCalled int
	// contains filtered or unexported fields
}

func NewHTMLTransport

func NewHTMLTransport(path string) (*HTMLTransport, error)

func NewHTMLTransportFromString

func NewHTMLTransportFromString(content string) *HTMLTransport

func (*HTMLTransport) RoundTrip

func (t *HTMLTransport) RoundTrip(req *http.Request) (*http.Response, error)

type ResponseTransport

type ResponseTransport struct {
	sync.Mutex
	NumCalled int
	// contains filtered or unexported fields
}

func NewResponseTransport

func NewResponseTransport(f func(*ResponseTransport, *http.Request) *http.Response) *ResponseTransport

func (*ResponseTransport) RoundTrip

func (t *ResponseTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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