Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOAuthTokenSource ¶ added in v0.10.0
func BuildOAuthTokenSource(cfg *config.Config) oauth2.TokenSource
BuildOAuthTokenSource creates an oauth2.TokenSource from the given config. If refresh credentials are available, the source auto-refreshes expired tokens.
func CheckResponse ¶
CheckResponse returns nil for 2xx responses or an *APIError describing the failure for non-2xx responses.
Types ¶
type APIError ¶
type APIError struct {
StatusCode int
Code string
Message string
Cause string
Remedy string
TraceID string
}
APIError is the structured representation of a non-2xx Oodle API response.
type Client ¶
type Client struct {
// Inner is exported so command files can call generated methods directly.
Inner *client.ClientWithResponses
Config *config.Config
}
Client wraps the generated OpenAPI client and adds Oodle-specific behaviour: API-key injection, retries on transient failures, and friendly error formatting.
Click to show internal directories.
Click to hide internal directories.