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

package server

import (
	"context"

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

type GatewayServiceServer struct {
	svcCtx *svc.ServiceContext
	pb.UnimplementedGatewayServiceServer
}

func NewGatewayServiceServer(svcCtx *svc.ServiceContext) *GatewayServiceServer {
	return &GatewayServiceServer{
		svcCtx: svcCtx,
	}
}

// GatewayGetUserConnection 获取用户的连接
func (s *GatewayServiceServer) GatewayGetUserConnection(ctx context.Context, in *pb.GatewayGetUserConnectionReq) (*pb.GatewayGetUserConnectionResp, error) {
	l := gatewayservicelogic.NewGatewayGetUserConnectionLogic(ctx, s.svcCtx)
	return l.GatewayGetUserConnection(in)
}

// GatewayBatchGetUserConnection 批量获取用户的连接
func (s *GatewayServiceServer) GatewayBatchGetUserConnection(ctx context.Context, in *pb.GatewayBatchGetUserConnectionReq) (*pb.GatewayBatchGetUserConnectionResp, error) {
	l := gatewayservicelogic.NewGatewayBatchGetUserConnectionLogic(ctx, s.svcCtx)
	return l.GatewayBatchGetUserConnection(in)
}

// GatewayGetConnectionByFilter 通过条件获取用户的连接
func (s *GatewayServiceServer) GatewayGetConnectionByFilter(ctx context.Context, in *pb.GatewayGetConnectionByFilterReq) (*pb.GatewayGetConnectionByFilterResp, error) {
	l := gatewayservicelogic.NewGatewayGetConnectionByFilterLogic(ctx, s.svcCtx)
	return l.GatewayGetConnectionByFilter(in)
}

// GatewayWriteDataToWs 向用户的连接写入数据
func (s *GatewayServiceServer) GatewayWriteDataToWs(ctx context.Context, in *pb.GatewayWriteDataToWsReq) (*pb.GatewayWriteDataToWsResp, error) {
	l := gatewayservicelogic.NewGatewayWriteDataToWsLogic(ctx, s.svcCtx)
	return l.GatewayWriteDataToWs(in)
}

// GatewayWriteDataToWsWrapper 向用户的连接写入数据
func (s *GatewayServiceServer) GatewayWriteDataToWsWrapper(ctx context.Context, in *pb.GatewayWriteDataToWsWrapperReq) (*pb.GatewayWriteDataToWsResp, error) {
	l := gatewayservicelogic.NewGatewayWriteDataToWsWrapperLogic(ctx, s.svcCtx)
	return l.GatewayWriteDataToWsWrapper(in)
}

// GatewayKickWs 踢出用户的连接
func (s *GatewayServiceServer) GatewayKickWs(ctx context.Context, in *pb.GatewayKickWsReq) (*pb.GatewayKickWsResp, error) {
	l := gatewayservicelogic.NewGatewayKickWsLogic(ctx, s.svcCtx)
	return l.GatewayKickWs(in)
}

// KeepAlive 保持连接
func (s *GatewayServiceServer) GatewayKeepAlive(ctx context.Context, in *pb.GatewayKeepAliveReq) (*pb.GatewayKeepAliveResp, error) {
	l := gatewayservicelogic.NewGatewayKeepAliveLogic(ctx, s.svcCtx)
	return l.GatewayKeepAlive(in)
}

// VerifyConnection 验证连接
func (s *GatewayServiceServer) VerifyConnection(ctx context.Context, in *pb.VerifyConnectionReq) (*pb.VerifyConnectionResp, error) {
	l := gatewayservicelogic.NewVerifyConnectionLogic(ctx, s.svcCtx)
	return l.VerifyConnection(in)
}

// AuthenticationConnection 验证连接
func (s *GatewayServiceServer) AuthenticationConnection(ctx context.Context, in *pb.AuthenticationConnectionReq) (*pb.AuthenticationConnectionResp, error) {
	l := gatewayservicelogic.NewAuthenticationConnectionLogic(ctx, s.svcCtx)
	return l.AuthenticationConnection(in)
}
