mocking

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

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

Go to latest
Published: Feb 22, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForMock

func CheckForMock(mocks RequestMocks, r *http.Request) http.HandlerFunc

CheckForMock Find the first request mock that's predicate matches the request, or nil if no match is found

Types

type RequestHandlerPredicate

type RequestHandlerPredicate func(r *http.Request) bool

type RequestMock

type RequestMock struct {
	// contains filtered or unexported fields
}

func CreateMock

func CreateMock(predicate RequestHandlerPredicate, handler http.HandlerFunc) RequestMock

CreateMock Create a RequestMock

type RequestMocks

type RequestMocks = []RequestMock

Jump to

Keyboard shortcuts

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