🎨 update code structure

This commit is contained in:
landaiqing
2024-09-29 17:08:18 +08:00
parent 87f1ff6961
commit 4ec1ea40bb
23 changed files with 672 additions and 761 deletions

View File

@@ -1,7 +1,5 @@
package user_controller
import "encoding/json"
// RefreshTokenRequest 刷新token请求
type RefreshTokenRequest struct {
RefreshToken string `json:"refresh_token" binding:"required"`
@@ -37,19 +35,3 @@ type ResetPasswordRequest struct {
Password string `json:"password" binding:"required"`
Repassword string `json:"repassword" binding:"required"`
}
// ResponseData 返回数据
type ResponseData struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ExpiresAt int64 `json:"expires_at"`
UID *string `json:"uid"`
}
func (res ResponseData) MarshalBinary() ([]byte, error) {
return json.Marshal(res)
}
func (res ResponseData) UnmarshalBinary(data []byte) error {
return json.Unmarshal(data, &res)
}