Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { BaseURL *url.URL CacheDirectory string MaxCacheTime time.Duration MaxRequestsPerSecond float64 Authenticator Authenticator // contains filtered or unexported fields }
func NewAPIClient ¶
func NewAPIClient(opts APIClientOptions) (*APIClient, error)
func (*APIClient) Client ¶
func (c *APIClient) Client() *HTTPClient
type APIClientOptions ¶
type APIClientOptions struct { BaseURL string RequestTimeout time.Duration CacheStore cache.CacheStore MaxCacheTime time.Duration MaxRequestsPerSecond float64 Auth Authenticator }
type Authenticator ¶
type BasicAuth ¶
type BasicAuth struct {
// contains filtered or unexported fields
}
func NewBasicAuth ¶
type BearerAuth ¶
type BearerAuth string
func NewBearerAuth ¶
func NewBearerAuth(token string) *BearerAuth
func (*BearerAuth) AuthenticateRequest ¶
func (a *BearerAuth) AuthenticateRequest(req *http.Request) error
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(opts APIClientOptions) (*HTTPClient, error)
type QueryArgAuth ¶
type QueryArgAuth struct {
// contains filtered or unexported fields
}
func NewQueryArgAuth ¶
func NewQueryArgAuth(arg, key string) *QueryArgAuth
func (*QueryArgAuth) AuthenticateRequest ¶
func (a *QueryArgAuth) AuthenticateRequest(req *http.Request) error
Click to show internal directories.
Click to hide internal directories.