// Code generated by goctl. DO NOT EDIT.
// Source: user.proto

package server

import (
	"context"

	"github.com/cherish-chat/xxim-server/app/user/internal/logic/accountservice"
	"github.com/cherish-chat/xxim-server/app/user/internal/svc"
	"github.com/cherish-chat/xxim-server/common/pb"
)

type AccountServiceServer struct {
	svcCtx *svc.ServiceContext
	pb.UnimplementedAccountServiceServer
}

func NewAccountServiceServer(svcCtx *svc.ServiceContext) *AccountServiceServer {
	return &AccountServiceServer{
		svcCtx: svcCtx,
	}
}

// UserRegister 用户注册
func (s *AccountServiceServer) UserRegister(ctx context.Context, in *pb.UserRegisterReq) (*pb.UserRegisterResp, error) {
	l := accountservicelogic.NewUserRegisterLogic(ctx, s.svcCtx)
	return l.UserRegister(in)
}

// UserDestroy 用户注销
func (s *AccountServiceServer) UserDestroy(ctx context.Context, in *pb.UserDestroyReq) (*pb.UserDestroyResp, error) {
	l := accountservicelogic.NewUserDestroyLogic(ctx, s.svcCtx)
	return l.UserDestroy(in)
}

// UserAccessToken 用户登录
func (s *AccountServiceServer) UserAccessToken(ctx context.Context, in *pb.UserAccessTokenReq) (*pb.UserAccessTokenResp, error) {
	l := accountservicelogic.NewUserAccessTokenLogic(ctx, s.svcCtx)
	return l.UserAccessToken(in)
}

// RefreshUserAccessToken 刷新用户token
func (s *AccountServiceServer) RefreshUserAccessToken(ctx context.Context, in *pb.RefreshUserAccessTokenReq) (*pb.RefreshUserAccessTokenResp, error) {
	l := accountservicelogic.NewRefreshUserAccessTokenLogic(ctx, s.svcCtx)
	return l.RefreshUserAccessToken(in)
}

// RevokeUserAccessToken 注销用户token
func (s *AccountServiceServer) RevokeUserAccessToken(ctx context.Context, in *pb.RevokeUserAccessTokenReq) (*pb.RevokeUserAccessTokenResp, error) {
	l := accountservicelogic.NewRevokeUserAccessTokenLogic(ctx, s.svcCtx)
	return l.RevokeUserAccessToken(in)
}

// UpdateUserAccountMap 更新用户账号信息
func (s *AccountServiceServer) UpdateUserAccountMap(ctx context.Context, in *pb.UpdateUserAccountMapReq) (*pb.UpdateUserAccountMapResp, error) {
	l := accountservicelogic.NewUpdateUserAccountMapLogic(ctx, s.svcCtx)
	return l.UpdateUserAccountMap(in)
}

// ResetUserAccountMap 重置用户账号信息
func (s *AccountServiceServer) ResetUserAccountMap(ctx context.Context, in *pb.ResetUserAccountMapReq) (*pb.ResetUserAccountMapResp, error) {
	l := accountservicelogic.NewResetUserAccountMapLogic(ctx, s.svcCtx)
	return l.ResetUserAccountMap(in)
}

// CreateRobot 创建机器人
func (s *AccountServiceServer) CreateRobot(ctx context.Context, in *pb.CreateRobotReq) (*pb.CreateRobotResp, error) {
	l := accountservicelogic.NewCreateRobotLogic(ctx, s.svcCtx)
	return l.CreateRobot(in)
}
