Documentation ¶
Index ¶
- Variables
- type ConsoleTransport
- func (ct *ConsoleTransport) HandleError(err error) error
- func (ct *ConsoleTransport) HandleRequest(req *http.Request) (style.State, error)
- func (ct *ConsoleTransport) HandleResponse(res *http.Response, s style.State) error
- func (ct *ConsoleTransport) RoundTrip(req *http.Request) (*http.Response, error)
- type Dir
- type FileManager
- type HTTPutilDumpRequestFunc
- type HTTPutilDumpResponseFunc
- type JSONDumpRequestFuncWithStyle
- type JSONDumpResponseFuncWithStyle
- type Layout
- type WriteFileTransport
- func (wt *WriteFileTransport) HandleError(req *http.Request, s style.State, err error) error
- func (wt *WriteFileTransport) HandleRequest(req *http.Request) (style.State, error)
- func (wt *WriteFileTransport) HandleResponse(res *http.Response, req *http.Request, s style.State) error
- func (wt *WriteFileTransport) RoundTrip(req *http.Request) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TextLayout = &Layout{ Request: HTTPutilDumpRequestFunc(httputil.DumpRequestOut), Response: HTTPutilDumpResponseFunc(httputil.DumpResponse), } JSONLayout = &Layout{ Request: &JSONDumpRequestFuncWithStyle{ Style: gostyle.ExtractRequestInfo, }, Response: &JSONDumpResponseFuncWithStyle{ Style: gostyle.ExtractResponseInfo, }, } OpenAPILayout = &Layout{ Request: &JSONDumpRequestFuncWithStyle{ Style: openapistyle.ExtractRequestInfo, }, Response: &JSONDumpResponseFuncWithStyle{ Style: openapistyle.ExtractResponseInfo, }, } )
View Source
var (
DefaultLayout = TextLayout
)
default setting
Functions ¶
This section is empty.
Types ¶
type ConsoleTransport ¶ added in v0.0.5
type ConsoleTransport struct { Transport http.RoundTripper Layout *Layout Printer interface { Printf(fmt string, args ...interface{}) } }
func (*ConsoleTransport) HandleError ¶ added in v0.0.5
func (ct *ConsoleTransport) HandleError(err error) error
func (*ConsoleTransport) HandleRequest ¶ added in v0.0.5
func (*ConsoleTransport) HandleResponse ¶ added in v0.0.5
type FileManager ¶ added in v0.0.4
type HTTPutilDumpRequestFunc ¶ added in v0.0.5
type HTTPutilDumpResponseFunc ¶ added in v0.0.5
type JSONDumpRequestFuncWithStyle ¶ added in v0.0.5
for json output
type JSONDumpResponseFuncWithStyle ¶ added in v0.0.5
type WriteFileTransport ¶ added in v0.0.5
type WriteFileTransport struct { Transport http.RoundTripper *FileManager Layout *Layout GetPrefix func() string // xxx: use t.Name() }
func (*WriteFileTransport) HandleError ¶ added in v0.0.5
func (*WriteFileTransport) HandleRequest ¶ added in v0.0.5
func (*WriteFileTransport) HandleResponse ¶ added in v0.0.5
Source Files ¶
Click to show internal directories.
Click to hide internal directories.