Documentation ¶
Index ¶
- func InternalServerError(c *fiber.Ctx, msg string) *restResponseError
- func NewRestResponseError(c *fiber.Ctx, re ResponseError) *restResponseError
- func NewRestResponseErrorWithCodeAndMsg(c *fiber.Ctx, code, msg string) *restResponseError
- type PaginationResponse
- type ResponseError
- type RestResponsePagination
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InternalServerError ¶
func InternalServerError(c *fiber.Ctx, msg string) *restResponseError
InternalServerError creates a generic internal server error response
func NewRestResponseError ¶
func NewRestResponseError(c *fiber.Ctx, re ResponseError) *restResponseError
NewRestResponseError creates an error to restResponseError and logs it
func NewRestResponseErrorWithCodeAndMsg ¶
func NewRestResponseErrorWithCodeAndMsg(c *fiber.Ctx, code, msg string) *restResponseError
NewRestResponseErrorWithCodeAndMsg creates a new restResponseError
Types ¶
type PaginationResponse ¶
type PaginationResponse struct { PageNumber int `json:"pageNumber"` PageSize int `json:"pageSize"` Total int `json:"total"` }
PaginationResponse represents pagination details
type ResponseError ¶
ResponseError represents an error
type RestResponsePagination ¶
type RestResponsePagination[T any] struct { Pagination PaginationResponse `json:"pagination"` Elements []T `json:"elements"` }
RestResponsePagination represents a paginated response
Click to show internal directories.
Click to hide internal directories.