You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.1 KiB
64 lines
2.1 KiB
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.8.4
|
|
// Source: usercenter.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"backend/usercenter/internal/logic"
|
|
"backend/usercenter/internal/svc"
|
|
"backend/usercenter/pb/usercenter"
|
|
)
|
|
|
|
type UsercenterServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
usercenter.UnimplementedUsercenterServer
|
|
}
|
|
|
|
func NewUsercenterServer(svcCtx *svc.ServiceContext) *UsercenterServer {
|
|
return &UsercenterServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (s *UsercenterServer) Ping(ctx context.Context, in *usercenter.Request) (*usercenter.Response, error) {
|
|
l := logic.NewPingLogic(ctx, s.svcCtx)
|
|
return l.Ping(in)
|
|
}
|
|
|
|
func (s *UsercenterServer) Register(ctx context.Context, in *usercenter.RegisterRequest) (*usercenter.RegisterResponse, error) {
|
|
l := logic.NewRegisterLogic(ctx, s.svcCtx)
|
|
return l.Register(in)
|
|
}
|
|
|
|
func (s *UsercenterServer) Login(ctx context.Context, in *usercenter.LoginRequest) (*usercenter.LoginResponse, error) {
|
|
l := logic.NewLoginLogic(ctx, s.svcCtx)
|
|
return l.Login(in)
|
|
}
|
|
|
|
func (s *UsercenterServer) GetProfile(ctx context.Context, in *usercenter.GetProfileRequest) (*usercenter.GetProfileResponse, error) {
|
|
l := logic.NewGetProfileLogic(ctx, s.svcCtx)
|
|
return l.GetProfile(in)
|
|
}
|
|
|
|
func (s *UsercenterServer) UpdateProfile(ctx context.Context, in *usercenter.UpdateProfileRequest) (*usercenter.UpdateProfileResponse, error) {
|
|
l := logic.NewUpdateProfileLogic(ctx, s.svcCtx)
|
|
return l.UpdateProfile(in)
|
|
}
|
|
|
|
func (s *UsercenterServer) ChangePassword(ctx context.Context, in *usercenter.ChangePasswordRequest) (*usercenter.ChangePasswordResponse, error) {
|
|
l := logic.NewChangePasswordLogic(ctx, s.svcCtx)
|
|
return l.ChangePassword(in)
|
|
}
|
|
|
|
func (s *UsercenterServer) GetUserRoles(ctx context.Context, in *usercenter.Request) (*usercenter.GetUserRolesResponse, error) {
|
|
l := logic.NewGetUserRolesLogic(ctx, s.svcCtx)
|
|
return l.GetUserRoles(in)
|
|
}
|
|
|
|
func (s *UsercenterServer) GetUserPermissions(ctx context.Context, in *usercenter.Request) (*usercenter.GetUserPermissionsResponse, error) {
|
|
l := logic.NewGetUserPermissionsLogic(ctx, s.svcCtx)
|
|
return l.GetUserPermissions(in)
|
|
}
|
|
|