Documentation ¶
Overview ¶
Package swagger contains generated code from the Swagger spec.
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
WithRequestIDTrailerTransport returns a new RequestIDTrailerTransport that wraps the given http.RoundTripper. If rt is nil, http.DefaultTransport is used.
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
}
RequestIDer is an interface for types that have a request ID.