Documentation
¶
Index ¶
- func BackoffDuration(usage int) time.Duration
- func CheckResponse(resp *meta.Response) error
- func IsRetryableHTTP(statusCode int) bool
- type Client
- func (c *Client) Get(ctx context.Context, path string, params url.Values) (*meta.Response, error)
- func (c *Client) Paginate(ctx context.Context, path string, params url.Values) *meta.PageIterator
- func (c *Client) Post(ctx context.Context, path string, params map[string]string) (*meta.Response, error)
- func (c *Client) SetDryRun(v bool)
- func (c *Client) SetVerbose(v bool)
- func (c *Client) Upload(ctx context.Context, path string, file io.Reader, filename string, size int64, ...) (*meta.Response, error)
- type ClientConfig
- type RateLimit
- type RetryConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackoffDuration ¶
func CheckResponse ¶
func IsRetryableHTTP ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(cfg ClientConfig) *Client
func (*Client) SetVerbose ¶
type ClientConfig ¶
type RateLimit ¶
func ParseRateLimit ¶
type RetryConfig ¶
func DefaultRetryConfig ¶
func DefaultRetryConfig() RetryConfig
func (RetryConfig) DelayForAttempt ¶
func (r RetryConfig) DelayForAttempt(attempt int) time.Duration
Click to show internal directories.
Click to hide internal directories.