Versions in this module Expand all Collapse all v0 v0.1.0 Aug 15, 2026 Changes in this version + const APIVersion + func ContextWithRequestContext(ctx context.Context, requestCtx *RequestContext) context.Context + func ContextWithRequestContextFromRequest(r *http.Request) (context.Context, error) + func WithInternal(err error) errorOption + func WithOffendingParam(jsonPath string) errorOption + func WithRetryAfter(d time.Duration) errorOption + func WithStatusCode(status int) errorOption + func WithSupportedVersions(versions []string) errorOption + type Error struct + Code ErrorCode + Internal error + Message string + Param *string + SupportedVersions []string + Type ErrorType + func NewHTTPError(status int, typ ErrorType, code ErrorCode, message string, opts ...errorOption) *Error + func NewInvalidRequestError(message string, opts ...errorOption) *Error + func NewProcessingError(message string, opts ...errorOption) *Error + func NewRateLimitExceededError(message string, opts ...errorOption) *Error + func NewServiceUnavailableError(message string, opts ...errorOption) *Error + func (e *Error) Error() string + func (e *Error) RetryAfter() time.Duration + func (e *Error) StatusCode() int + type ErrorCode string + const DuplicateRequest + const IdempotencyConflict + const IdempotencyInFlight + const IdempotencyKeyRequired + const InvalidAuthorization + const InvalidCard + const InvalidSignature + const MissingAPIVersion + const MissingAuthorization + const SignatureRequired + const StaleTimestamp + const TooManyRequests + const UnsupportedAPIVersion + type ErrorType string + const InvalidRequest + const ProcessingError + const RateLimitExceeded + const ServiceUnavailable + type RequestContext struct + APIVersion string + AcceptLanguage string + Authorization string + IdempotencyKey string + RequestID string + Signature string + Timestamp string + UserAgent string + func RequestContextFromContext(ctx context.Context) *RequestContext + func RequestContextFromRequest(r *http.Request) (*RequestContext, error)