Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collects ¶
type Collects struct {
// contains filtered or unexported fields
}
Collects is a HTTP request collector
func (*Collects) Add ¶
func (c *Collects) Add(req *http.Request, resp *SimpleResponse)
Add adds a HTTP request
func (*Collects) AddEvent ¶
func (c *Collects) AddEvent(e EventHandle)
AddEvent adds new event handle
type Controller ¶
type Controller struct { WhiteList []WhiteItem `yaml:"whiteList"` Windows []Window `yaml:"windows"` }
func ParseController ¶
func ParseController(config string) (ctrl *Controller, err error)
func (*Controller) ConnectFilter ¶
func (c *Controller) ConnectFilter(host string, ctx *goproxy.ProxyCtx) (*goproxy.ConnectAction, string)
type EventHandle ¶
type EventHandle func(r *RequestAndResponse)
EventHandle is the collect event handle
type RequestAndResponse ¶
type RequestAndResponse struct { Request *http.Request Response *SimpleResponse }
type SampleExporter ¶
type SampleExporter struct { TestSuite testing.TestSuite // contains filtered or unexported fields }
SampleExporter is a sample exporter
func NewSampleExporter ¶
func NewSampleExporter(saveResponseBody bool) *SampleExporter
NewSampleExporter creates a new exporter
func (*SampleExporter) Add ¶
func (e *SampleExporter) Add(reqAndResp *RequestAndResponse)
Add adds a request to the exporter
func (*SampleExporter) Export ¶
func (e *SampleExporter) Export() (string, error)
Export exports the test suite
type SimpleResponse ¶
Click to show internal directories.
Click to hide internal directories.