Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONConsumer ¶
JSONConsumer is a fork of https://github.com/go-openapi/runtime/blob/master/json.go
func TextConsumer ¶
TextConsumer creates a new text consumer.
Specifically we attempt to deal with the case here where nginx returns a 500 that is HTML, so we can't unmarshal into our RuntimeError object. In the case HTML is returned, we set the error's message field to the HTML body.
func WithRequestIDTrailerTransport ¶
func WithRequestIDTrailerTransport(rt http.RoundTripper) http.RoundTripper
Types ¶
type RequestIDBody ¶
type RequestIDBody struct { io.ReadCloser // contains filtered or unexported fields }
RequestIDBody wraps an io.ReadCloser, essentially an http body, with a request ID.
func (RequestIDBody) RequestID ¶
func (r RequestIDBody) RequestID() string
RequestID returns the requestID for the request.
type RequestIDTrailerTransport ¶
type RequestIDTrailerTransport struct {
RT http.RoundTripper
}
RequestIDTrailerTransport pulls out the request ID from response trailer and overwrites the (http.Response).Body to be a RequestIDBody.
type RequestIDer ¶
type RequestIDer interface {
RequestID() string
}
Click to show internal directories.
Click to hide internal directories.