pkg

package
v0.0.0-...-e2f2d32 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 NewCollects

func NewCollects() *Collects

NewCollects creates an instance of 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

func (*Collects) Stop

func (c *Collects) Stop()

Stop stops the collector

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 atestpkg.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

type SimpleResponse struct {
	StatusCode int
	Body       string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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