Documentation ¶
Index ¶
- func WithAction(action string) func(*SDKError)
- func WithContent(detail string) func(*UnhandledResponseError)
- func WithError(err error) func(*SDKError)
- func WithHeader(h http.Header) func(*UnhandledResponseError)
- func WithRequestID(id string) func(*SDKError)
- func WithStatusCode(code int) func(*UnhandledResponseError)
- type ParameterRequiredError
- type ParameterValueNotAllowedError
- type QingStorError
- type SDKError
- type UnhandledResponseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAction ¶ added in v4.2.0
WithAction set Action for SDKError
func WithContent ¶ added in v4.2.0
func WithContent(detail string) func(*UnhandledResponseError)
WithContent set Content for UnhandledResponseError
func WithHeader ¶ added in v4.2.0
func WithHeader(h http.Header) func(*UnhandledResponseError)
WithHeader set Header for UnhandledResponseError
func WithRequestID ¶ added in v4.2.0
WithRequestID set RequestID for SDKError
func WithStatusCode ¶ added in v4.2.0
func WithStatusCode(code int) func(*UnhandledResponseError)
WithStatusCode set StatusCode for UnhandledResponseError
Types ¶
type ParameterRequiredError ¶
ParameterRequiredError indicates that the required parameter is missing.
func (ParameterRequiredError) Error ¶
func (e ParameterRequiredError) Error() string
Error returns the description of ParameterRequiredError.
type ParameterValueNotAllowedError ¶
type ParameterValueNotAllowedError struct { ParameterName string ParameterValue string AllowedValues []string }
ParameterValueNotAllowedError indicates that the parameter value is not allowed.
func (ParameterValueNotAllowedError) Error ¶
func (e ParameterValueNotAllowedError) Error() string
Error returns the description of ParameterValueNotAllowedError.
type QingStorError ¶
type QingStorError struct { StatusCode int Code string `json:"code"` Message string `json:"message"` RequestID string `json:"request_id"` ReferenceURL string `json:"url"` }
QingStorError stores information of an QingStor error response.
func (QingStorError) Error ¶
func (qse QingStorError) Error() string
Error returns the description of QingStor error response.
type SDKError ¶ added in v4.2.0
SDKError stores information of an error return by sdk itself.
func NewSDKError ¶ added in v4.2.0
NewSDKError conduct a SDKError
type UnhandledResponseError ¶ added in v4.2.0
UnhandledResponseError stores information of an unhandled error response.
func NewUnhandledResponseError ¶ added in v4.2.0
func NewUnhandledResponseError(fs ...func(*UnhandledResponseError)) UnhandledResponseError
NewUnhandledResponseError conduct an unhandled response error
func (UnhandledResponseError) Error ¶ added in v4.2.0
func (e UnhandledResponseError) Error() string
Error returns the description of QingStor error response.