change layout
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.10.1
|
||||
// Source: user.proto
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
user "lone-services/rpc/user/pb"
|
||||
"lone-services/services/user/internal/logic"
|
||||
"lone-services/services/user/internal/svc"
|
||||
)
|
||||
|
||||
type UserServer struct {
|
||||
svcCtx *svc.ServiceContext
|
||||
user.UnimplementedUserServer
|
||||
}
|
||||
|
||||
func NewUserServer(svcCtx *svc.ServiceContext) *UserServer {
|
||||
return &UserServer{
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *UserServer) Register(ctx context.Context, in *user.RegisterReq) (*user.Response, error) {
|
||||
l := logic.NewRegisterLogic(ctx, s.svcCtx)
|
||||
return l.Register(in)
|
||||
}
|
||||
|
||||
func (s *UserServer) RegisterByUser(ctx context.Context, in *user.RegisterByUserReq) (*user.Response, error) {
|
||||
l := logic.NewRegisterByUserLogic(ctx, s.svcCtx)
|
||||
return l.RegisterByUser(in)
|
||||
}
|
||||
|
||||
func (s *UserServer) Login(ctx context.Context, in *user.LoginReq) (*user.Response, error) {
|
||||
l := logic.NewLoginLogic(ctx, s.svcCtx)
|
||||
return l.Login(in)
|
||||
}
|
||||
Reference in New Issue
Block a user