user-core-client/client_api.go
2025-08-20 17:43:52 +08:00

24 lines
859 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package user_core_client
import "context"
type UserCenterApi interface {
// Verify 验证 token 并且返回 token 中的信息
Verify(ctx context.Context, token string) (*TokenClaims, error)
// GetPhoneTextByUID 获取明文手机号 来自于 uid
GetPhoneTextByUID(ctx context.Context, uid int64) (string, error)
// UpdateUserByUID 更新用户信息
UpdateUserByUID(ctx context.Context, uid int64, user *UpdateUserReq) (*User, error)
}
type UpdateUserReq struct {
Username string `json:"username" ` // 名称(可重复)
PhoneText string `json:"phoneText"` // 手机号
Password string `json:"password"` // 加密密码
Gender string `json:"gender"` // 性别 (male 男性, female 女性, unknown 未知)
Status string `json:"status"` // 用户状态enabled/disabled
LoginName string `json:"loginName"` // 登录名
}