Documentation ¶
Index ¶
- type APIErrorObject
- type APIErrorObjectType
- type AuthenticationError
- type AuthenticationErrorType
- type BillingError
- type BillingErrorType
- type ErrorObject
- type ErrorObjectType
- type ErrorObjectUnion
- type ErrorResponse
- type ErrorResponseType
- type GatewayTimeoutError
- type GatewayTimeoutErrorType
- type InvalidRequestError
- type InvalidRequestErrorType
- type NotFoundError
- type NotFoundErrorType
- type OverloadedError
- type OverloadedErrorType
- type PermissionError
- type PermissionErrorType
- type RateLimitError
- type RateLimitErrorType
- type UnionString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIErrorObject ¶
type APIErrorObject struct { Message string `json:"message,required"` Type APIErrorObjectType `json:"type,required"` JSON apiErrorObjectJSON `json:"-"` }
func (APIErrorObject) ImplementsSharedErrorObject ¶
func (r APIErrorObject) ImplementsSharedErrorObject()
func (*APIErrorObject) UnmarshalJSON ¶
func (r *APIErrorObject) UnmarshalJSON(data []byte) (err error)
type APIErrorObjectType ¶
type APIErrorObjectType string
const (
APIErrorObjectTypeAPIError APIErrorObjectType = "api_error"
)
func (APIErrorObjectType) IsKnown ¶
func (r APIErrorObjectType) IsKnown() bool
type AuthenticationError ¶
type AuthenticationError struct { Message string `json:"message,required"` Type AuthenticationErrorType `json:"type,required"` JSON authenticationErrorJSON `json:"-"` }
func (AuthenticationError) ImplementsSharedErrorObject ¶
func (r AuthenticationError) ImplementsSharedErrorObject()
func (*AuthenticationError) UnmarshalJSON ¶
func (r *AuthenticationError) UnmarshalJSON(data []byte) (err error)
type AuthenticationErrorType ¶
type AuthenticationErrorType string
const (
AuthenticationErrorTypeAuthenticationError AuthenticationErrorType = "authentication_error"
)
func (AuthenticationErrorType) IsKnown ¶
func (r AuthenticationErrorType) IsKnown() bool
type BillingError ¶
type BillingError struct { Message string `json:"message,required"` Type BillingErrorType `json:"type,required"` JSON billingErrorJSON `json:"-"` }
func (BillingError) ImplementsSharedErrorObject ¶
func (r BillingError) ImplementsSharedErrorObject()
func (*BillingError) UnmarshalJSON ¶
func (r *BillingError) UnmarshalJSON(data []byte) (err error)
type BillingErrorType ¶
type BillingErrorType string
const (
BillingErrorTypeBillingError BillingErrorType = "billing_error"
)
func (BillingErrorType) IsKnown ¶
func (r BillingErrorType) IsKnown() bool
type ErrorObject ¶
type ErrorObject struct { Message string `json:"message,required"` Type ErrorObjectType `json:"type,required"` JSON errorObjectJSON `json:"-"` // contains filtered or unexported fields }
func (ErrorObject) AsUnion ¶
func (r ErrorObject) AsUnion() ErrorObjectUnion
AsUnion returns a ErrorObjectUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are shared.InvalidRequestError, shared.AuthenticationError, shared.BillingError, shared.PermissionError, shared.NotFoundError, shared.RateLimitError, shared.GatewayTimeoutError, shared.APIErrorObject, shared.OverloadedError.
func (*ErrorObject) UnmarshalJSON ¶
func (r *ErrorObject) UnmarshalJSON(data []byte) (err error)
type ErrorObjectType ¶
type ErrorObjectType string
const ( ErrorObjectTypeInvalidRequestError ErrorObjectType = "invalid_request_error" ErrorObjectTypeAuthenticationError ErrorObjectType = "authentication_error" ErrorObjectTypeBillingError ErrorObjectType = "billing_error" ErrorObjectTypePermissionError ErrorObjectType = "permission_error" ErrorObjectTypeNotFoundError ErrorObjectType = "not_found_error" ErrorObjectTypeRateLimitError ErrorObjectType = "rate_limit_error" ErrorObjectTypeTimeoutError ErrorObjectType = "timeout_error" ErrorObjectTypeAPIError ErrorObjectType = "api_error" ErrorObjectTypeOverloadedError ErrorObjectType = "overloaded_error" )
func (ErrorObjectType) IsKnown ¶
func (r ErrorObjectType) IsKnown() bool
type ErrorObjectUnion ¶
type ErrorObjectUnion interface {
}Union satisfied by shared.InvalidRequestError, shared.AuthenticationError, shared.BillingError, shared.PermissionError, shared.NotFoundError, shared.RateLimitError, shared.GatewayTimeoutError, shared.APIErrorObject or shared.OverloadedError.
type ErrorResponse ¶
type ErrorResponse struct { Error ErrorObject `json:"error,required"` Type ErrorResponseType `json:"type,required"` JSON errorResponseJSON `json:"-"` }
func (*ErrorResponse) UnmarshalJSON ¶
func (r *ErrorResponse) UnmarshalJSON(data []byte) (err error)
type ErrorResponseType ¶
type ErrorResponseType string
const (
ErrorResponseTypeError ErrorResponseType = "error"
)
func (ErrorResponseType) IsKnown ¶
func (r ErrorResponseType) IsKnown() bool
type GatewayTimeoutError ¶
type GatewayTimeoutError struct { Message string `json:"message,required"` Type GatewayTimeoutErrorType `json:"type,required"` JSON gatewayTimeoutErrorJSON `json:"-"` }
func (GatewayTimeoutError) ImplementsSharedErrorObject ¶
func (r GatewayTimeoutError) ImplementsSharedErrorObject()
func (*GatewayTimeoutError) UnmarshalJSON ¶
func (r *GatewayTimeoutError) UnmarshalJSON(data []byte) (err error)
type GatewayTimeoutErrorType ¶
type GatewayTimeoutErrorType string
const (
GatewayTimeoutErrorTypeTimeoutError GatewayTimeoutErrorType = "timeout_error"
)
func (GatewayTimeoutErrorType) IsKnown ¶
func (r GatewayTimeoutErrorType) IsKnown() bool
type InvalidRequestError ¶
type InvalidRequestError struct { Message string `json:"message,required"` Type InvalidRequestErrorType `json:"type,required"` JSON invalidRequestErrorJSON `json:"-"` }
func (InvalidRequestError) ImplementsSharedErrorObject ¶
func (r InvalidRequestError) ImplementsSharedErrorObject()
func (*InvalidRequestError) UnmarshalJSON ¶
func (r *InvalidRequestError) UnmarshalJSON(data []byte) (err error)
type InvalidRequestErrorType ¶
type InvalidRequestErrorType string
const (
InvalidRequestErrorTypeInvalidRequestError InvalidRequestErrorType = "invalid_request_error"
)
func (InvalidRequestErrorType) IsKnown ¶
func (r InvalidRequestErrorType) IsKnown() bool
type NotFoundError ¶
type NotFoundError struct { Message string `json:"message,required"` Type NotFoundErrorType `json:"type,required"` JSON notFoundErrorJSON `json:"-"` }
func (NotFoundError) ImplementsSharedErrorObject ¶
func (r NotFoundError) ImplementsSharedErrorObject()
func (*NotFoundError) UnmarshalJSON ¶
func (r *NotFoundError) UnmarshalJSON(data []byte) (err error)
type NotFoundErrorType ¶
type NotFoundErrorType string
const (
NotFoundErrorTypeNotFoundError NotFoundErrorType = "not_found_error"
)
func (NotFoundErrorType) IsKnown ¶
func (r NotFoundErrorType) IsKnown() bool
type OverloadedError ¶
type OverloadedError struct { Message string `json:"message,required"` Type OverloadedErrorType `json:"type,required"` JSON overloadedErrorJSON `json:"-"` }
func (OverloadedError) ImplementsSharedErrorObject ¶
func (r OverloadedError) ImplementsSharedErrorObject()
func (*OverloadedError) UnmarshalJSON ¶
func (r *OverloadedError) UnmarshalJSON(data []byte) (err error)
type OverloadedErrorType ¶
type OverloadedErrorType string
const (
OverloadedErrorTypeOverloadedError OverloadedErrorType = "overloaded_error"
)
func (OverloadedErrorType) IsKnown ¶
func (r OverloadedErrorType) IsKnown() bool
type PermissionError ¶
type PermissionError struct { Message string `json:"message,required"` Type PermissionErrorType `json:"type,required"` JSON permissionErrorJSON `json:"-"` }
func (PermissionError) ImplementsSharedErrorObject ¶
func (r PermissionError) ImplementsSharedErrorObject()
func (*PermissionError) UnmarshalJSON ¶
func (r *PermissionError) UnmarshalJSON(data []byte) (err error)
type PermissionErrorType ¶
type PermissionErrorType string
const (
PermissionErrorTypePermissionError PermissionErrorType = "permission_error"
)
func (PermissionErrorType) IsKnown ¶
func (r PermissionErrorType) IsKnown() bool
type RateLimitError ¶
type RateLimitError struct { Message string `json:"message,required"` Type RateLimitErrorType `json:"type,required"` JSON rateLimitErrorJSON `json:"-"` }
func (RateLimitError) ImplementsSharedErrorObject ¶
func (r RateLimitError) ImplementsSharedErrorObject()
func (*RateLimitError) UnmarshalJSON ¶
func (r *RateLimitError) UnmarshalJSON(data []byte) (err error)
type RateLimitErrorType ¶
type RateLimitErrorType string
const (
RateLimitErrorTypeRateLimitError RateLimitErrorType = "rate_limit_error"
)
func (RateLimitErrorType) IsKnown ¶
func (r RateLimitErrorType) IsKnown() bool
type UnionString ¶
type UnionString string
func (UnionString) ImplementsAnthropicBeta ¶
func (UnionString) ImplementsAnthropicBeta()
func (UnionString) ImplementsBetaMessageCountTokensParamsSystemUnion ¶
func (UnionString) ImplementsBetaMessageCountTokensParamsSystemUnion()
func (UnionString) ImplementsMessageCountTokensParamsSystemUnion ¶
func (UnionString) ImplementsMessageCountTokensParamsSystemUnion()
func (UnionString) ImplementsModel ¶
func (UnionString) ImplementsModel()
Click to show internal directories.
Click to hide internal directories.