Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadStatusCode = fmt.Errorf("bad status code")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { BaseURL string // contains filtered or unexported fields }
func NewClient ¶
func NewClient(baseURL string, opts ...ClientOption) Client
NewClient returns a new Client with the given baseURL and options.
type ClientOption ¶ added in v0.8.0
type ClientOption func(*Client)
func WithAuthentication ¶ added in v0.8.0
func WithAuthentication(token string) ClientOption
WithAuthentication returns a ClientOption that sets the token to be used for authentication. The token can be an API key, or it can be in the form of "username:password" for basic authentication.
func WithHTTPClient ¶ added in v0.8.0
func WithHTTPClient(httpClient *http.Client) ClientOption
WithHTTPClient returns a ClientOption that sets the HTTP client to be used.
Click to show internal directories.
Click to hide internal directories.