Documentation
¶
Index ¶
- func Abort(c *gin.Context, err *HTTPError, requestId string)
- type ErrorResponse
- type HTTPError
- func BadRequest(message string) *HTTPError
- func Conflict(message string) *HTTPError
- func Forbidden(message string) *HTTPError
- func InternalServerError(message string) *HTTPError
- func New(status int, code string, message string) *HTTPError
- func NotFound(message string) *HTTPError
- func Unauthorized(message string) *HTTPError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Timestamp string `json:"timestamp"`
Status int `json:"status"`
Error string `json:"error"`
Code string `json:"code,omitempty"`
Message string `json:"message"`
Path string `json:"path"`
RequestID string `json:"requestId,omitempty"`
}
func BuildResponse ¶
func BuildResponse(path, requestID string, status int, code string, message string) ErrorResponse
Click to show internal directories.
Click to hide internal directories.