Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthenticatorFromEnvironment ¶
func GetAuthenticatorFromEnvironment(credentialKey string) (core.Authenticator, error)
GetAuthenticatorFromEnvironment instantiates an Authenticator using service properties retrieved from external config sources.
func NewErrorResponse ¶ added in v0.9.1
func NewErrorResponse(rt http.RoundTripper) http.RoundTripper
NewErrorResponse creates a new ErrorResponse middleware
Types ¶
type BaseService ¶
type BaseService struct { *core.BaseService // contains filtered or unexported fields }
func NewBaseService ¶
func NewBaseService(opts *core.ServiceOptions) (*BaseService, error)
func (*BaseService) Clone ¶
func (c *BaseService) Clone() *BaseService
func (*BaseService) Request ¶
func (c *BaseService) Request(req *http.Request, result interface{}) (detailedResponse *core.DetailedResponse, err error)
func (*BaseService) SetHTTPClient ¶
func (c *BaseService) SetHTTPClient(client *http.Client)
SetHTTPClient will set "client" as the http.Client instance to be used to invoke individual HTTP requests. If automatic retries are currently enabled on "service", then "client" will be set as the embedded client instance within the retryable client; otherwise "client" will be stored directly on "service".
func (*BaseService) SetServiceURL ¶
func (c *BaseService) SetServiceURL(url string) error
type ErrorResponse ¶ added in v0.9.1
type ErrorResponse struct {
// contains filtered or unexported fields
}
ErrorResponse is an error augmentation RoundTripper that in case of http error response parses the return body and converts it to a closer match to the standard error including adding a trace ID and appending the CouchDB/Cloudant error reason to the message