diff --git a/backend/api/user/v1/user_change_nickname.go b/backend/api/user/v1/user_change_nickname.go index ca136f9..78fa38a 100644 --- a/backend/api/user/v1/user_change_nickname.go +++ b/backend/api/user/v1/user_change_nickname.go @@ -4,7 +4,7 @@ import "github.com/gogf/gf/v2/frame/g" type ChangeNicknameReq struct { g.Meta `path:"/user/change-nick-name" method:"post" tags:"UserService" summary:"change-nick-name 修改昵称"` - Nickname string `v:"required"` + Nickname string `v:"required" dc:"昵称,required" "` } type ChangeNicknameRes struct { OK bool diff --git a/backend/api/user/v1/user_check_nick_name.go b/backend/api/user/v1/user_check_nick_name.go index eafaac6..2e12038 100644 --- a/backend/api/user/v1/user_check_nick_name.go +++ b/backend/api/user/v1/user_check_nick_name.go @@ -4,6 +4,6 @@ import "github.com/gogf/gf/v2/frame/g" type CheckNickNameReq struct { g.Meta `path:"/user/check-nick-name" method:"post" tags:"UserService" summary:"check-nick-name 昵称是否可用"` - Nickname string `v:"required"` + Nickname string `v:"required" dc:"昵称,required"` } type CheckNickNameRes struct{} diff --git a/backend/api/user/v1/user_check_passport.go b/backend/api/user/v1/user_check_passport.go index 00f67ff..9900f26 100644 --- a/backend/api/user/v1/user_check_passport.go +++ b/backend/api/user/v1/user_check_passport.go @@ -4,6 +4,6 @@ import "github.com/gogf/gf/v2/frame/g" type CheckPassportReq struct { g.Meta `path:"/user/check-passport" method:"post" tags:"UserService" summary:"check-passport 账户是否可用"` - Passport string `v:"required"` + Passport string `v:"required" dc:"账户,required"` } type CheckPassportRes struct{} diff --git a/backend/api/user/v1/user_delete_share.go b/backend/api/user/v1/user_delete_share.go index 0e63d5e..1c923c2 100644 --- a/backend/api/user/v1/user_delete_share.go +++ b/backend/api/user/v1/user_delete_share.go @@ -4,7 +4,7 @@ import "github.com/gogf/gf/v2/frame/g" type DeleteShareReq struct { g.Meta `path:"/user/delete-share" method:"post" tags:"UserService" summary:"delete-share 删除密钥分片"` - Index int `v:"required|min:0"` + Index int `v:"required|min:0" dc:"分片索引,从0开始,required"` } type DeleteShareRes struct { diff --git a/backend/api/user/v1/user_get_share.go b/backend/api/user/v1/user_get_share.go index f49d246..137b227 100644 --- a/backend/api/user/v1/user_get_share.go +++ b/backend/api/user/v1/user_get_share.go @@ -4,8 +4,7 @@ import "github.com/gogf/gf/v2/frame/g" type GetShareReq struct { g.Meta `path:"/user/get-share" method:"post" tags:"UserService" summary:"get-share 获取秘钥分片"` - Index int `v:"required|min:0"` - // Passport string `v:"required"` + Index int `v:"required|min:0" dc:"分片索引,required"` } type GetShareRes struct { Share string diff --git a/backend/api/user/v1/user_is_signed_in.go b/backend/api/user/v1/user_is_signed_in.go index ae9d217..d76ced9 100644 --- a/backend/api/user/v1/user_is_signed_in.go +++ b/backend/api/user/v1/user_is_signed_in.go @@ -6,5 +6,5 @@ type IsSignedInReq struct { g.Meta `path:"/user/is-signed-in" method:"post" tags:"UserService" summary:"is-signed-in 是否已经登录"` } type IsSignedInRes struct { - OK bool `dc:"True if current user is signed in; or else false"` + OK bool `dc:"若登录成功,返回true"` } diff --git a/backend/api/user/v1/user_register.go b/backend/api/user/v1/user_register.go index a3f16b1..6dd5462 100644 --- a/backend/api/user/v1/user_register.go +++ b/backend/api/user/v1/user_register.go @@ -4,12 +4,12 @@ import "github.com/gogf/gf/v2/frame/g" type RegisterReq struct { g.Meta `path:"/user/register" method:"post" tags:"UserService" summary:"register 验证验证码是否正确并注册用户"` - Passport string `v:"required|length:0,320"` - Password string `v:"required|length:6,16"` - Code string `v:"required|length:6,6"` - Nickname string + Passport string `v:"required" dc:"账户,required"` + Password string `v:"required" dc:"密码,required"` + Code string `v:"required" dc:"验证码,required"` + Nickname string `dc:"昵称,可选"` } type RegisterRes struct { - OK bool + OK bool `dc:"若注册成功,返回true"` } diff --git a/backend/api/user/v1/user_reset_password.go b/backend/api/user/v1/user_reset_password.go index dab5fe6..ba33798 100644 --- a/backend/api/user/v1/user_reset_password.go +++ b/backend/api/user/v1/user_reset_password.go @@ -4,10 +4,10 @@ import "github.com/gogf/gf/v2/frame/g" type ResetPasswordReq struct { g.Meta `path:"/user/reset-password" method:"post" tags:"UserService" summary:"reset-password 重置密码"` - Passport string `v:"required|length:0,320"` - Password string `v:"required|length:6,16"` - Password2 string `v:"required|length:6,16|same:Password"` + Passport string `v:"required" dc:"账户,required"` + Password string `v:"required" dc:"密码,required"` + Password2 string `v:"required|same:Password" dc:"确认密码,required|确认密码与密码不一致"` } type ResetPasswordRes struct { - OK bool + OK bool `dc:"若重置密码成功,返回true"` } diff --git a/backend/api/user/v1/user_reset_register.go b/backend/api/user/v1/user_reset_register.go index 0472632..69eb9b9 100644 --- a/backend/api/user/v1/user_reset_register.go +++ b/backend/api/user/v1/user_reset_register.go @@ -4,12 +4,12 @@ import "github.com/gogf/gf/v2/frame/g" type ResetRegisterReq struct { g.Meta `path:"/user/reset-register" method:"post" tags:"UserService" summary:"reset-register 重置密钥的注册路由"` - Passport string `v:"required|length:0,320"` - Password string `v:"required|length:6,16"` - Code string `v:"required|length:6,6"` - Nickname string + Passport string `v:"required" dc:"账户,required"` + Password string `v:"required" dc:"密码,required"` + Code string `v:"required" dc:"验证码,required"` + Nickname string `dc:"昵称,可选"` } type ResetRegisterRes struct { - OK bool + OK bool `dc:"若注册成功,返回true"` } diff --git a/backend/api/user/v1/user_send_share.go b/backend/api/user/v1/user_send_share.go index 246aa21..5fd54e1 100644 --- a/backend/api/user/v1/user_send_share.go +++ b/backend/api/user/v1/user_send_share.go @@ -4,10 +4,10 @@ import "github.com/gogf/gf/v2/frame/g" type SendShareReq struct { g.Meta `path:"/user/send-share" method:"post" tags:"UserService" summary:"send-share 已注册账户存储密钥分片"` - Share string `v:"required"` - Index int `v:"required|min:0"` + Share string `v:"required" dc:"密钥分片,required"` + Index int `v:"required|min:0" dc:"分片索引,required"` } type SendShareRes struct { - OK bool + OK bool `dc:"若存储成功,返回true"` } diff --git a/backend/api/user/v1/user_sign_in.go b/backend/api/user/v1/user_sign_in.go index 9bdc24b..8b01207 100644 --- a/backend/api/user/v1/user_sign_in.go +++ b/backend/api/user/v1/user_sign_in.go @@ -4,7 +4,7 @@ import "github.com/gogf/gf/v2/frame/g" type SignInReq struct { g.Meta `path:"/user/sign-in" method:"post" tags:"UserService" summary:"sign-in 已注册账户登录"` - Passport string `v:"required|length:0,320"` - Password string `v:"required|length:6,30"` + Passport string `v:"required" dc:"账户,required"` + Password string `v:"required" dc:"密码,required"` } type SignInRes struct{} diff --git a/backend/api/user/v1/user_sign_up.go b/backend/api/user/v1/user_sign_up.go index 788ae08..3ee6d30 100644 --- a/backend/api/user/v1/user_sign_up.go +++ b/backend/api/user/v1/user_sign_up.go @@ -4,11 +4,11 @@ import "github.com/gogf/gf/v2/frame/g" type SignUpReq struct { g.Meta `path:"/user/sign-up" method:"post" tags:"UserService" summary:"sign-up 用户注册"` - Passport string `v:"required|length:0,320"` - Password string `v:"required|length:6,16"` - Password2 string `v:"required|length:6,16|same:Password"` - Nickname string + Passport string `v:"required" dc:"账户,required"` + Password string `v:"required" dc:"密码,required"` + Password2 string `v:"required|same:Password" dc:"确认密码,required"` + Nickname string `dc:"昵称,可选"` } type SignUpRes struct { - OK bool + OK bool `dc:"若注册成功,返回true"` } diff --git a/backend/api/user/v1/user_social_recovery.go b/backend/api/user/v1/user_social_recovery.go index 7dedda0..92c1bb5 100644 --- a/backend/api/user/v1/user_social_recovery.go +++ b/backend/api/user/v1/user_social_recovery.go @@ -7,5 +7,5 @@ type SocialRecoveryReq struct { } type SocialRecoveryRes struct { - OK bool + OK bool `dc:"若恢复成功,返回true"` } diff --git a/backend/main.exe b/backend/main.exe index 417a2ef..399fc4a 100644 Binary files a/backend/main.exe and b/backend/main.exe differ diff --git a/backend/main.exe~ b/backend/main.exe~ index 1e7314b..362ac7a 100644 Binary files a/backend/main.exe~ and b/backend/main.exe~ differ