Documentation ¶
Index ¶
- Constants
- type ClientError
- type Error
- type ServerError
- func (err *ServerError) Comment() string
- func (err *ServerError) Error() string
- func (err *ServerError) ErrorCode() string
- func (err *ServerError) HostId() string
- func (err *ServerError) HttpStatus() int
- func (err *ServerError) Message() string
- func (err *ServerError) OriginError() error
- func (err *ServerError) Recommend() string
- func (err *ServerError) RequestId() string
- type ServerErrorWrapper
- type SignatureDostNotMatchWrapper
Constants ¶
View Source
const ( DefaultClientErrorStatus = 400 DefaultClientErrorCode = "SDK.ClientError" UnsupportedCredentialErrorCode = "SDK.UnsupportedCredential" UnsupportedCredentialErrorMessage = "Specified credential (type = %s) is not supported, please check" CanNotResolveEndpointErrorCode = "SDK.CanNotResolveEndpoint" CanNotResolveEndpointErrorMessage = "Can not resolve endpoint(param = %s), please check your accessKey with secret, and read the user guide\n %s" UnsupportedParamPositionErrorCode = "SDK.UnsupportedParamPosition" UnsupportedParamPositionErrorMessage = "Specified param position (%s) is not supported, please upgrade sdk and retry" AsyncFunctionNotEnabledCode = "SDK.AsyncFunctionNotEnabled" AsyncFunctionNotEnabledMessage = "Async function is not enabled in client, please invoke 'client.EnableAsync' function" UnknownRequestTypeErrorCode = "SDK.UnknownRequestType" UnknownRequestTypeErrorMessage = "Unknown Request Type: %s" MissingParamErrorCode = "SDK.MissingParam" InvalidParamErrorCode = "SDK.InvalidParam" JsonUnmarshalErrorCode = "SDK.JsonUnmarshalError" JsonUnmarshalErrorMessage = "Failed to unmarshal response, but you can get the data via response.GetHttpStatusCode() and response.GetHttpContentString()" TimeoutErrorCode = "SDK.TimeoutError" TimeoutErrorMessage = "The request timed out %s times(%s for retry), perhaps we should have the threshold raised a little?" )
View Source
const IncompleteSignatureErrorCode = "IncompleteSignature"
View Source
const MessageContain = "server string to sign is:"
View Source
const SignatureDostNotMatchErrorCode = "SignatureDoesNotMatch"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientError ¶
type ClientError struct {
// contains filtered or unexported fields
}
func (*ClientError) Error ¶
func (err *ClientError) Error() string
func (*ClientError) ErrorCode ¶
func (err *ClientError) ErrorCode() string
func (*ClientError) HttpStatus ¶
func (*ClientError) HttpStatus() int
func (*ClientError) Message ¶
func (err *ClientError) Message() string
func (*ClientError) OriginError ¶
func (err *ClientError) OriginError() error
func (*ClientError) String ¶
func (err *ClientError) String() string
type Error ¶
type Error interface { error HttpStatus() int ErrorCode() string Message() string OriginError() error }
func NewClientError ¶
func NewServerError ¶
type ServerError ¶
type ServerError struct {
// contains filtered or unexported fields
}
func WrapServerError ¶
func WrapServerError(originError *ServerError, wrapInfo map[string]string) *ServerError
func (*ServerError) Comment ¶
func (err *ServerError) Comment() string
func (*ServerError) Error ¶
func (err *ServerError) Error() string
func (*ServerError) ErrorCode ¶
func (err *ServerError) ErrorCode() string
func (*ServerError) HostId ¶
func (err *ServerError) HostId() string
func (*ServerError) HttpStatus ¶
func (err *ServerError) HttpStatus() int
func (*ServerError) Message ¶
func (err *ServerError) Message() string
func (*ServerError) OriginError ¶
func (err *ServerError) OriginError() error
func (*ServerError) Recommend ¶
func (err *ServerError) Recommend() string
func (*ServerError) RequestId ¶
func (err *ServerError) RequestId() string
type ServerErrorWrapper ¶
type ServerErrorWrapper interface {
// contains filtered or unexported methods
}
type SignatureDostNotMatchWrapper ¶
type SignatureDostNotMatchWrapper struct { }
Click to show internal directories.
Click to hide internal directories.