Documentation
¶
Index ¶
- Constants
- func NewConflictedError() gen.ImplResponse
- func NewConflictedErrorWithMessage(message string) gen.ImplResponse
- func NewInternalError() gen.ImplResponse
- func NewInternalErrorWithMessage(message string) gen.ImplResponse
- func NewLockedError() gen.ImplResponse
- func NewLockedErrorWithMessage(message string) gen.ImplResponse
- func NewNotFoundError() gen.ImplResponse
- func NewNotFoundErrorWithMessage(message string) gen.ImplResponse
- func NewPermissionError() gen.ImplResponse
- func NewPermissionErrorWithMessage(message string) gen.ImplResponse
- func NewRequestError() gen.ImplResponse
- func NewRequestErrorWithMessage(message string) gen.ImplResponse
- func NewUnauthorizedError() gen.ImplResponse
- func NewUnauthorizedErrorWithMessage(message string) gen.ImplResponse
Constants ¶
const ( // MessageRequestError is default response message for 400 BadRequest error MessageRequestError = "Your request is not valid." // MessageLockedError is default response message for 423 Locked error MessageLockedError = "Specified content is locked and not editable." // MessageNotFoundError is default response message for 404 NotFound error MessageNotFoundError = "Specified content was not exist." MessageUnauthorizedError = "Probably your password incorrect." // MessageConflictedError is default response message for 409 Conflict error MessageConflictedError = "Specified content was already exists." // MessagePermissionError is default response message for 403 Forbidden error MessagePermissionError = "You don't have enough permission to do it." // MessageInternalError is default response message for 500 Internal error MessageInternalError = "Unfortunately, the server exploded." )
Variables ¶
This section is empty.
Functions ¶
func NewConflictedError ¶
func NewConflictedError() gen.ImplResponse
NewConflictedError creates 409 ConflictError response
func NewConflictedErrorWithMessage ¶
func NewConflictedErrorWithMessage(message string) gen.ImplResponse
NewConflictedErrorWithMessage creates 409 ConflictError response with using message
func NewInternalError ¶
func NewInternalError() gen.ImplResponse
NewInternalError creates 500 InternalError response
func NewInternalErrorWithMessage ¶
func NewInternalErrorWithMessage(message string) gen.ImplResponse
NewInternalErrorWithMessage creates 500 InternalError response with using message
func NewLockedError ¶
func NewLockedError() gen.ImplResponse
NewLockedError creates 423 Locked response
func NewLockedErrorWithMessage ¶
func NewLockedErrorWithMessage(message string) gen.ImplResponse
NewLockedErrorWithMessage creates 423 Locked response with using message
func NewNotFoundError ¶
func NewNotFoundError() gen.ImplResponse
NewNotFoundError creates 404 NotFound response
func NewNotFoundErrorWithMessage ¶
func NewNotFoundErrorWithMessage(message string) gen.ImplResponse
NewNotFoundErrorWithMessage creates 404 NotFound response with using message
func NewPermissionError ¶
func NewPermissionError() gen.ImplResponse
NewPermissionError creates 403 Forbidden response
func NewPermissionErrorWithMessage ¶
func NewPermissionErrorWithMessage(message string) gen.ImplResponse
NewPermissionErrorWithMessage creates 403 Forbidden response with using message
func NewRequestError ¶
func NewRequestError() gen.ImplResponse
NewRequestError creates 400 BadRequest response
func NewRequestErrorWithMessage ¶
func NewRequestErrorWithMessage(message string) gen.ImplResponse
NewRequestErrorWithMessage creates 400 BadRequest response with using message
func NewUnauthorizedError ¶
func NewUnauthorizedError() gen.ImplResponse
NewUnauthorizedError creates 401 Unauthorized response
func NewUnauthorizedErrorWithMessage ¶
func NewUnauthorizedErrorWithMessage(message string) gen.ImplResponse
NewUnauthorizedErrorWithMessage creates 401 Unauthorized response with using message
Types ¶
This section is empty.