Documentation ¶
Index ¶
Constants ¶
View Source
const ( SuccessStatus = "SUCCESS" ValidationErrStatus = "VALIDATION_ERROR" BadRequestStatus = "BAD_REQUEST" ForbiddenStatus = "FORBIDDEN" InternalErrStatus = "SERVER_ERROR" NotFoundStatus = "NOT_FOUND" NotAcceptableStatus = "NOT_ACCEPTABLE" TooEarlyStatus = "TOO_EARLY" TooManyRequestStatus = "TOO_MANY_REQUEST" DuplicateStatus = "DUPLICATE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultResponse ¶
type DefaultResponse struct { Code int `json:"code"` Status string `json:"status,omitempty"` Message string `json:"message"` }
DefaultResponse default payload response
func NewDefaultCreatedResponse ¶
func NewDefaultCreatedResponse() DefaultResponse
NewDefaultSuccessResponse default validation error response
func NewDefaultSuccessResponse ¶
func NewDefaultSuccessResponse() DefaultResponse
NewDefaultSuccessResponse default validation error response
func NewForbiddenResponse ¶
func NewForbiddenResponse(msg string) DefaultResponse
NewUnauthorizedResponse default unauthorized response
func NewUnauthorizedResponse ¶
func NewUnauthorizedResponse(msg string) DefaultResponse
NewUnauthorizedResponse default unauthorized response
func NewValidationErrorResponse ¶
func NewValidationErrorResponse(message string) DefaultResponse
NewValidationErrorResponse default validation error response
Click to show internal directories.
Click to hide internal directories.