testsupport

package
v0.0.0-...-dd9aec0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeController

type FakeController struct {
	ifrit.Process
	// contains filtered or unexported fields
}

func StartServer

func StartServer(serverListenAddr string, tlsConfig *tls.Config) *FakeController

func (*FakeController) ServeHTTP

func (f *FakeController) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*FakeController) SetHandler

func (f *FakeController) SetHandler(route string, handler *FakeHandler)

func (*FakeController) SetHandlerFunc

func (f *FakeController) SetHandlerFunc(route string, handlerFunc FakeHandlerFunc)

func (*FakeController) Stop

func (f *FakeController) Stop()

type FakeHandler

type FakeHandler struct {
	LastRequestBody []byte
	ResponseCode    int
	ResponseBody    interface{}
}

type FakeHandlerFunc

type FakeHandlerFunc func(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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