Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrConflict = errors.New("conflict")
ErrConflict is returned when the server returns 409. This typically means the resource already exists (e.g., duplicate link).
var ErrRateLimited = errors.New("rate limited")
ErrRateLimited is returned when retries are exhausted on 429 responses.
var ErrSessionNotFound = errors.New("session not found")
ErrSessionNotFound is returned when the server returns 404. This typically means the session was deleted from the backend.
ErrUnauthorized is returned when the server returns 401 or 403. This typically means the API key is invalid or expired.
Functions ¶
func BuildUserAgent ¶
BuildUserAgent constructs a User-Agent string in the format: confab/version (os; arch)
func SetUserAgent ¶
func SetUserAgent(ua string)
SetUserAgent sets the User-Agent header for all HTTP requests. Should be called once at startup before any requests are made.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a configured HTTP client for making authenticated requests to the backend
func (*Client) DoJSON ¶
DoJSON performs an HTTP request with JSON body and parses JSON response Automatically sets Content-Type, Authorization, and handles error responses. Payloads larger than 1KB are compressed with zstd. Retries with exponential backoff on 429 (rate limited) responses.