handler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareResponseBody

func PrepareResponseBody(err error) *bytes.Reader

func Records

func Records(cfg config.Config, storageProvider storage.Provider) http.HandlerFunc

func Regenerate

func Regenerate(cfg config.Config, storageProvider storage.Provider) http.HandlerFunc

Types

type InternalError

type InternalError struct {
	Error string `json:"error"`
}

type RequestHandler

type RequestHandler func(*gomitmproxy.Session) (*http.Request, *http.Response)

func Request

func Request(cfg config.Config, storageProvider storage.Provider) RequestHandler

type ResponseHandler

type ResponseHandler func(*gomitmproxy.Session) *http.Response

func Response

func Response(cfg config.Config, storageProvider storage.Provider) ResponseHandler

type Session

type Session interface {
	SetProp(key string, value interface{})
	GetProp(key string) (interface{}, bool)
	Request() *http.Request
	Response() *http.Response
}

Jump to

Keyboard shortcuts

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