test

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterParamsType

func RegisterParamsType(paramsType *reflect.Type)

func RegisterURLVarExtractor

func RegisterURLVarExtractor(fn parse.URLVarExtractor)

Types

type HandlerInfo

type HandlerInfo struct {
	FileName string
	FuncName string
}

type ResponseWriter

type ResponseWriter struct {
	HandlerInfo HandlerInfo
	URLVars     map[string]string
	W           *httptest.ResponseRecorder
}

func NewResponseWriter

func NewResponseWriter(w *httptest.ResponseRecorder) *ResponseWriter

func (*ResponseWriter) Header

func (rw *ResponseWriter) Header() http.Header

func (*ResponseWriter) Write

func (rw *ResponseWriter) Write(b []byte) (int, error)

func (*ResponseWriter) WriteHeader

func (rw *ResponseWriter) WriteHeader(c int)

type Server

type Server struct {
	*httptest.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer(handler http.Handler) (s *Server, err error)

TODO: filter out 404 responses

func (*Server) Finish

func (s *Server) Finish()

Jump to

Keyboard shortcuts

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