Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilClient is an error returned when a given HTTPClient is nil. ErrNilClient = errors.New("given client is nil") )
Functions ¶
Types ¶
type ErrUnexpectedStatus ¶
ErrUnexpectedStatus is an error meaning the API call returned a response with an unexpected status. It may occurs when the server is down or the parameters/body is invalid.
func (ErrUnexpectedStatus) Error ¶
func (e ErrUnexpectedStatus) Error() string
type HTTPClient ¶
HTTPClient defines what is the basic implementation of an HTTP client. Used for interconnectability with various implementations of an HTTP client, and for mocking purposes.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithAPIKey ¶
WithAPIKey defines the API keyto use when executing the HTTP request. Default won't set the HTTP header in the request.
func WithContext ¶
WithContext defines the context to use when executing the HTTP request. Default is context.Background.
Click to show internal directories.
Click to hide internal directories.