Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type RegisterUserVO ¶
用户注册视图对象
type UserInfoDTO ¶
type UserInfoDTO struct { ID int64 `json:"id"` // 用户名 Username string `json:"username"` // 邮箱 Email string `json:"email"` }
用户信息数据传输对象
type UserService ¶
type UserService interface { // 登录 Login(ctx context.Context, email, password string) (*UserInfoDTO, error) // 注册 Register(ctx context.Context, vo *RegisterUserVO) (*UserInfoDTO, error) }
用户服务接口
func MakeUserServiceImpl ¶
func MakeUserServiceImpl(userDAO dao.UserDAO) UserService
type UserServiceImpl ¶
type UserServiceImpl struct {
// contains filtered or unexported fields
}
用户服务实现
func (*UserServiceImpl) Login ¶
func (u *UserServiceImpl) Login(ctx context.Context, email, password string) (*UserInfoDTO, error)
登录
func (*UserServiceImpl) Register ¶
func (u *UserServiceImpl) Register(ctx context.Context, vo *RegisterUserVO) (*UserInfoDTO, error)
注册
Click to show internal directories.
Click to hide internal directories.