Documentation
¶
Index ¶
- Variables
- func GetMessage(messageId string, messageArgs ...any) string
- func IsType(err error, errorType AwsWrapperErrorType) bool
- type AwsWrapperError
- func NewDsnParsingError(message string) *AwsWrapperError
- func NewFailoverFailedError(message string) *AwsWrapperError
- func NewGenericAwsWrapperError(message string) *AwsWrapperError
- func NewIllegalArgumentError(message string) *AwsWrapperError
- func NewLoginError(message string) *AwsWrapperError
- func NewTimeoutError(message string) *AwsWrapperError
- func NewUnavailableHostError(host string) *AwsWrapperError
- func NewUnsupportedMethodError(method string, object string) *AwsWrapperError
- func NewUnsupportedStrategyError(message string) *AwsWrapperError
- type AwsWrapperErrorType
- type ErrorHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var FailoverSuccessError = &AwsWrapperError{GetMessage("Failover.connectionChangedError"), FailoverSuccessErrorType}
View Source
var InternalQueryTimeoutError = &AwsWrapperError{GetMessage("Failover.timeoutError"), InternalQueryTimeoutErrorType}
View Source
var LocalizerMutex = &sync.Mutex{}
View Source
var ShouldNotBeCalledError = &AwsWrapperError{Message: "Shouldn't be called.", ErrorType: GenericAwsWrapperErrorType}
View Source
var TransactionResolutionUnknownError = &AwsWrapperError{ GetMessage("Failover.transactionResolutionUnknownError"), TransactionResolutionUnknownErrorType}
Functions ¶
func GetMessage ¶
func IsType ¶
func IsType(err error, errorType AwsWrapperErrorType) bool
Types ¶
type AwsWrapperError ¶
type AwsWrapperError struct {
Message string
ErrorType AwsWrapperErrorType
}
func NewDsnParsingError ¶
func NewDsnParsingError(message string) *AwsWrapperError
func NewFailoverFailedError ¶
func NewFailoverFailedError(message string) *AwsWrapperError
func NewGenericAwsWrapperError ¶
func NewGenericAwsWrapperError(message string) *AwsWrapperError
func NewIllegalArgumentError ¶
func NewIllegalArgumentError(message string) *AwsWrapperError
func NewLoginError ¶
func NewLoginError(message string) *AwsWrapperError
func NewTimeoutError ¶
func NewTimeoutError(message string) *AwsWrapperError
func NewUnavailableHostError ¶
func NewUnavailableHostError(host string) *AwsWrapperError
func NewUnsupportedMethodError ¶
func NewUnsupportedMethodError(method string, object string) *AwsWrapperError
func NewUnsupportedStrategyError ¶
func NewUnsupportedStrategyError(message string) *AwsWrapperError
func (*AwsWrapperError) Error ¶
func (a *AwsWrapperError) Error() string
func (*AwsWrapperError) IsFailoverErrorType ¶
func (a *AwsWrapperError) IsFailoverErrorType() bool
func (*AwsWrapperError) IsType ¶
func (a *AwsWrapperError) IsType(errorType AwsWrapperErrorType) bool
type AwsWrapperErrorType ¶
type AwsWrapperErrorType int
const ( GenericAwsWrapperErrorType AwsWrapperErrorType = 0 UnsupportedStrategyErrorType AwsWrapperErrorType = 1 UnsupportedMethodErrorType AwsWrapperErrorType = 2 IllegalArgumentErrorType AwsWrapperErrorType = 3 LoginErrorType AwsWrapperErrorType = 4 InternalQueryTimeoutErrorType AwsWrapperErrorType = 5 DsnParsingErrorType AwsWrapperErrorType = 7 TimeoutErrorType AwsWrapperErrorType = 8 FailoverSuccessErrorType AwsWrapperErrorType = 300 FailoverFailedErrorType AwsWrapperErrorType = 301 TransactionResolutionUnknownErrorType AwsWrapperErrorType = 302 )
Click to show internal directories.
Click to hide internal directories.