// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.21.12
// source: gateway.proto

package pb

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// GatewayServiceClient is the client API for GatewayService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type GatewayServiceClient 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 保持连接
	// 客户端必须每隔 config.Websocket.KeepAliveSecond 秒发送一次心跳包
	// 二次开发人员可以在这里修改逻辑，比如一致性算法安全校验等
	GatewayKeepAlive(ctx context.Context, in *GatewayKeepAliveReq, opts ...grpc.CallOption) (*GatewayKeepAliveResp, error)
	// VerifyConnection 验证连接
	// 客户端拿着自己的公钥，请求网关，网关返回自己的公钥
	VerifyConnection(ctx context.Context, in *VerifyConnectionReq, opts ...grpc.CallOption) (*VerifyConnectionResp, error)
	// AuthenticationConnection 验证连接
	// 客户端拿着userId token，鉴权连接
	AuthenticationConnection(ctx context.Context, in *AuthenticationConnectionReq, opts ...grpc.CallOption) (*AuthenticationConnectionResp, error)
}

type gatewayServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewGatewayServiceClient(cc grpc.ClientConnInterface) GatewayServiceClient {
	return &gatewayServiceClient{cc}
}

func (c *gatewayServiceClient) GatewayGetUserConnection(ctx context.Context, in *GatewayGetUserConnectionReq, opts ...grpc.CallOption) (*GatewayGetUserConnectionResp, error) {
	out := new(GatewayGetUserConnectionResp)
	err := c.cc.Invoke(ctx, "/pb.gatewayService/GatewayGetUserConnection", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gatewayServiceClient) GatewayBatchGetUserConnection(ctx context.Context, in *GatewayBatchGetUserConnectionReq, opts ...grpc.CallOption) (*GatewayBatchGetUserConnectionResp, error) {
	out := new(GatewayBatchGetUserConnectionResp)
	err := c.cc.Invoke(ctx, "/pb.gatewayService/GatewayBatchGetUserConnection", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gatewayServiceClient) GatewayGetConnectionByFilter(ctx context.Context, in *GatewayGetConnectionByFilterReq, opts ...grpc.CallOption) (*GatewayGetConnectionByFilterResp, error) {
	out := new(GatewayGetConnectionByFilterResp)
	err := c.cc.Invoke(ctx, "/pb.gatewayService/GatewayGetConnectionByFilter", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gatewayServiceClient) GatewayWriteDataToWs(ctx context.Context, in *GatewayWriteDataToWsReq, opts ...grpc.CallOption) (*GatewayWriteDataToWsResp, error) {
	out := new(GatewayWriteDataToWsResp)
	err := c.cc.Invoke(ctx, "/pb.gatewayService/GatewayWriteDataToWs", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gatewayServiceClient) GatewayWriteDataToWsWrapper(ctx context.Context, in *GatewayWriteDataToWsWrapperReq, opts ...grpc.CallOption) (*GatewayWriteDataToWsResp, error) {
	out := new(GatewayWriteDataToWsResp)
	err := c.cc.Invoke(ctx, "/pb.gatewayService/GatewayWriteDataToWsWrapper", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gatewayServiceClient) GatewayKickWs(ctx context.Context, in *GatewayKickWsReq, opts ...grpc.CallOption) (*GatewayKickWsResp, error) {
	out := new(GatewayKickWsResp)
	err := c.cc.Invoke(ctx, "/pb.gatewayService/GatewayKickWs", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gatewayServiceClient) GatewayKeepAlive(ctx context.Context, in *GatewayKeepAliveReq, opts ...grpc.CallOption) (*GatewayKeepAliveResp, error) {
	out := new(GatewayKeepAliveResp)
	err := c.cc.Invoke(ctx, "/pb.gatewayService/GatewayKeepAlive", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gatewayServiceClient) VerifyConnection(ctx context.Context, in *VerifyConnectionReq, opts ...grpc.CallOption) (*VerifyConnectionResp, error) {
	out := new(VerifyConnectionResp)
	err := c.cc.Invoke(ctx, "/pb.gatewayService/VerifyConnection", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gatewayServiceClient) AuthenticationConnection(ctx context.Context, in *AuthenticationConnectionReq, opts ...grpc.CallOption) (*AuthenticationConnectionResp, error) {
	out := new(AuthenticationConnectionResp)
	err := c.cc.Invoke(ctx, "/pb.gatewayService/AuthenticationConnection", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// GatewayServiceServer is the server API for GatewayService service.
// All implementations must embed UnimplementedGatewayServiceServer
// for forward compatibility
type GatewayServiceServer interface {
	// GatewayGetUserConnection 获取用户的连接
	// 二次开发人员不建议修改此处逻辑
	GatewayGetUserConnection(context.Context, *GatewayGetUserConnectionReq) (*GatewayGetUserConnectionResp, error)
	// GatewayBatchGetUserConnection 批量获取用户的连接
	// 二次开发人员建议不修改此处逻辑
	GatewayBatchGetUserConnection(context.Context, *GatewayBatchGetUserConnectionReq) (*GatewayBatchGetUserConnectionResp, error)
	// GatewayGetConnectionByFilter 通过条件获取用户的连接
	// 二次开发人员可以增加过滤条件
	GatewayGetConnectionByFilter(context.Context, *GatewayGetConnectionByFilterReq) (*GatewayGetConnectionByFilterResp, error)
	// GatewayWriteDataToWs 向用户的连接写入数据
	// 二次开发人员不建议修改此处逻辑
	GatewayWriteDataToWs(context.Context, *GatewayWriteDataToWsReq) (*GatewayWriteDataToWsResp, error)
	// GatewayWriteDataToWsWrapper 向用户的连接写入数据
	// 二次开发人员不建议修改此处逻辑
	GatewayWriteDataToWsWrapper(context.Context, *GatewayWriteDataToWsWrapperReq) (*GatewayWriteDataToWsResp, error)
	// GatewayKickWs 踢出用户的连接
	// 二次开发人员可以在此处修改踢出用户连接的逻辑
	// 比如踢出连接之前，先给用户发送一条消息
	GatewayKickWs(context.Context, *GatewayKickWsReq) (*GatewayKickWsResp, error)
	// KeepAlive 保持连接
	// 客户端必须每隔 config.Websocket.KeepAliveSecond 秒发送一次心跳包
	// 二次开发人员可以在这里修改逻辑，比如一致性算法安全校验等
	GatewayKeepAlive(context.Context, *GatewayKeepAliveReq) (*GatewayKeepAliveResp, error)
	// VerifyConnection 验证连接
	// 客户端拿着自己的公钥，请求网关，网关返回自己的公钥
	VerifyConnection(context.Context, *VerifyConnectionReq) (*VerifyConnectionResp, error)
	// AuthenticationConnection 验证连接
	// 客户端拿着userId token，鉴权连接
	AuthenticationConnection(context.Context, *AuthenticationConnectionReq) (*AuthenticationConnectionResp, error)
	mustEmbedUnimplementedGatewayServiceServer()
}

// UnimplementedGatewayServiceServer must be embedded to have forward compatible implementations.
type UnimplementedGatewayServiceServer struct {
}

func (UnimplementedGatewayServiceServer) GatewayGetUserConnection(context.Context, *GatewayGetUserConnectionReq) (*GatewayGetUserConnectionResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GatewayGetUserConnection not implemented")
}
func (UnimplementedGatewayServiceServer) GatewayBatchGetUserConnection(context.Context, *GatewayBatchGetUserConnectionReq) (*GatewayBatchGetUserConnectionResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GatewayBatchGetUserConnection not implemented")
}
func (UnimplementedGatewayServiceServer) GatewayGetConnectionByFilter(context.Context, *GatewayGetConnectionByFilterReq) (*GatewayGetConnectionByFilterResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GatewayGetConnectionByFilter not implemented")
}
func (UnimplementedGatewayServiceServer) GatewayWriteDataToWs(context.Context, *GatewayWriteDataToWsReq) (*GatewayWriteDataToWsResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GatewayWriteDataToWs not implemented")
}
func (UnimplementedGatewayServiceServer) GatewayWriteDataToWsWrapper(context.Context, *GatewayWriteDataToWsWrapperReq) (*GatewayWriteDataToWsResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GatewayWriteDataToWsWrapper not implemented")
}
func (UnimplementedGatewayServiceServer) GatewayKickWs(context.Context, *GatewayKickWsReq) (*GatewayKickWsResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GatewayKickWs not implemented")
}
func (UnimplementedGatewayServiceServer) GatewayKeepAlive(context.Context, *GatewayKeepAliveReq) (*GatewayKeepAliveResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GatewayKeepAlive not implemented")
}
func (UnimplementedGatewayServiceServer) VerifyConnection(context.Context, *VerifyConnectionReq) (*VerifyConnectionResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method VerifyConnection not implemented")
}
func (UnimplementedGatewayServiceServer) AuthenticationConnection(context.Context, *AuthenticationConnectionReq) (*AuthenticationConnectionResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AuthenticationConnection not implemented")
}
func (UnimplementedGatewayServiceServer) mustEmbedUnimplementedGatewayServiceServer() {}

// UnsafeGatewayServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GatewayServiceServer will
// result in compilation errors.
type UnsafeGatewayServiceServer interface {
	mustEmbedUnimplementedGatewayServiceServer()
}

func RegisterGatewayServiceServer(s grpc.ServiceRegistrar, srv GatewayServiceServer) {
	s.RegisterService(&GatewayService_ServiceDesc, srv)
}

func _GatewayService_GatewayGetUserConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GatewayGetUserConnectionReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GatewayServiceServer).GatewayGetUserConnection(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.gatewayService/GatewayGetUserConnection",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServiceServer).GatewayGetUserConnection(ctx, req.(*GatewayGetUserConnectionReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _GatewayService_GatewayBatchGetUserConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GatewayBatchGetUserConnectionReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GatewayServiceServer).GatewayBatchGetUserConnection(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.gatewayService/GatewayBatchGetUserConnection",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServiceServer).GatewayBatchGetUserConnection(ctx, req.(*GatewayBatchGetUserConnectionReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _GatewayService_GatewayGetConnectionByFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GatewayGetConnectionByFilterReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GatewayServiceServer).GatewayGetConnectionByFilter(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.gatewayService/GatewayGetConnectionByFilter",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServiceServer).GatewayGetConnectionByFilter(ctx, req.(*GatewayGetConnectionByFilterReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _GatewayService_GatewayWriteDataToWs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GatewayWriteDataToWsReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GatewayServiceServer).GatewayWriteDataToWs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.gatewayService/GatewayWriteDataToWs",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServiceServer).GatewayWriteDataToWs(ctx, req.(*GatewayWriteDataToWsReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _GatewayService_GatewayWriteDataToWsWrapper_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GatewayWriteDataToWsWrapperReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GatewayServiceServer).GatewayWriteDataToWsWrapper(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.gatewayService/GatewayWriteDataToWsWrapper",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServiceServer).GatewayWriteDataToWsWrapper(ctx, req.(*GatewayWriteDataToWsWrapperReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _GatewayService_GatewayKickWs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GatewayKickWsReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GatewayServiceServer).GatewayKickWs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.gatewayService/GatewayKickWs",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServiceServer).GatewayKickWs(ctx, req.(*GatewayKickWsReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _GatewayService_GatewayKeepAlive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GatewayKeepAliveReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GatewayServiceServer).GatewayKeepAlive(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.gatewayService/GatewayKeepAlive",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServiceServer).GatewayKeepAlive(ctx, req.(*GatewayKeepAliveReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _GatewayService_VerifyConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VerifyConnectionReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GatewayServiceServer).VerifyConnection(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.gatewayService/VerifyConnection",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServiceServer).VerifyConnection(ctx, req.(*VerifyConnectionReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _GatewayService_AuthenticationConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AuthenticationConnectionReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GatewayServiceServer).AuthenticationConnection(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.gatewayService/AuthenticationConnection",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServiceServer).AuthenticationConnection(ctx, req.(*AuthenticationConnectionReq))
	}
	return interceptor(ctx, in, info, handler)
}

// GatewayService_ServiceDesc is the grpc.ServiceDesc for GatewayService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var GatewayService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.gatewayService",
	HandlerType: (*GatewayServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GatewayGetUserConnection",
			Handler:    _GatewayService_GatewayGetUserConnection_Handler,
		},
		{
			MethodName: "GatewayBatchGetUserConnection",
			Handler:    _GatewayService_GatewayBatchGetUserConnection_Handler,
		},
		{
			MethodName: "GatewayGetConnectionByFilter",
			Handler:    _GatewayService_GatewayGetConnectionByFilter_Handler,
		},
		{
			MethodName: "GatewayWriteDataToWs",
			Handler:    _GatewayService_GatewayWriteDataToWs_Handler,
		},
		{
			MethodName: "GatewayWriteDataToWsWrapper",
			Handler:    _GatewayService_GatewayWriteDataToWsWrapper_Handler,
		},
		{
			MethodName: "GatewayKickWs",
			Handler:    _GatewayService_GatewayKickWs_Handler,
		},
		{
			MethodName: "GatewayKeepAlive",
			Handler:    _GatewayService_GatewayKeepAlive_Handler,
		},
		{
			MethodName: "VerifyConnection",
			Handler:    _GatewayService_VerifyConnection_Handler,
		},
		{
			MethodName: "AuthenticationConnection",
			Handler:    _GatewayService_AuthenticationConnection_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gateway.proto",
}
