answer/internal/base/reason/reason.go

69 lines
3.8 KiB
Go
Raw Normal View History

2022-09-27 17:59:05 +08:00
package reason
const (
// Success .
Success = "base.success"
// UnknownError unknown error
UnknownError = "base.unknown"
// RequestFormatError request format error
RequestFormatError = "base.request_format_error"
// UnauthorizedError unauthorized error
UnauthorizedError = "base.unauthorized_error"
// DatabaseError database error
DatabaseError = "base.database_error"
)
const (
2022-11-22 11:37:37 +08:00
EmailOrPasswordWrong = "error.object.email_or_password_incorrect"
CommentNotFound = "error.comment.not_found"
CommentCannotEditAfterDeadline = "error.comment.cannot_edit_after_deadline"
2022-11-22 11:37:37 +08:00
QuestionNotFound = "error.question.not_found"
2022-11-22 16:54:28 +08:00
QuestionCannotDeleted = "error.question.cannot_deleted"
QuestionCannotClose = "error.question.cannot_close"
QuestionCannotUpdate = "error.question.cannot_update"
2022-11-22 11:37:37 +08:00
AnswerNotFound = "error.answer.not_found"
2022-11-22 16:54:28 +08:00
AnswerCannotDeleted = "error.answer.cannot_deleted"
AnswerCannotUpdate = "error.answer.cannot_update"
2022-11-22 11:37:37 +08:00
CommentEditWithoutPermission = "error.comment.edit_without_permission"
DisallowVote = "error.object.disallow_vote"
DisallowFollow = "error.object.disallow_follow"
DisallowVoteYourSelf = "error.object.disallow_vote_your_self"
CaptchaVerificationFailed = "error.object.captcha_verification_failed"
OldPasswordVerificationFailed = "error.object.old_password_verification_failed"
NewPasswordSameAsPreviousSetting = "error.object.new_password_same_as_previous_setting"
2022-11-22 11:37:37 +08:00
UserNotFound = "error.user.not_found"
UsernameInvalid = "error.user.username_invalid"
UsernameDuplicate = "error.user.username_duplicate"
UserSetAvatar = "error.user.set_avatar"
EmailDuplicate = "error.email.duplicate"
EmailVerifyURLExpired = "error.email.verify_url_expired"
EmailNeedToBeVerified = "error.email.need_to_be_verified"
UserSuspended = "error.user.suspended"
ObjectNotFound = "error.object.not_found"
TagNotFound = "error.tag.not_found"
TagNotContainSynonym = "error.tag.not_contain_synonym_tags"
2022-11-24 15:02:31 +08:00
TagCannotUpdate = "error.tag.cannot_update"
2023-02-14 15:29:07 +08:00
TagIsUsedCannotDelete = "error.tag.is_used_cannot_delete"
2023-03-02 17:00:16 +08:00
TagAlreadyExist = "error.tag.already_exist"
2022-11-22 11:37:37 +08:00
RankFailToMeetTheCondition = "error.rank.fail_to_meet_the_condition"
ThemeNotFound = "error.theme.not_found"
LangNotFound = "error.lang.not_found"
ReportHandleFailed = "error.report.handle_failed"
ReportNotFound = "error.report.not_found"
ReadConfigFailed = "error.config.read_config_failed"
DatabaseConnectionFailed = "error.database.connection_failed"
InstallCreateTableFailed = "error.database.create_table_failed"
InstallConfigFailed = "error.install.create_config_failed"
SiteInfoNotFound = "error.site_info.not_found"
UploadFileSourceUnsupported = "error.upload.source_unsupported"
2023-02-06 19:04:05 +08:00
UploadFileUnsupportedFileFormat = "error.upload.unsupported_file_format"
2022-11-22 11:37:37 +08:00
RecommendTagNotExist = "error.tag.recommend_tag_not_found"
RecommendTagEnter = "error.tag.recommend_tag_enter"
2022-11-25 10:46:39 +08:00
RevisionReviewUnderway = "error.revision.review_underway"
2022-11-25 11:13:58 +08:00
RevisionNoPermission = "error.revision.no_permission"
UserCannotUpdateYourRole = "error.user.cannot_update_your_role"
TagCannotSetSynonymAsItself = "error.tag.cannot_set_synonym_as_itself"
NotAllowedRegistration = "error.user.not_allowed_registration"
SMTPConfigFromNameCannotBeEmail = "error.smtp.config_from_name_cannot_be_email"
2022-09-27 17:59:05 +08:00
)