test

package
v0.0.0-...-5261409 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpServerWithHandlers

func NewHttpServerWithHandlers(t *testing.T, handlers []http.HandlerFunc) *httptest.Server

NewHttpServerWithHandlers creates a new httptest.Server with the provided handlers.

func NewTestHttpClient

func NewTestHttpClient(funcs ...RoundTripFunc) *http.Client

func Response

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

Types

type RoundTripFunc

type RoundTripFunc func(req *http.Request) *http.Response

type RoundTripper

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

func (*RoundTripper) RoundTrip

func (r *RoundTripper) 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