spark-server/internal/pkg/i18n/keys.go
zhr ae9a71034d feat: implement Spark IM V3 modular monolith
Add HTTP /v1 MVC, TCP send path, groups with server-side member-avatar collage, object-storage upload, and friends/favorites around the architecture-v3 layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 19:52:11 +08:00

120 lines
5.4 KiB
Go

package i18n
// Message keys. Error keys are "err." + AppError.Code.
const (
KeyOK = "ok"
KeyValidateInvalidJSON = "validate.invalid_json"
KeyValidateFailed = "validate.failed"
KeyValidateRequired = "validate.required"
KeyValidateLen = "validate.len"
KeyValidateMin = "validate.min"
KeyValidateMax = "validate.max"
KeyValidateGt = "validate.gt"
KeyValidateGte = "validate.gte"
KeyValidateLt = "validate.lt"
KeyValidateLte = "validate.lte"
KeyValidateEmail = "validate.email"
KeyValidateOneof = "validate.oneof"
KeyValidateDefault = "validate.default"
KeyFieldPhone = "field.phone"
KeyFieldPassword = "field.password"
KeyFieldDeviceID = "field.device_id"
KeyFieldEmail = "field.email"
KeyFieldVerifyCode = "field.verify_code"
KeyFieldSparkID = "field.spark_id"
KeyFieldPlatform = "field.platform"
KeyFieldDeviceName = "field.device_name"
KeyFieldDeviceType = "field.device_type"
KeyFieldRefreshToken = "field.refresh_token"
KeyFieldNickname = "field.nickname"
KeyFieldAvatar = "field.avatar"
KeyFieldGender = "field.gender"
KeyFieldBirthday = "field.birthday"
KeyFieldUID = "field.uid"
KeyFieldQRCode = "field.qrcode"
KeyFieldReason = "field.reason"
KeyFieldRemark = "field.remark"
KeyFieldRequestID = "field.request_id"
KeyFieldReportReason = "field.report_reason"
KeyFieldReportDetail = "field.report_detail"
KeyFieldPurpose = "field.purpose"
KeyFieldMime = "field.mime"
KeyFieldSize = "field.size"
KeyFieldObjectKey = "field.object_key"
KeyFieldMsgID = "field.msg_id"
KeyFieldGroupID = "field.group_id"
KeyLoginPhoneRequired = "validate.login.phone_required"
KeyLoginPasswordRequired = "validate.login.password_required"
KeyLoginPasswordMin = "validate.login.password_min"
KeyLoginDeviceRequired = "validate.login.device_required"
KeyLoginEmailRequired = "validate.login.email_required"
KeyLoginEmailInvalid = "validate.login.email_invalid"
KeyLoginCodeRequired = "validate.login.code_required"
KeyUserSparkIDRequired = "validate.user.spark_id_required"
KeyUserSparkIDInvalid = "validate.user.spark_id_invalid"
KeyUserNicknameInvalid = "validate.user.nickname_invalid"
KeyUserAvatarInvalid = "validate.user.avatar_invalid"
KeyUserGenderInvalid = "validate.user.gender_invalid"
KeyUserBirthdayInvalid = "validate.user.birthday_invalid"
KeyLoginDeviceTypeRequired = "validate.login.device_type_required"
KeyLoginDeviceTypeInvalid = "validate.login.device_type_invalid"
KeyLoginRefreshRequired = "validate.login.refresh_required"
KeyFriendTargetRequired = "validate.friend.target_required"
KeyFriendQRInvalid = "validate.friend.qrcode_invalid"
KeyFriendReasonInvalid = "validate.friend.reason_invalid"
KeyFriendRemarkInvalid = "validate.friend.remark_invalid"
KeyFriendRequestRequired = "validate.friend.request_required"
KeyFriendReportReasonRequired = "validate.friend.report_reason_required"
KeyFriendReportReasonInvalid = "validate.friend.report_reason_invalid"
KeyFriendReportDetailInvalid = "validate.friend.report_detail_invalid"
KeyFriendSelf = "friend.self"
KeyFriendAlready = "friend.already"
KeyFriendBlocked = "friend.blocked"
KeyFriendNotFriend = "friend.not_friend"
KeyFriendRequestInvalid = "friend.request_invalid"
KeyUploadPurposeRequired = "validate.upload.purpose_required"
KeyUploadPurposeInvalid = "validate.upload.purpose_invalid"
KeyUploadMIMERequired = "validate.upload.mime_required"
KeyUploadMIMEInvalid = "validate.upload.mime_invalid"
KeyUploadSizeRequired = "validate.upload.size_required"
KeyUploadSizeInvalid = "validate.upload.size_invalid"
KeyUploadSizeExceeded = "validate.upload.size_exceeded"
KeyUploadKeyRequired = "validate.upload.key_required"
KeyUploadKeyInvalid = "validate.upload.key_invalid"
KeyUploadGroupRequired = "validate.upload.group_required"
KeyFavoriteMsgRequired = "validate.favorite.msg_required"
KeyFavoriteMsgInvalid = "validate.favorite.msg_invalid"
KeyFieldGroupName = "field.group_name"
KeyFieldMemberUIDs = "field.member_uids"
KeyFieldRole = "field.role"
KeyFieldGroupNickname = "field.group_nickname"
KeyGroupNameRequired = "validate.group.name_required"
KeyGroupNameInvalid = "validate.group.name_invalid"
KeyGroupMembersRequired = "validate.group.members_required"
KeyGroupMembersInvalid = "validate.group.members_invalid"
KeyGroupUIDRequired = "validate.group.uid_required"
KeyGroupRoleInvalid = "validate.group.role_invalid"
KeyGroupNicknameInvalid = "validate.group.nickname_invalid"
KeyGroupNotMember = "group.not_member"
KeyGroupNotFriend = "group.not_friend"
KeyGroupOwnerLeave = "group.owner_leave"
KeyGroupFull = "group.full"
KeyGroupDissolved = "group.dissolved"
KeyGroupRoleDenied = "group.role_denied"
KeyGroupAlreadyMember = "group.already_member"
NotifyKickReplaced = "notify.kick.replaced"
NotifyKickLogout = "notify.kick.logout"
NotifyFriendRequest = "notify.friend.request"
NotifyFriendBecame = "notify.friend.became"
NotifyGroupInvite = "notify.group.invite"
NotifyGroupRemoved = "notify.group.removed"
NotifyMessageRecall = "notify.message.recall"
)