mock

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 0 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

func ActivateHttpMock

func ActivateHttpMock()

func DeactivateHttpMock

func DeactivateHttpMock()

func NewBytesResponder

func NewBytesResponder(status int, body []byte) httpmock.Responder

func NewJsonResponse

func NewJsonResponse(status int, body interface{}) (*http.Response, error)

func NewStringResponder

func NewStringResponder(status int, body string) httpmock.Responder

func NewStringResponse

func NewStringResponse(status int, body string) *http.Response

func Patch

func Patch(target, replacement interface{}) *monkey.PatchGuard

func PatchInstanceMethod

func PatchInstanceMethod(target reflect.Type, methodName string, replacement interface{}) *monkey.PatchGuard

func RegisterHttpResponder

func RegisterHttpResponder(method string, url string, responder httpmock.Responder)

func Unpatch

func Unpatch(target interface{}) bool

func UnpatchAll

func UnpatchAll()

func UnpatchInstanceMethod

func UnpatchInstanceMethod(target reflect.Type, methodName string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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