mock

package
Version: v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL