e2e

package
v0.0.0-...-4accc28 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscardBody

func DiscardBody(resp *http.Response) int

func DumpReq

func DumpReq(req *http.Request)

func DumpResp

func DumpResp(resp *http.Response)

func HashBody

func HashBody(resp *http.Response) string

func HashFile

func HashFile(path string, offset, length int) string

func Purge

func Purge(t *testing.T, url string)

func RespCallback

func RespCallback(cb func(w http.ResponseWriter, r *http.Request)) http.HandlerFunc

func RespCallbackFile

func RespCallbackFile(f *MockFile, cb func(w http.ResponseWriter, r *http.Request)) http.HandlerFunc

func RespSimpleFile

func RespSimpleFile(f *MockFile) http.HandlerFunc

func SetDump

func SetDump(b bool)

func SetDumpReq

func SetDumpReq(b bool)

func SetLocalAddr

func SetLocalAddr(addr string)

func SetManual

func SetManual(b bool)

func SplitFile

func SplitFile(path string, offset, length int) io.ReadCloser

func SumMD5

func SumMD5(buf []byte) string

func WrongHit

func WrongHit(t *testing.T) http.HandlerFunc

Types

type E2E

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

func New

func New(caseUrl string, srcHandler http.HandlerFunc) *E2E

func (*E2E) Close

func (e *E2E) Close()

func (*E2E) Do

func (e *E2E) Do(rewrite func(r *http.Request)) (*http.Response, error)

type MockFile

type MockFile struct {
	Path string
	MD5  string
	Size int
}

func GenFile

func GenFile(t *testing.T, size int) *MockFile

Jump to

Keyboard shortcuts

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