Documentation
¶
Index ¶
Constants ¶
View Source
const ( // InternalErrorType type of common errors InternalErrorType = "INTERNAL" // GenericErrorType type of common errors GenericErrorType = "GENERIC" // ValidationErrorType type of common errors ValidationErrorType = "VALIDATION" )
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(configuration *configs.Configuration) *server
Types ¶
type CustomBinder ¶
type CustomBinder struct {
// contains filtered or unexported fields
}
CustomBinder struct
type ErrorHandler ¶
type ErrorHandler struct {
// contains filtered or unexported fields
}
ErrorHandler represents the custom http error handler
func NewErrorHandler ¶
func NewErrorHandler(e *echo.Echo) *ErrorHandler
NewErrorHandler returns the ErrorHandler instance
type ErrorResponse ¶
type ErrorResponse struct {
Error *HTTPError `json:"error"`
}
ErrorResponse represents the error response
type HTTPError ¶
type HTTPError struct {
Code int `json:"code"`
Type string `json:"type"`
Message string `json:"message"`
Internal error `json:"-"`
}
HTTPError represents an error that occurred while handling a request
func NewHTTPError ¶
NewHTTPError creates a new HTTPError instance
func NewHTTPGenericError ¶
NewHTTPGenericError creates a new HTTPError instance for generic error
func NewHTTPInternalError ¶
NewHTTPInternalError creates a new HTTPError instance for internal error
func NewHTTPValidationError ¶
NewHTTPValidationError creates a new HTTPError instance for validation error
func (*HTTPError) SetInternal ¶
SetInternal sets actual internal error for more details
Click to show internal directories.
Click to hide internal directories.