uuapClientServer.go 2 KB
// Code generated by goctl. DO NOT EDIT!
// Source: uuap.proto

package server

import (
	"context"

	"open-gitlab.going-link.com/operation-sre/uuap/internal/logic"
	"open-gitlab.going-link.com/operation-sre/uuap/internal/svc"
	"open-gitlab.going-link.com/operation-sre/uuap/uuappb"
)

type UuapClientServer struct {
	svcCtx *svc.ServiceContext
	uuappb.UnimplementedUuapClientServer
}

func NewUuapClientServer(svcCtx *svc.ServiceContext) *UuapClientServer {
	return &UuapClientServer{
		svcCtx: svcCtx,
	}
}

// GetUser 用户单个获取
func (s *UuapClientServer) GetUser(ctx context.Context, in *uuappb.GetUserReq) (*uuappb.GetUserResp, error) {
	l := logic.NewGetUserLogic(ctx, s.svcCtx)
	return l.GetUser(in)
}

// BatchGetUser 用户批量获取
func (s *UuapClientServer) BatchGetUser(in *uuappb.BatchGetUserReq, stream uuappb.UuapClient_BatchGetUserServer) error {
	l := logic.NewBatchGetUserLogic(stream.Context(), s.svcCtx)
	return l.BatchGetUser(in, stream)
}

// AddUser 用户新增
func (s *UuapClientServer) AddUser(ctx context.Context, in *uuappb.AddUserReq) (*uuappb.AddUserResp, error) {
	l := logic.NewAddUserLogic(ctx, s.svcCtx)
	return l.AddUser(in)
}

// BatchAddUser 用户批量新增
func (s *UuapClientServer) BatchAddUser(ctx context.Context, in *uuappb.BatchAddUserReq) (*uuappb.BatchAddUserResp, error) {
	l := logic.NewBatchAddUserLogic(ctx, s.svcCtx)
	return l.BatchAddUser(in)
}

// DelUser 用户删除
func (s *UuapClientServer) DelUser(ctx context.Context, in *uuappb.AddUserReq) (*uuappb.AddUserResp, error) {
	l := logic.NewDelUserLogic(ctx, s.svcCtx)
	return l.DelUser(in)
}

// RetrievePwd 用户密码找回
func (s *UuapClientServer) RetrievePwd(ctx context.Context, in *uuappb.RetrievePwdReq) (*uuappb.RetrievePwdResp, error) {
	l := logic.NewRetrievePwdLogic(ctx, s.svcCtx)
	return l.RetrievePwd(in)
}

// Renewal 用户续期
func (s *UuapClientServer) Renewal(ctx context.Context, in *uuappb.RenewalReq) (*uuappb.RenewalResp, error) {
	l := logic.NewRenewalLogic(ctx, s.svcCtx)
	return l.Renewal(in)
}