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

package gatewayservice

import (
	"context"

	"github.com/cherish-chat/xxim-server/common/pb"

	"github.com/zeromicro/go-zero/zrpc"
	"google.golang.org/grpc"
)

type (
	AuthenticationConnectionReq       = pb.AuthenticationConnectionReq
	AuthenticationConnectionResp      = pb.AuthenticationConnectionResp
	GatewayApiRequest                 = pb.GatewayApiRequest
	GatewayApiResponse                = pb.GatewayApiResponse
	GatewayBatchGetUserConnectionReq  = pb.GatewayBatchGetUserConnectionReq
	GatewayBatchGetUserConnectionResp = pb.GatewayBatchGetUserConnectionResp
	GatewayGetConnectionByFilterReq   = pb.GatewayGetConnectionByFilterReq
	GatewayGetConnectionByFilterResp  = pb.GatewayGetConnectionByFilterResp
	GatewayGetConnectionFilter        = pb.GatewayGetConnectionFilter
	GatewayGetUserConnectionReq       = pb.GatewayGetUserConnectionReq
	GatewayGetUserConnectionResp      = pb.GatewayGetUserConnectionResp
	GatewayKeepAliveReq               = pb.GatewayKeepAliveReq
	GatewayKeepAliveResp              = pb.GatewayKeepAliveResp
	GatewayKickWsReq                  = pb.GatewayKickWsReq
	GatewayKickWsResp                 = pb.GatewayKickWsResp
	GatewayWriteDataContent           = pb.GatewayWriteDataContent
	GatewayWriteDataToWsReq           = pb.GatewayWriteDataToWsReq
	GatewayWriteDataToWsResp          = pb.GatewayWriteDataToWsResp
	GatewayWriteDataToWsWrapperReq    = pb.GatewayWriteDataToWsWrapperReq
	LongConnection                    = pb.LongConnection
	VerifyConnectionReq               = pb.VerifyConnectionReq
	VerifyConnectionResp              = pb.VerifyConnectionResp

	GatewayService interface {
		// GatewayGetUserConnection 获取用户的连接
		GatewayGetUserConnection(ctx context.Context, in *GatewayGetUserConnectionReq, opts ...grpc.CallOption) (*GatewayGetUserConnectionResp, error)
		// GatewayBatchGetUserConnection 批量获取用户的连接
		GatewayBatchGetUserConnection(ctx context.Context, in *GatewayBatchGetUserConnectionReq, opts ...grpc.CallOption) (*GatewayBatchGetUserConnectionResp, error)
		// GatewayGetConnectionByFilter 通过条件获取用户的连接
		GatewayGetConnectionByFilter(ctx context.Context, in *GatewayGetConnectionByFilterReq, opts ...grpc.CallOption) (*GatewayGetConnectionByFilterResp, error)
		// GatewayWriteDataToWs 向用户的连接写入数据
		GatewayWriteDataToWs(ctx context.Context, in *GatewayWriteDataToWsReq, opts ...grpc.CallOption) (*GatewayWriteDataToWsResp, error)
		// GatewayWriteDataToWsWrapper 向用户的连接写入数据
		GatewayWriteDataToWsWrapper(ctx context.Context, in *GatewayWriteDataToWsWrapperReq, opts ...grpc.CallOption) (*GatewayWriteDataToWsResp, error)
		// GatewayKickWs 踢出用户的连接
		GatewayKickWs(ctx context.Context, in *GatewayKickWsReq, opts ...grpc.CallOption) (*GatewayKickWsResp, error)
		// KeepAlive 保持连接
		GatewayKeepAlive(ctx context.Context, in *GatewayKeepAliveReq, opts ...grpc.CallOption) (*GatewayKeepAliveResp, error)
		// VerifyConnection 验证连接
		VerifyConnection(ctx context.Context, in *VerifyConnectionReq, opts ...grpc.CallOption) (*VerifyConnectionResp, error)
		// AuthenticationConnection 验证连接
		AuthenticationConnection(ctx context.Context, in *AuthenticationConnectionReq, opts ...grpc.CallOption) (*AuthenticationConnectionResp, error)
	}

	defaultGatewayService struct {
		cli zrpc.Client
	}
)

func NewGatewayService(cli zrpc.Client) GatewayService {
	return &defaultGatewayService{
		cli: cli,
	}
}

// GatewayGetUserConnection 获取用户的连接
func (m *defaultGatewayService) GatewayGetUserConnection(ctx context.Context, in *GatewayGetUserConnectionReq, opts ...grpc.CallOption) (*GatewayGetUserConnectionResp, error) {
	client := pb.NewGatewayServiceClient(m.cli.Conn())
	return client.GatewayGetUserConnection(ctx, in, opts...)
}

// GatewayBatchGetUserConnection 批量获取用户的连接
func (m *defaultGatewayService) GatewayBatchGetUserConnection(ctx context.Context, in *GatewayBatchGetUserConnectionReq, opts ...grpc.CallOption) (*GatewayBatchGetUserConnectionResp, error) {
	client := pb.NewGatewayServiceClient(m.cli.Conn())
	return client.GatewayBatchGetUserConnection(ctx, in, opts...)
}

// GatewayGetConnectionByFilter 通过条件获取用户的连接
func (m *defaultGatewayService) GatewayGetConnectionByFilter(ctx context.Context, in *GatewayGetConnectionByFilterReq, opts ...grpc.CallOption) (*GatewayGetConnectionByFilterResp, error) {
	client := pb.NewGatewayServiceClient(m.cli.Conn())
	return client.GatewayGetConnectionByFilter(ctx, in, opts...)
}

// GatewayWriteDataToWs 向用户的连接写入数据
func (m *defaultGatewayService) GatewayWriteDataToWs(ctx context.Context, in *GatewayWriteDataToWsReq, opts ...grpc.CallOption) (*GatewayWriteDataToWsResp, error) {
	client := pb.NewGatewayServiceClient(m.cli.Conn())
	return client.GatewayWriteDataToWs(ctx, in, opts...)
}

// GatewayWriteDataToWsWrapper 向用户的连接写入数据
func (m *defaultGatewayService) GatewayWriteDataToWsWrapper(ctx context.Context, in *GatewayWriteDataToWsWrapperReq, opts ...grpc.CallOption) (*GatewayWriteDataToWsResp, error) {
	client := pb.NewGatewayServiceClient(m.cli.Conn())
	return client.GatewayWriteDataToWsWrapper(ctx, in, opts...)
}

// GatewayKickWs 踢出用户的连接
func (m *defaultGatewayService) GatewayKickWs(ctx context.Context, in *GatewayKickWsReq, opts ...grpc.CallOption) (*GatewayKickWsResp, error) {
	client := pb.NewGatewayServiceClient(m.cli.Conn())
	return client.GatewayKickWs(ctx, in, opts...)
}

// KeepAlive 保持连接
func (m *defaultGatewayService) GatewayKeepAlive(ctx context.Context, in *GatewayKeepAliveReq, opts ...grpc.CallOption) (*GatewayKeepAliveResp, error) {
	client := pb.NewGatewayServiceClient(m.cli.Conn())
	return client.GatewayKeepAlive(ctx, in, opts...)
}

// VerifyConnection 验证连接
func (m *defaultGatewayService) VerifyConnection(ctx context.Context, in *VerifyConnectionReq, opts ...grpc.CallOption) (*VerifyConnectionResp, error) {
	client := pb.NewGatewayServiceClient(m.cli.Conn())
	return client.VerifyConnection(ctx, in, opts...)
}

// AuthenticationConnection 验证连接
func (m *defaultGatewayService) AuthenticationConnection(ctx context.Context, in *AuthenticationConnectionReq, opts ...grpc.CallOption) (*AuthenticationConnectionResp, error) {
	client := pb.NewGatewayServiceClient(m.cli.Conn())
	return client.AuthenticationConnection(ctx, in, opts...)
}
