Documentation
¶
Index ¶
- func RecoveryHandlerMiddleware() gin.HandlerFunc
- type ErrorCode
- type ErrorResponse
- func EntityConflictException(e error, transactionId, correlationId string) *ErrorResponse
- func EntityGoneException(e error, transactionId, correlationId string) *ErrorResponse
- func EntityNotFoundException(e error, transactionId, correlationId string) *ErrorResponse
- func EntityUnauthorizedException(e error, transactionId, correlationId string) *ErrorResponse
- func EntityValidationException(e error, transactionId, correlationId string) *ErrorResponse
- func GatewayException(e error, transactionId, correlationId string) *ErrorResponse
- func GatewayTimeoutException(e error, transactionId, correlationId string) *ErrorResponse
- func InternalServerException(e error, transactionId, correlationId string) *ErrorResponse
- func MethodNotAllowedException(e error, transactionId, correlationId string) *ErrorResponse
- func NewException(e error, errorMessage, errorDetails, transactionId, correlationId string, ...) *ErrorResponse
- func ServerOverburdenedException(e error, transactionId, correlationId string) *ErrorResponse
- func TransactionForbiddenException(e error, transactionId, correlationId string) *ErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecoveryHandlerMiddleware ¶
func RecoveryHandlerMiddleware() gin.HandlerFunc
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
StatusCode int `json:"-"`
ErrorCode int `json:"errorCode,omitEmpty"`
ErrorMessage string `json:"errorMessage,omitEmpty"`
ErrorDetails string `json:"errorDetails,omitEmpty"`
TransactionId string `json:"transactionId,omitEmpty"`
CorrelationId string `json:"correlationId,omitEmpty"`
// contains filtered or unexported fields
}
func EntityConflictException ¶
func EntityConflictException(e error, transactionId, correlationId string) *ErrorResponse
func EntityGoneException ¶
func EntityGoneException(e error, transactionId, correlationId string) *ErrorResponse
func EntityNotFoundException ¶
func EntityNotFoundException(e error, transactionId, correlationId string) *ErrorResponse
func EntityUnauthorizedException ¶
func EntityUnauthorizedException(e error, transactionId, correlationId string) *ErrorResponse
func EntityValidationException ¶
func EntityValidationException(e error, transactionId, correlationId string) *ErrorResponse
func GatewayException ¶
func GatewayException(e error, transactionId, correlationId string) *ErrorResponse
func GatewayTimeoutException ¶
func GatewayTimeoutException(e error, transactionId, correlationId string) *ErrorResponse
func InternalServerException ¶
func InternalServerException(e error, transactionId, correlationId string) *ErrorResponse
func MethodNotAllowedException ¶
func MethodNotAllowedException(e error, transactionId, correlationId string) *ErrorResponse
func NewException ¶
func NewException(e error, errorMessage, errorDetails, transactionId, correlationId string, statusCode, errorCoder int) *ErrorResponse
func ServerOverburdenedException ¶
func ServerOverburdenedException(e error, transactionId, correlationId string) *ErrorResponse
func TransactionForbiddenException ¶
func TransactionForbiddenException(e error, transactionId, correlationId string) *ErrorResponse
func (*ErrorResponse) Error ¶
func (err *ErrorResponse) Error() string
func (*ErrorResponse) Unwrap ¶
func (err *ErrorResponse) Unwrap() error
Click to show internal directories.
Click to hide internal directories.