Documentation ¶
Overview ¶
Package recorders providers request/response recorders for Gophers tool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIB ¶
type APIB struct{}
APIB records request and response to writers in API Blueprint format.
func (*APIB) RecordRequest ¶
func (r *APIB) RecordRequest(req *http.Request, status, headers, body []byte, wc io.WriteCloser) (err error)
RecordRequest writes request's status, headers and body.
func (*APIB) RecordResponse ¶
func (r *APIB) RecordResponse(resp *http.Response, status, headers, body []byte, wc io.WriteCloser) (err error)
RecordResponse writes response's status, headers and body.
type Interface ¶
type Interface interface { // RecordRequest writes request's status, headers and body. RecordRequest(req *http.Request, status, headers, body []byte, wc io.WriteCloser) (err error) // RecordResponse writes response's status, headers and body. RecordResponse(resp *http.Response, status, headers, body []byte, wc io.WriteCloser) (err error) }
Interface is a common interface of all request/response recorders.
type Plain ¶
type Plain struct{}
Plain records request and response to writers in plain text format.
func (*Plain) RecordRequest ¶
func (r *Plain) RecordRequest(req *http.Request, status, headers, body []byte, wc io.WriteCloser) (err error)
RecordRequest writes request's status, headers and body.
func (*Plain) RecordResponse ¶
func (r *Plain) RecordResponse(resp *http.Response, status, headers, body []byte, wc io.WriteCloser) (err error)
RecordResponse writes response's status, headers and body.
Click to show internal directories.
Click to hide internal directories.