Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidKey = &ValidationError{Code: "INVALID_KEY", Message: "Invalid API key"} ErrDisabled = &ValidationError{Code: "DISABLED", Message: "API key is disabled"} ErrExpired = &ValidationError{Code: "EXPIRED", Message: "API key has expired"} ErrRevoked = &ValidationError{Code: "REVOKED", Message: "API key was revoked"} ErrBlocked = &ValidationError{Code: "BLOCKED", Message: "API key is blocked"} ErrRateLimited = &ValidationError{Code: "RATE_LIMITED", Message: "Rate limit exceeded"} ErrQuotaExceeded = &ValidationError{Code: "QUOTA_EXCEEDED", Message: "Quota exceeded"} ErrNotFound = &ValidationError{Code: "NOT_FOUND", Message: "Resource not found"} ErrForbidden = &ValidationError{Code: "FORBIDDEN", Message: "Access forbidden"} ErrServerError = &ValidationError{Code: "SERVER_ERROR", Message: "Server error"} ErrNetworkError = &ValidationError{Code: "NETWORK_ERROR", Message: "Network error"} ErrTimeout = &ValidationError{Code: "TIMEOUT", Message: "Request timed out"} ErrUnknown = &ValidationError{Code: "UNKNOWN", Message: "Unknown error"} )
Functions ¶
func ParseAPIError ¶
func ParseRetryAfter ¶
func ScrubAPIKey ¶ added in v1.0.5
func ValidateURL ¶ added in v1.0.5
Types ¶
type ValidationError ¶ added in v1.0.3
func ParseErrorFromResponse ¶ added in v1.0.3
func ParseErrorFromResponse(body []byte, statusCode int, apiKey string) *ValidationError
func (*ValidationError) Error ¶ added in v1.0.3
func (e *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.