Versions in this module Expand all Collapse all v0 v0.1.0 May 2, 2026 Changes in this version + const MaxBackoff + const MaxRetries + const MinBackoff + var UploadAttempts atomic.Int64 + func Backoff(minWait, maxWait time.Duration, attemptNumber int, resp *http.Response) time.Duration + func CheckRetry(ctx context.Context, resp *http.Response, err error) (bool, error) + func ClassifyStatus(code int, body string) error + func IsRetryableErr(err error) bool + func IsRetryableStatus(code int) bool + func NewRetryableClient() *retryablehttp.Client + type Client struct + func NewClient(opts Options) *Client + func (c *Client) Do(req *http.Request) (*http.Response, error) + func (c *Client) DoJSON(ctx context.Context, method, url string, body []byte) (*http.Response, error) + func (c *Client) DoStreaming(ctx context.Context, method, url string, contentType string, ...) (*http.Response, error) + func (c *Client) ListLabels(ctx context.Context) ([]Label, error) + func (c *Client) Login(ctx context.Context, req LoginRequest) (*LoginResult, error) + func (c *Client) ServerURL() string + func (c *Client) SetDocumentLabels(ctx context.Context, documentID string, labelIDs []string) error + func (c *Client) URL(path string) string + func (c *Client) Upload(ctx context.Context, params UploadParams) (*UploadResult, error) + type Label struct + Color string + CreatedAt time.Time + CreatedBy string + Description string + DocumentCount int + ID string + Name string + type LoginRequest struct + Password string + Username string + type LoginResult struct + ExpiresAt time.Time + Token string + Username string + type Options struct + InsecureSkipVerify bool + OnTokenRotate func(newToken string, expiresAt time.Time) + Password string + ProfileName string + ServerURL string + Token string + TokenExpiry time.Time + UserAgent string + Username string + WarnOut io.Writer + type ServerResponseSummary struct + DocumentID string + ErrorBody string + Retryable bool + StatusCode int + type UploadParams struct + DisplayName string + Language *string + LocalPath string + OCREnabled *bool + Title *string + type UploadResult struct + DocumentID string + Filename string