suyiiyii a53f8f8a5a
feat(user): 初始化用户服务
- 新增用户登录和注册功能
- 实现基本的用户信息验证
- 集成数据库连接和查询
2025-01-20 13:04:55 +08:00

22 lines
466 B
Go

package service
import (
"context"
user "github.com/suyiiyii/hertz101/rpc_gen/kitex_gen/user"
)
type LoginService struct {
ctx context.Context
} // NewLoginService new LoginService
func NewLoginService(ctx context.Context) *LoginService {
return &LoginService{ctx: ctx}
}
// Run create note info
func (s *LoginService) Run(req *user.LoginReq) (resp *user.LoginResp, err error) {
// Finish your business logic.
resp = &user.LoginResp{UserId: 111}
return
}