Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptureItem ¶
type CaptureItem struct { Request Request `yaml:"request"` ReqPayload DelayedReaderPersisterer `yaml:"-"` Response Response `yaml:"response"` RespPayload DelayedReaderPersisterer `yaml:"-"` }
type CaptureMatcher ¶
type CaptureMatcher func(*http.Request, *CaptureItem) bool
type CaptureTransportMode ¶
type CaptureTransportMode int
const ( CaptureTransportModeNone CaptureTransportMode = iota CaptureTransportModeRecord CaptureTransportMode = iota CaptureTransportModeFake CaptureTransportMode = iota )
type DelayedReaderPersisterer ¶
type DelayedReaderPersisterer interface { io.ReadCloser Done() <-chan struct{} Payload() []byte IsNil() bool }
type Request ¶
type Request struct { Method string URL string Proto string ProtoMajor int ProtoMinor int Header http.Header Body *string ContentLength int64 TransferEncoding []string Close bool Host string Form url.Values PostForm url.Values MultipartForm *multipart.Form Trailer http.Header RemoteAddr string RequestURI string //TLS *tls.ConnectionState TestTimestamp time.Time `yaml:"testTimestamp"` }
func NewRequest ¶
type Response ¶
type Response struct { Status string StatusCode int Proto string ProtoMajor int ProtoMinor int Header http.Header Body *string ContentLength int64 TransferEncoding []string Close bool Uncompressed bool Trailer http.Header //TLS *tls.ConnectionState TestTimestamp time.Time `yaml:"testTimestamp"` }
func NewResponse ¶
func (Response) ToHttpResponse ¶
Click to show internal directories.
Click to hide internal directories.