From 582a0faa6fa82714f70324f98d739d7f60a89474 Mon Sep 17 00:00:00 2001 From: duanhf2012 <6549168@qq.com> Date: Mon, 21 Aug 2023 15:44:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2gogoprotobuf=E4=B8=BAgoogle?= =?UTF-8?q?=E6=A0=87=E5=87=86=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 3 +- go.sum | 9 +- network/processor/pbprocessor.go | 2 +- rpc/dynamicdiscover.pb.go | 1431 ++---- rpc/dynamicdiscover.proto | 2 +- rpc/gogopbprocessor.go | 106 - rpc/gogorpc.pb.go | 769 --- rpc/messagequeue.pb.go | 2134 ++------- rpc/pbprocessor.go | 106 + rpc/protorpc.pb.go | 263 ++ rpc/{gogorpc.proto => protorpc.proto} | 6 +- rpc/rank.pb.go | 6224 +++++-------------------- rpc/server.go | 2 +- 13 files changed, 2447 insertions(+), 8610 deletions(-) delete mode 100644 rpc/gogopbprocessor.go delete mode 100644 rpc/gogorpc.pb.go create mode 100644 rpc/pbprocessor.go create mode 100644 rpc/protorpc.pb.go rename rpc/{gogorpc.proto => protorpc.proto} (72%) diff --git a/go.mod b/go.mod index 12b9768..5b759c2 100644 --- a/go.mod +++ b/go.mod @@ -4,11 +4,12 @@ go 1.21 require ( github.com/go-sql-driver/mysql v1.6.0 - github.com/gogo/protobuf v1.3.2 github.com/gomodule/redigo v1.8.8 github.com/gorilla/websocket v1.5.0 github.com/json-iterator/go v1.1.12 + github.com/pierrec/lz4/v4 v4.1.18 go.mongodb.org/mongo-driver v1.9.1 + google.golang.org/protobuf v1.31.0 gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 ) diff --git a/go.sum b/go.sum index d1914c8..070cb1f 100644 --- a/go.sum +++ b/go.sum @@ -7,12 +7,14 @@ github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.8.8 h1:f6cXq6RRfiyrOJEV7p3JhLDlmawGBVBBP1MggY8Mo4E= github.com/gomodule/redigo v1.8.8/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -32,6 +34,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -92,6 +96,9 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/network/processor/pbprocessor.go b/network/processor/pbprocessor.go index 87a1031..601157d 100644 --- a/network/processor/pbprocessor.go +++ b/network/processor/pbprocessor.go @@ -4,7 +4,7 @@ import ( "encoding/binary" "fmt" "github.com/duanhf2012/origin/util/bytespool" - "github.com/gogo/protobuf/proto" + "google.golang.org/protobuf/proto" "reflect" ) diff --git a/rpc/dynamicdiscover.pb.go b/rpc/dynamicdiscover.pb.go index 1466067..1d31933 100644 --- a/rpc/dynamicdiscover.pb.go +++ b/rpc/dynamicdiscover.pb.go @@ -1,1191 +1,408 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dynamicdiscover.proto +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v3.11.4 +// source: test/rpc/dynamicdiscover.proto package rpc import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type NodeInfo struct { - NodeId int32 `protobuf:"varint,1,opt,name=NodeId,proto3" json:"NodeId,omitempty"` - NodeName string `protobuf:"bytes,2,opt,name=NodeName,proto3" json:"NodeName,omitempty"` - ListenAddr string `protobuf:"bytes,3,opt,name=ListenAddr,proto3" json:"ListenAddr,omitempty"` - MaxRpcParamLen uint32 `protobuf:"varint,4,opt,name=MaxRpcParamLen,proto3" json:"MaxRpcParamLen,omitempty"` - Private bool `protobuf:"varint,5,opt,name=Private,proto3" json:"Private,omitempty"` - PublicServiceList []string `protobuf:"bytes,6,rep,name=PublicServiceList,proto3" json:"PublicServiceList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeId int32 `protobuf:"varint,1,opt,name=NodeId,proto3" json:"NodeId,omitempty"` + NodeName string `protobuf:"bytes,2,opt,name=NodeName,proto3" json:"NodeName,omitempty"` + ListenAddr string `protobuf:"bytes,3,opt,name=ListenAddr,proto3" json:"ListenAddr,omitempty"` + MaxRpcParamLen uint32 `protobuf:"varint,4,opt,name=MaxRpcParamLen,proto3" json:"MaxRpcParamLen,omitempty"` + Private bool `protobuf:"varint,5,opt,name=Private,proto3" json:"Private,omitempty"` + PublicServiceList []string `protobuf:"bytes,6,rep,name=PublicServiceList,proto3" json:"PublicServiceList,omitempty"` } -func (m *NodeInfo) Reset() { *m = NodeInfo{} } -func (m *NodeInfo) String() string { return proto.CompactTextString(m) } -func (*NodeInfo) ProtoMessage() {} +func (x *NodeInfo) Reset() { + *x = NodeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_dynamicdiscover_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeInfo) ProtoMessage() {} + +func (x *NodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_dynamicdiscover_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead. func (*NodeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_c41e5a852f87626c, []int{0} -} -func (m *NodeInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NodeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeInfo.Merge(m, src) -} -func (m *NodeInfo) XXX_Size() int { - return m.Size() -} -func (m *NodeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_NodeInfo.DiscardUnknown(m) + return file_test_rpc_dynamicdiscover_proto_rawDescGZIP(), []int{0} } -var xxx_messageInfo_NodeInfo proto.InternalMessageInfo - -func (m *NodeInfo) GetNodeId() int32 { - if m != nil { - return m.NodeId +func (x *NodeInfo) GetNodeId() int32 { + if x != nil { + return x.NodeId } return 0 } -func (m *NodeInfo) GetNodeName() string { - if m != nil { - return m.NodeName +func (x *NodeInfo) GetNodeName() string { + if x != nil { + return x.NodeName } return "" } -func (m *NodeInfo) GetListenAddr() string { - if m != nil { - return m.ListenAddr +func (x *NodeInfo) GetListenAddr() string { + if x != nil { + return x.ListenAddr } return "" } -func (m *NodeInfo) GetMaxRpcParamLen() uint32 { - if m != nil { - return m.MaxRpcParamLen +func (x *NodeInfo) GetMaxRpcParamLen() uint32 { + if x != nil { + return x.MaxRpcParamLen } return 0 } -func (m *NodeInfo) GetPrivate() bool { - if m != nil { - return m.Private +func (x *NodeInfo) GetPrivate() bool { + if x != nil { + return x.Private } return false } -func (m *NodeInfo) GetPublicServiceList() []string { - if m != nil { - return m.PublicServiceList +func (x *NodeInfo) GetPublicServiceList() []string { + if x != nil { + return x.PublicServiceList } return nil } -//Client->Master +// Client->Master type ServiceDiscoverReq struct { - NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=nodeInfo,proto3" json:"nodeInfo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=nodeInfo,proto3" json:"nodeInfo,omitempty"` } -func (m *ServiceDiscoverReq) Reset() { *m = ServiceDiscoverReq{} } -func (m *ServiceDiscoverReq) String() string { return proto.CompactTextString(m) } -func (*ServiceDiscoverReq) ProtoMessage() {} -func (*ServiceDiscoverReq) Descriptor() ([]byte, []int) { - return fileDescriptor_c41e5a852f87626c, []int{1} -} -func (m *ServiceDiscoverReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceDiscoverReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ServiceDiscoverReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *ServiceDiscoverReq) Reset() { + *x = ServiceDiscoverReq{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_dynamicdiscover_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *ServiceDiscoverReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceDiscoverReq.Merge(m, src) -} -func (m *ServiceDiscoverReq) XXX_Size() int { - return m.Size() -} -func (m *ServiceDiscoverReq) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceDiscoverReq.DiscardUnknown(m) + +func (x *ServiceDiscoverReq) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_ServiceDiscoverReq proto.InternalMessageInfo +func (*ServiceDiscoverReq) ProtoMessage() {} -func (m *ServiceDiscoverReq) GetNodeInfo() *NodeInfo { - if m != nil { - return m.NodeInfo +func (x *ServiceDiscoverReq) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_dynamicdiscover_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceDiscoverReq.ProtoReflect.Descriptor instead. +func (*ServiceDiscoverReq) Descriptor() ([]byte, []int) { + return file_test_rpc_dynamicdiscover_proto_rawDescGZIP(), []int{1} +} + +func (x *ServiceDiscoverReq) GetNodeInfo() *NodeInfo { + if x != nil { + return x.NodeInfo } return nil } -//Master->Client +// Master->Client type SubscribeDiscoverNotify struct { - MasterNodeId int32 `protobuf:"varint,1,opt,name=MasterNodeId,proto3" json:"MasterNodeId,omitempty"` - IsFull bool `protobuf:"varint,2,opt,name=IsFull,proto3" json:"IsFull,omitempty"` - DelNodeId int32 `protobuf:"varint,3,opt,name=DelNodeId,proto3" json:"DelNodeId,omitempty"` - NodeInfo []*NodeInfo `protobuf:"bytes,4,rep,name=nodeInfo,proto3" json:"nodeInfo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MasterNodeId int32 `protobuf:"varint,1,opt,name=MasterNodeId,proto3" json:"MasterNodeId,omitempty"` + IsFull bool `protobuf:"varint,2,opt,name=IsFull,proto3" json:"IsFull,omitempty"` + DelNodeId int32 `protobuf:"varint,3,opt,name=DelNodeId,proto3" json:"DelNodeId,omitempty"` + NodeInfo []*NodeInfo `protobuf:"bytes,4,rep,name=nodeInfo,proto3" json:"nodeInfo,omitempty"` } -func (m *SubscribeDiscoverNotify) Reset() { *m = SubscribeDiscoverNotify{} } -func (m *SubscribeDiscoverNotify) String() string { return proto.CompactTextString(m) } -func (*SubscribeDiscoverNotify) ProtoMessage() {} -func (*SubscribeDiscoverNotify) Descriptor() ([]byte, []int) { - return fileDescriptor_c41e5a852f87626c, []int{2} -} -func (m *SubscribeDiscoverNotify) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubscribeDiscoverNotify) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SubscribeDiscoverNotify.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *SubscribeDiscoverNotify) Reset() { + *x = SubscribeDiscoverNotify{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_dynamicdiscover_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *SubscribeDiscoverNotify) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubscribeDiscoverNotify.Merge(m, src) -} -func (m *SubscribeDiscoverNotify) XXX_Size() int { - return m.Size() -} -func (m *SubscribeDiscoverNotify) XXX_DiscardUnknown() { - xxx_messageInfo_SubscribeDiscoverNotify.DiscardUnknown(m) + +func (x *SubscribeDiscoverNotify) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_SubscribeDiscoverNotify proto.InternalMessageInfo +func (*SubscribeDiscoverNotify) ProtoMessage() {} -func (m *SubscribeDiscoverNotify) GetMasterNodeId() int32 { - if m != nil { - return m.MasterNodeId +func (x *SubscribeDiscoverNotify) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_dynamicdiscover_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubscribeDiscoverNotify.ProtoReflect.Descriptor instead. +func (*SubscribeDiscoverNotify) Descriptor() ([]byte, []int) { + return file_test_rpc_dynamicdiscover_proto_rawDescGZIP(), []int{2} +} + +func (x *SubscribeDiscoverNotify) GetMasterNodeId() int32 { + if x != nil { + return x.MasterNodeId } return 0 } -func (m *SubscribeDiscoverNotify) GetIsFull() bool { - if m != nil { - return m.IsFull +func (x *SubscribeDiscoverNotify) GetIsFull() bool { + if x != nil { + return x.IsFull } return false } -func (m *SubscribeDiscoverNotify) GetDelNodeId() int32 { - if m != nil { - return m.DelNodeId +func (x *SubscribeDiscoverNotify) GetDelNodeId() int32 { + if x != nil { + return x.DelNodeId } return 0 } -func (m *SubscribeDiscoverNotify) GetNodeInfo() []*NodeInfo { - if m != nil { - return m.NodeInfo +func (x *SubscribeDiscoverNotify) GetNodeInfo() []*NodeInfo { + if x != nil { + return x.NodeInfo } return nil } -//Master->Client +// Master->Client type Empty struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_dynamicdiscover_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Empty) ProtoMessage() {} + +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_dynamicdiscover_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_c41e5a852f87626c, []int{3} -} -func (m *Empty) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Empty.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Empty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Empty.Merge(m, src) -} -func (m *Empty) XXX_Size() int { - return m.Size() -} -func (m *Empty) XXX_DiscardUnknown() { - xxx_messageInfo_Empty.DiscardUnknown(m) + return file_test_rpc_dynamicdiscover_proto_rawDescGZIP(), []int{3} } -var xxx_messageInfo_Empty proto.InternalMessageInfo +var File_test_rpc_dynamicdiscover_proto protoreflect.FileDescriptor -func init() { - proto.RegisterType((*NodeInfo)(nil), "rpc.NodeInfo") - proto.RegisterType((*ServiceDiscoverReq)(nil), "rpc.ServiceDiscoverReq") - proto.RegisterType((*SubscribeDiscoverNotify)(nil), "rpc.SubscribeDiscoverNotify") - proto.RegisterType((*Empty)(nil), "rpc.Empty") -} - -func init() { proto.RegisterFile("dynamicdiscover.proto", fileDescriptor_c41e5a852f87626c) } - -var fileDescriptor_c41e5a852f87626c = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xdf, 0x4a, 0xc3, 0x30, - 0x14, 0xc6, 0x89, 0x5d, 0xb7, 0xee, 0xe8, 0x04, 0x23, 0x6a, 0x10, 0x29, 0xa5, 0x17, 0x52, 0x41, - 0x2a, 0xe8, 0x03, 0x88, 0x32, 0x85, 0xc1, 0x36, 0x46, 0x76, 0xe7, 0x5d, 0x9a, 0x66, 0x10, 0xe8, - 0x3f, 0xd3, 0x6c, 0xb8, 0x97, 0xf1, 0x79, 0xbc, 0x12, 0x1f, 0x41, 0xf6, 0x24, 0xb2, 0x98, 0xcd, - 0x4d, 0xc1, 0xbb, 0xfe, 0xbe, 0xaf, 0xe7, 0x70, 0xbe, 0x2f, 0x70, 0x94, 0xce, 0x0b, 0x96, 0x4b, - 0x9e, 0xca, 0x9a, 0x97, 0x33, 0xa1, 0xe2, 0x4a, 0x95, 0xba, 0xc4, 0x8e, 0xaa, 0x78, 0xf8, 0x8e, - 0xc0, 0x1b, 0x96, 0xa9, 0xe8, 0x15, 0x93, 0x12, 0x1f, 0x43, 0xd3, 0x7c, 0xa7, 0x04, 0x05, 0x28, - 0x72, 0xa9, 0x25, 0x7c, 0xfa, 0xfd, 0xcf, 0x90, 0xe5, 0x82, 0xec, 0x04, 0x28, 0x6a, 0xd3, 0x35, - 0x63, 0x1f, 0xa0, 0x2f, 0x6b, 0x2d, 0x8a, 0xbb, 0x34, 0x55, 0xc4, 0x31, 0xee, 0x86, 0x82, 0xcf, - 0x61, 0x7f, 0xc0, 0x5e, 0x68, 0xc5, 0x47, 0x4c, 0xb1, 0xbc, 0x2f, 0x0a, 0xd2, 0x08, 0x50, 0xd4, - 0xa1, 0xbf, 0x54, 0x4c, 0xa0, 0x35, 0x52, 0x72, 0xc6, 0xb4, 0x20, 0x6e, 0x80, 0x22, 0x8f, 0xae, - 0x10, 0x5f, 0xc2, 0xc1, 0x68, 0x9a, 0x64, 0x92, 0x8f, 0x85, 0x9a, 0x49, 0x2e, 0x96, 0xcb, 0x49, - 0x33, 0x70, 0xa2, 0x36, 0xfd, 0x6b, 0x84, 0xb7, 0x80, 0x2d, 0x76, 0x6d, 0x5c, 0x2a, 0x9e, 0xf1, - 0x05, 0x78, 0x85, 0x4d, 0x69, 0xb2, 0xed, 0x5e, 0x77, 0x62, 0x55, 0xf1, 0x78, 0x15, 0x9d, 0xae, - 0xed, 0xf0, 0x15, 0xc1, 0xc9, 0x78, 0x9a, 0xd4, 0x5c, 0xc9, 0x64, 0xbd, 0x63, 0x58, 0x6a, 0x39, - 0x99, 0xe3, 0x10, 0xf6, 0x06, 0xac, 0xd6, 0x4b, 0xde, 0xa8, 0x69, 0x4b, 0x5b, 0x96, 0xd8, 0xab, - 0x1f, 0xa7, 0x59, 0x66, 0xaa, 0xf2, 0xa8, 0x25, 0x7c, 0x06, 0xed, 0xae, 0xc8, 0xec, 0xa0, 0x63, - 0x06, 0x7f, 0x84, 0xad, 0x03, 0x1b, 0x81, 0xf3, 0xdf, 0x81, 0x2d, 0x70, 0x1f, 0xf2, 0x4a, 0xcf, - 0xef, 0x0f, 0xdf, 0x16, 0x3e, 0xfa, 0x58, 0xf8, 0xe8, 0x73, 0xe1, 0xa3, 0x27, 0x37, 0xbe, 0x52, - 0x15, 0x4f, 0x9a, 0xe6, 0x71, 0x6f, 0xbe, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xfb, 0xa9, 0x70, - 0xf5, 0x01, 0x00, 0x00, -} - -func (m *NodeInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PublicServiceList) > 0 { - for iNdEx := len(m.PublicServiceList) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PublicServiceList[iNdEx]) - copy(dAtA[i:], m.PublicServiceList[iNdEx]) - i = encodeVarintDynamicdiscover(dAtA, i, uint64(len(m.PublicServiceList[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if m.Private { - i-- - if m.Private { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.MaxRpcParamLen != 0 { - i = encodeVarintDynamicdiscover(dAtA, i, uint64(m.MaxRpcParamLen)) - i-- - dAtA[i] = 0x20 - } - if len(m.ListenAddr) > 0 { - i -= len(m.ListenAddr) - copy(dAtA[i:], m.ListenAddr) - i = encodeVarintDynamicdiscover(dAtA, i, uint64(len(m.ListenAddr))) - i-- - dAtA[i] = 0x1a - } - if len(m.NodeName) > 0 { - i -= len(m.NodeName) - copy(dAtA[i:], m.NodeName) - i = encodeVarintDynamicdiscover(dAtA, i, uint64(len(m.NodeName))) - i-- - dAtA[i] = 0x12 - } - if m.NodeId != 0 { - i = encodeVarintDynamicdiscover(dAtA, i, uint64(m.NodeId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ServiceDiscoverReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceDiscoverReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceDiscoverReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.NodeInfo != nil { - { - size, err := m.NodeInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDynamicdiscover(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SubscribeDiscoverNotify) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SubscribeDiscoverNotify) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubscribeDiscoverNotify) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.NodeInfo) > 0 { - for iNdEx := len(m.NodeInfo) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.NodeInfo[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDynamicdiscover(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.DelNodeId != 0 { - i = encodeVarintDynamicdiscover(dAtA, i, uint64(m.DelNodeId)) - i-- - dAtA[i] = 0x18 - } - if m.IsFull { - i-- - if m.IsFull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.MasterNodeId != 0 { - i = encodeVarintDynamicdiscover(dAtA, i, uint64(m.MasterNodeId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Empty) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Empty) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func encodeVarintDynamicdiscover(dAtA []byte, offset int, v uint64) int { - offset -= sovDynamicdiscover(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *NodeInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NodeId != 0 { - n += 1 + sovDynamicdiscover(uint64(m.NodeId)) - } - l = len(m.NodeName) - if l > 0 { - n += 1 + l + sovDynamicdiscover(uint64(l)) - } - l = len(m.ListenAddr) - if l > 0 { - n += 1 + l + sovDynamicdiscover(uint64(l)) - } - if m.MaxRpcParamLen != 0 { - n += 1 + sovDynamicdiscover(uint64(m.MaxRpcParamLen)) - } - if m.Private { - n += 2 - } - if len(m.PublicServiceList) > 0 { - for _, s := range m.PublicServiceList { - l = len(s) - n += 1 + l + sovDynamicdiscover(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ServiceDiscoverReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NodeInfo != nil { - l = m.NodeInfo.Size() - n += 1 + l + sovDynamicdiscover(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SubscribeDiscoverNotify) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MasterNodeId != 0 { - n += 1 + sovDynamicdiscover(uint64(m.MasterNodeId)) - } - if m.IsFull { - n += 2 - } - if m.DelNodeId != 0 { - n += 1 + sovDynamicdiscover(uint64(m.DelNodeId)) - } - if len(m.NodeInfo) > 0 { - for _, e := range m.NodeInfo { - l = e.Size() - n += 1 + l + sovDynamicdiscover(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Empty) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovDynamicdiscover(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDynamicdiscover(x uint64) (n int) { - return sovDynamicdiscover(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *NodeInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - m.NodeId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NodeId |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDynamicdiscover - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDynamicdiscover - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListenAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDynamicdiscover - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDynamicdiscover - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ListenAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRpcParamLen", wireType) - } - m.MaxRpcParamLen = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxRpcParamLen |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Private", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Private = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicServiceList", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDynamicdiscover - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDynamicdiscover - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicServiceList = append(m.PublicServiceList, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDynamicdiscover(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDynamicdiscover - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDynamicdiscover - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceDiscoverReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceDiscoverReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceDiscoverReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDynamicdiscover - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDynamicdiscover - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NodeInfo == nil { - m.NodeInfo = &NodeInfo{} - } - if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDynamicdiscover(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDynamicdiscover - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDynamicdiscover - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubscribeDiscoverNotify) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubscribeDiscoverNotify: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubscribeDiscoverNotify: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MasterNodeId", wireType) - } - m.MasterNodeId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MasterNodeId |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsFull", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsFull = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DelNodeId", wireType) - } - m.DelNodeId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DelNodeId |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDynamicdiscover - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDynamicdiscover - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeInfo = append(m.NodeInfo, &NodeInfo{}) - if err := m.NodeInfo[len(m.NodeInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDynamicdiscover(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDynamicdiscover - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDynamicdiscover - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Empty) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Empty: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipDynamicdiscover(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDynamicdiscover - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDynamicdiscover - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDynamicdiscover(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDynamicdiscover - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDynamicdiscover - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDynamicdiscover - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDynamicdiscover - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF +var file_test_rpc_dynamicdiscover_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x64, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x03, 0x72, 0x70, 0x63, 0x22, 0xce, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x6f, + 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x6f, + 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x41, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x4d, 0x61, 0x78, 0x52, 0x70, 0x63, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4c, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, + 0x4d, 0x61, 0x78, 0x52, 0x70, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4c, 0x65, 0x6e, 0x12, 0x18, + 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x11, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x29, 0x0a, 0x08, + 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x9e, 0x01, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x4e, 0x6f, 0x74, + 0x69, 0x66, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4d, 0x61, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x46, 0x75, 0x6c, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x12, + 0x1c, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x44, 0x65, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x29, 0x0a, + 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, + 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - ErrInvalidLengthDynamicdiscover = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDynamicdiscover = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDynamicdiscover = fmt.Errorf("proto: unexpected end of group") + file_test_rpc_dynamicdiscover_proto_rawDescOnce sync.Once + file_test_rpc_dynamicdiscover_proto_rawDescData = file_test_rpc_dynamicdiscover_proto_rawDesc ) + +func file_test_rpc_dynamicdiscover_proto_rawDescGZIP() []byte { + file_test_rpc_dynamicdiscover_proto_rawDescOnce.Do(func() { + file_test_rpc_dynamicdiscover_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_rpc_dynamicdiscover_proto_rawDescData) + }) + return file_test_rpc_dynamicdiscover_proto_rawDescData +} + +var file_test_rpc_dynamicdiscover_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_test_rpc_dynamicdiscover_proto_goTypes = []interface{}{ + (*NodeInfo)(nil), // 0: rpc.NodeInfo + (*ServiceDiscoverReq)(nil), // 1: rpc.ServiceDiscoverReq + (*SubscribeDiscoverNotify)(nil), // 2: rpc.SubscribeDiscoverNotify + (*Empty)(nil), // 3: rpc.Empty +} +var file_test_rpc_dynamicdiscover_proto_depIdxs = []int32{ + 0, // 0: rpc.ServiceDiscoverReq.nodeInfo:type_name -> rpc.NodeInfo + 0, // 1: rpc.SubscribeDiscoverNotify.nodeInfo:type_name -> rpc.NodeInfo + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_test_rpc_dynamicdiscover_proto_init() } +func file_test_rpc_dynamicdiscover_proto_init() { + if File_test_rpc_dynamicdiscover_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_test_rpc_dynamicdiscover_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_dynamicdiscover_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceDiscoverReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_dynamicdiscover_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeDiscoverNotify); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_dynamicdiscover_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_test_rpc_dynamicdiscover_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_test_rpc_dynamicdiscover_proto_goTypes, + DependencyIndexes: file_test_rpc_dynamicdiscover_proto_depIdxs, + MessageInfos: file_test_rpc_dynamicdiscover_proto_msgTypes, + }.Build() + File_test_rpc_dynamicdiscover_proto = out.File + file_test_rpc_dynamicdiscover_proto_rawDesc = nil + file_test_rpc_dynamicdiscover_proto_goTypes = nil + file_test_rpc_dynamicdiscover_proto_depIdxs = nil +} diff --git a/rpc/dynamicdiscover.proto b/rpc/dynamicdiscover.proto index 65a91b6..3538e6b 100644 --- a/rpc/dynamicdiscover.proto +++ b/rpc/dynamicdiscover.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package rpc; -option go_package = "./rpc"; +option go_package = ".;rpc"; message NodeInfo{ int32 NodeId = 1; diff --git a/rpc/gogopbprocessor.go b/rpc/gogopbprocessor.go deleted file mode 100644 index d3c9b21..0000000 --- a/rpc/gogopbprocessor.go +++ /dev/null @@ -1,106 +0,0 @@ -package rpc - -import ( - "github.com/duanhf2012/origin/util/sync" - "github.com/gogo/protobuf/proto" - "fmt" -) - -type GoGoPBProcessor struct { -} - -var rpcGoGoPbResponseDataPool =sync.NewPool(make(chan interface{},10240), func()interface{}{ - return &GoGoPBRpcResponseData{} -}) - -var rpcGoGoPbRequestDataPool =sync.NewPool(make(chan interface{},10240), func()interface{}{ - return &GoGoPBRpcRequestData{} -}) - -func (slf *GoGoPBRpcRequestData) MakeRequest(seq uint64,rpcMethodId uint32,serviceMethod string,noReply bool,inParam []byte) *GoGoPBRpcRequestData{ - slf.Seq = seq - slf.RpcMethodId = rpcMethodId - slf.ServiceMethod = serviceMethod - slf.NoReply = noReply - slf.InParam = inParam - - return slf -} - - -func (slf *GoGoPBRpcResponseData) MakeRespone(seq uint64,err RpcError,reply []byte) *GoGoPBRpcResponseData{ - slf.Seq = seq - slf.Error = err.Error() - slf.Reply = reply - - return slf -} - -func (slf *GoGoPBProcessor) Marshal(v interface{}) ([]byte, error){ - return proto.Marshal(v.(proto.Message)) -} - -func (slf *GoGoPBProcessor) Unmarshal(data []byte, msg interface{}) error{ - protoMsg,ok := msg.(proto.Message) - if ok == false { - return fmt.Errorf("%+v is not of proto.Message type",msg) - } - return proto.Unmarshal(data, protoMsg) -} - -func (slf *GoGoPBProcessor) MakeRpcRequest(seq uint64,rpcMethodId uint32,serviceMethod string,noReply bool,inParam []byte) IRpcRequestData{ - pGogoPbRpcRequestData := rpcGoGoPbRequestDataPool.Get().(*GoGoPBRpcRequestData) - pGogoPbRpcRequestData.MakeRequest(seq,rpcMethodId,serviceMethod,noReply,inParam) - return pGogoPbRpcRequestData -} - -func (slf *GoGoPBProcessor) MakeRpcResponse(seq uint64,err RpcError,reply []byte) IRpcResponseData { - pGoGoPBRpcResponseData := rpcGoGoPbResponseDataPool.Get().(*GoGoPBRpcResponseData) - pGoGoPBRpcResponseData.MakeRespone(seq,err,reply) - return pGoGoPBRpcResponseData -} - -func (slf *GoGoPBProcessor) ReleaseRpcRequest(rpcRequestData IRpcRequestData){ - rpcGoGoPbRequestDataPool.Put(rpcRequestData) -} - -func (slf *GoGoPBProcessor) ReleaseRpcResponse(rpcResponseData IRpcResponseData){ - rpcGoGoPbResponseDataPool.Put(rpcResponseData) -} - -func (slf *GoGoPBProcessor) IsParse(param interface{}) bool { - _,ok := param.(proto.Message) - return ok -} - -func (slf *GoGoPBProcessor) GetProcessorType() RpcProcessorType{ - return RpcProcessorGoGoPB -} - -func (slf *GoGoPBProcessor) Clone(src interface{}) (interface{},error){ - srcMsg,ok := src.(proto.Message) - if ok == false { - return nil,fmt.Errorf("param is not of proto.message type") - } - - return proto.Clone(srcMsg),nil -} - -func (slf *GoGoPBRpcRequestData) IsNoReply() bool{ - return slf.GetNoReply() -} - -func (slf *GoGoPBRpcResponseData) GetErr() *RpcError { - if slf.GetError() == "" { - return nil - } - - err := RpcError(slf.GetError()) - return &err -} - - - - - - diff --git a/rpc/gogorpc.pb.go b/rpc/gogorpc.pb.go deleted file mode 100644 index 9c2f9aa..0000000 --- a/rpc/gogorpc.pb.go +++ /dev/null @@ -1,769 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: gogorpc.proto - -package rpc - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type GoGoPBRpcRequestData struct { - Seq uint64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq,omitempty"` - RpcMethodId uint32 `protobuf:"varint,2,opt,name=RpcMethodId,proto3" json:"RpcMethodId,omitempty"` - ServiceMethod string `protobuf:"bytes,3,opt,name=ServiceMethod,proto3" json:"ServiceMethod,omitempty"` - NoReply bool `protobuf:"varint,4,opt,name=NoReply,proto3" json:"NoReply,omitempty"` - InParam []byte `protobuf:"bytes,5,opt,name=InParam,proto3" json:"InParam,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GoGoPBRpcRequestData) Reset() { *m = GoGoPBRpcRequestData{} } -func (m *GoGoPBRpcRequestData) String() string { return proto.CompactTextString(m) } -func (*GoGoPBRpcRequestData) ProtoMessage() {} -func (*GoGoPBRpcRequestData) Descriptor() ([]byte, []int) { - return fileDescriptor_d0e25d3af112ec8f, []int{0} -} -func (m *GoGoPBRpcRequestData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GoGoPBRpcRequestData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GoGoPBRpcRequestData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GoGoPBRpcRequestData) XXX_Merge(src proto.Message) { - xxx_messageInfo_GoGoPBRpcRequestData.Merge(m, src) -} -func (m *GoGoPBRpcRequestData) XXX_Size() int { - return m.Size() -} -func (m *GoGoPBRpcRequestData) XXX_DiscardUnknown() { - xxx_messageInfo_GoGoPBRpcRequestData.DiscardUnknown(m) -} - -var xxx_messageInfo_GoGoPBRpcRequestData proto.InternalMessageInfo - -func (m *GoGoPBRpcRequestData) GetSeq() uint64 { - if m != nil { - return m.Seq - } - return 0 -} - -func (m *GoGoPBRpcRequestData) GetRpcMethodId() uint32 { - if m != nil { - return m.RpcMethodId - } - return 0 -} - -func (m *GoGoPBRpcRequestData) GetServiceMethod() string { - if m != nil { - return m.ServiceMethod - } - return "" -} - -func (m *GoGoPBRpcRequestData) GetNoReply() bool { - if m != nil { - return m.NoReply - } - return false -} - -func (m *GoGoPBRpcRequestData) GetInParam() []byte { - if m != nil { - return m.InParam - } - return nil -} - -type GoGoPBRpcResponseData struct { - Seq uint64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq,omitempty"` - Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` - Reply []byte `protobuf:"bytes,3,opt,name=Reply,proto3" json:"Reply,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GoGoPBRpcResponseData) Reset() { *m = GoGoPBRpcResponseData{} } -func (m *GoGoPBRpcResponseData) String() string { return proto.CompactTextString(m) } -func (*GoGoPBRpcResponseData) ProtoMessage() {} -func (*GoGoPBRpcResponseData) Descriptor() ([]byte, []int) { - return fileDescriptor_d0e25d3af112ec8f, []int{1} -} -func (m *GoGoPBRpcResponseData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GoGoPBRpcResponseData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GoGoPBRpcResponseData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GoGoPBRpcResponseData) XXX_Merge(src proto.Message) { - xxx_messageInfo_GoGoPBRpcResponseData.Merge(m, src) -} -func (m *GoGoPBRpcResponseData) XXX_Size() int { - return m.Size() -} -func (m *GoGoPBRpcResponseData) XXX_DiscardUnknown() { - xxx_messageInfo_GoGoPBRpcResponseData.DiscardUnknown(m) -} - -var xxx_messageInfo_GoGoPBRpcResponseData proto.InternalMessageInfo - -func (m *GoGoPBRpcResponseData) GetSeq() uint64 { - if m != nil { - return m.Seq - } - return 0 -} - -func (m *GoGoPBRpcResponseData) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -func (m *GoGoPBRpcResponseData) GetReply() []byte { - if m != nil { - return m.Reply - } - return nil -} - -func init() { - proto.RegisterType((*GoGoPBRpcRequestData)(nil), "rpc.GoGoPBRpcRequestData") - proto.RegisterType((*GoGoPBRpcResponseData)(nil), "rpc.GoGoPBRpcResponseData") -} - -func init() { proto.RegisterFile("gogorpc.proto", fileDescriptor_d0e25d3af112ec8f) } - -var fileDescriptor_d0e25d3af112ec8f = []byte{ - // 233 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0xcf, 0x4f, 0xcf, - 0x2f, 0x2a, 0x48, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2e, 0x2a, 0x48, 0x56, 0x5a, - 0xc2, 0xc8, 0x25, 0xe2, 0x9e, 0xef, 0x9e, 0x1f, 0xe0, 0x14, 0x54, 0x90, 0x1c, 0x94, 0x5a, 0x58, - 0x9a, 0x5a, 0x5c, 0xe2, 0x92, 0x58, 0x92, 0x28, 0x24, 0xc0, 0xc5, 0x1c, 0x9c, 0x5a, 0x28, 0xc1, - 0xa8, 0xc0, 0xa8, 0xc1, 0x12, 0x04, 0x62, 0x0a, 0x29, 0x70, 0x71, 0x07, 0x15, 0x24, 0xfb, 0xa6, - 0x96, 0x64, 0xe4, 0xa7, 0x78, 0xa6, 0x48, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x06, 0x21, 0x0b, 0x09, - 0xa9, 0x70, 0xf1, 0x06, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x42, 0x84, 0x24, 0x98, 0x15, 0x18, - 0x35, 0x38, 0x83, 0x50, 0x05, 0x85, 0x24, 0xb8, 0xd8, 0xfd, 0xf2, 0x83, 0x52, 0x0b, 0x72, 0x2a, - 0x25, 0x58, 0x14, 0x18, 0x35, 0x38, 0x82, 0x60, 0x5c, 0x90, 0x8c, 0x67, 0x5e, 0x40, 0x62, 0x51, - 0x62, 0xae, 0x04, 0xab, 0x02, 0xa3, 0x06, 0x4f, 0x10, 0x8c, 0xab, 0x14, 0xca, 0x25, 0x8a, 0xe4, - 0xca, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x1c, 0xce, 0x14, 0xe1, 0x62, 0x75, 0x2d, 0x2a, 0xca, - 0x2f, 0x02, 0x3b, 0x90, 0x33, 0x08, 0xc2, 0x01, 0x89, 0x42, 0xac, 0x64, 0x06, 0x1b, 0x0c, 0xe1, - 0x38, 0x09, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x51, - 0xac, 0x7a, 0xfa, 0x45, 0x05, 0xc9, 0x49, 0x6c, 0xe0, 0xe0, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, - 0xff, 0x26, 0xcf, 0x31, 0x39, 0x2f, 0x01, 0x00, 0x00, -} - -func (m *GoGoPBRpcRequestData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GoGoPBRpcRequestData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GoGoPBRpcRequestData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.InParam) > 0 { - i -= len(m.InParam) - copy(dAtA[i:], m.InParam) - i = encodeVarintGogorpc(dAtA, i, uint64(len(m.InParam))) - i-- - dAtA[i] = 0x2a - } - if m.NoReply { - i-- - if m.NoReply { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.ServiceMethod) > 0 { - i -= len(m.ServiceMethod) - copy(dAtA[i:], m.ServiceMethod) - i = encodeVarintGogorpc(dAtA, i, uint64(len(m.ServiceMethod))) - i-- - dAtA[i] = 0x1a - } - if m.RpcMethodId != 0 { - i = encodeVarintGogorpc(dAtA, i, uint64(m.RpcMethodId)) - i-- - dAtA[i] = 0x10 - } - if m.Seq != 0 { - i = encodeVarintGogorpc(dAtA, i, uint64(m.Seq)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GoGoPBRpcResponseData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GoGoPBRpcResponseData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GoGoPBRpcResponseData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Reply) > 0 { - i -= len(m.Reply) - copy(dAtA[i:], m.Reply) - i = encodeVarintGogorpc(dAtA, i, uint64(len(m.Reply))) - i-- - dAtA[i] = 0x1a - } - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintGogorpc(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x12 - } - if m.Seq != 0 { - i = encodeVarintGogorpc(dAtA, i, uint64(m.Seq)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintGogorpc(dAtA []byte, offset int, v uint64) int { - offset -= sovGogorpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GoGoPBRpcRequestData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovGogorpc(uint64(m.Seq)) - } - if m.RpcMethodId != 0 { - n += 1 + sovGogorpc(uint64(m.RpcMethodId)) - } - l = len(m.ServiceMethod) - if l > 0 { - n += 1 + l + sovGogorpc(uint64(l)) - } - if m.NoReply { - n += 2 - } - l = len(m.InParam) - if l > 0 { - n += 1 + l + sovGogorpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GoGoPBRpcResponseData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovGogorpc(uint64(m.Seq)) - } - l = len(m.Error) - if l > 0 { - n += 1 + l + sovGogorpc(uint64(l)) - } - l = len(m.Reply) - if l > 0 { - n += 1 + l + sovGogorpc(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovGogorpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGogorpc(x uint64) (n int) { - return sovGogorpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GoGoPBRpcRequestData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GoGoPBRpcRequestData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GoGoPBRpcRequestData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) - } - m.Seq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Seq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RpcMethodId", wireType) - } - m.RpcMethodId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RpcMethodId |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGogorpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGogorpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceMethod = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoReply", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NoReply = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InParam", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGogorpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGogorpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InParam = append(m.InParam[:0], dAtA[iNdEx:postIndex]...) - if m.InParam == nil { - m.InParam = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGogorpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGogorpc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGogorpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GoGoPBRpcResponseData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GoGoPBRpcResponseData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GoGoPBRpcResponseData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) - } - m.Seq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Seq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGogorpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGogorpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reply", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGogorpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGogorpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGogorpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reply = append(m.Reply[:0], dAtA[iNdEx:postIndex]...) - if m.Reply == nil { - m.Reply = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGogorpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGogorpc - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGogorpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGogorpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogorpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogorpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGogorpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGogorpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGogorpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGogorpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGogorpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGogorpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGogorpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/rpc/messagequeue.pb.go b/rpc/messagequeue.pb.go index 255683f..a181b13 100644 --- a/rpc/messagequeue.pb.go +++ b/rpc/messagequeue.pb.go @@ -1,26 +1,24 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/rpcproto/messagequeue.proto +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v3.11.4 +// source: test/rpc/messagequeue.proto package rpc import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type SubscribeType int32 @@ -29,1749 +27,647 @@ const ( SubscribeType_Unsubscribe SubscribeType = 1 ) -var SubscribeType_name = map[int32]string{ - 0: "Subscribe", - 1: "Unsubscribe", -} +// Enum value maps for SubscribeType. +var ( + SubscribeType_name = map[int32]string{ + 0: "Subscribe", + 1: "Unsubscribe", + } + SubscribeType_value = map[string]int32{ + "Subscribe": 0, + "Unsubscribe": 1, + } +) -var SubscribeType_value = map[string]int32{ - "Subscribe": 0, - "Unsubscribe": 1, +func (x SubscribeType) Enum() *SubscribeType { + p := new(SubscribeType) + *p = x + return p } func (x SubscribeType) String() string { - return proto.EnumName(SubscribeType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } +func (SubscribeType) Descriptor() protoreflect.EnumDescriptor { + return file_test_rpc_messagequeue_proto_enumTypes[0].Descriptor() +} + +func (SubscribeType) Type() protoreflect.EnumType { + return &file_test_rpc_messagequeue_proto_enumTypes[0] +} + +func (x SubscribeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubscribeType.Descriptor instead. func (SubscribeType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2bf98a7a010f6009, []int{0} + return file_test_rpc_messagequeue_proto_rawDescGZIP(), []int{0} } type SubscribeMethod int32 const ( - SubscribeMethod_Method_Custom SubscribeMethod = 0 - SubscribeMethod_Method_Last SubscribeMethod = 1 + SubscribeMethod_Method_Custom SubscribeMethod = 0 //自定义模式,以消费者设置的StartIndex开始获取或订阅 + SubscribeMethod_Method_Last SubscribeMethod = 1 //Last模式,以该消费者上次记录的位置开始订阅 ) -var SubscribeMethod_name = map[int32]string{ - 0: "Method_Custom", - 1: "Method_Last", -} +// Enum value maps for SubscribeMethod. +var ( + SubscribeMethod_name = map[int32]string{ + 0: "Method_Custom", + 1: "Method_Last", + } + SubscribeMethod_value = map[string]int32{ + "Method_Custom": 0, + "Method_Last": 1, + } +) -var SubscribeMethod_value = map[string]int32{ - "Method_Custom": 0, - "Method_Last": 1, +func (x SubscribeMethod) Enum() *SubscribeMethod { + p := new(SubscribeMethod) + *p = x + return p } func (x SubscribeMethod) String() string { - return proto.EnumName(SubscribeMethod_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } +func (SubscribeMethod) Descriptor() protoreflect.EnumDescriptor { + return file_test_rpc_messagequeue_proto_enumTypes[1].Descriptor() +} + +func (SubscribeMethod) Type() protoreflect.EnumType { + return &file_test_rpc_messagequeue_proto_enumTypes[1] +} + +func (x SubscribeMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubscribeMethod.Descriptor instead. func (SubscribeMethod) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2bf98a7a010f6009, []int{1} + return file_test_rpc_messagequeue_proto_rawDescGZIP(), []int{1} } type DBQueuePopReq struct { - CustomerId string `protobuf:"bytes,1,opt,name=CustomerId,proto3" json:"CustomerId,omitempty"` - QueueName string `protobuf:"bytes,2,opt,name=QueueName,proto3" json:"QueueName,omitempty"` - PopStartPos int32 `protobuf:"varint,3,opt,name=PopStartPos,proto3" json:"PopStartPos,omitempty"` - PopNum int32 `protobuf:"varint,4,opt,name=PopNum,proto3" json:"PopNum,omitempty"` - PushData []byte `protobuf:"bytes,5,opt,name=pushData,proto3" json:"pushData,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CustomerId string `protobuf:"bytes,1,opt,name=CustomerId,proto3" json:"CustomerId,omitempty"` + QueueName string `protobuf:"bytes,2,opt,name=QueueName,proto3" json:"QueueName,omitempty"` + PopStartPos int32 `protobuf:"varint,3,opt,name=PopStartPos,proto3" json:"PopStartPos,omitempty"` + PopNum int32 `protobuf:"varint,4,opt,name=PopNum,proto3" json:"PopNum,omitempty"` + PushData []byte `protobuf:"bytes,5,opt,name=pushData,proto3" json:"pushData,omitempty"` } -func (m *DBQueuePopReq) Reset() { *m = DBQueuePopReq{} } -func (m *DBQueuePopReq) String() string { return proto.CompactTextString(m) } -func (*DBQueuePopReq) ProtoMessage() {} -func (*DBQueuePopReq) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf98a7a010f6009, []int{0} +func (x *DBQueuePopReq) Reset() { + *x = DBQueuePopReq{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_messagequeue_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DBQueuePopReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *DBQueuePopReq) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DBQueuePopReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DBQueuePopReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*DBQueuePopReq) ProtoMessage() {} + +func (x *DBQueuePopReq) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_messagequeue_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *DBQueuePopReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_DBQueuePopReq.Merge(m, src) -} -func (m *DBQueuePopReq) XXX_Size() int { - return m.Size() -} -func (m *DBQueuePopReq) XXX_DiscardUnknown() { - xxx_messageInfo_DBQueuePopReq.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_DBQueuePopReq proto.InternalMessageInfo +// Deprecated: Use DBQueuePopReq.ProtoReflect.Descriptor instead. +func (*DBQueuePopReq) Descriptor() ([]byte, []int) { + return file_test_rpc_messagequeue_proto_rawDescGZIP(), []int{0} +} -func (m *DBQueuePopReq) GetCustomerId() string { - if m != nil { - return m.CustomerId +func (x *DBQueuePopReq) GetCustomerId() string { + if x != nil { + return x.CustomerId } return "" } -func (m *DBQueuePopReq) GetQueueName() string { - if m != nil { - return m.QueueName +func (x *DBQueuePopReq) GetQueueName() string { + if x != nil { + return x.QueueName } return "" } -func (m *DBQueuePopReq) GetPopStartPos() int32 { - if m != nil { - return m.PopStartPos +func (x *DBQueuePopReq) GetPopStartPos() int32 { + if x != nil { + return x.PopStartPos } return 0 } -func (m *DBQueuePopReq) GetPopNum() int32 { - if m != nil { - return m.PopNum +func (x *DBQueuePopReq) GetPopNum() int32 { + if x != nil { + return x.PopNum } return 0 } -func (m *DBQueuePopReq) GetPushData() []byte { - if m != nil { - return m.PushData +func (x *DBQueuePopReq) GetPushData() []byte { + if x != nil { + return x.PushData } return nil } type DBQueuePopRes struct { - QueueName string `protobuf:"bytes,1,opt,name=QueueName,proto3" json:"QueueName,omitempty"` - PushData [][]byte `protobuf:"bytes,2,rep,name=pushData,proto3" json:"pushData,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueueName string `protobuf:"bytes,1,opt,name=QueueName,proto3" json:"QueueName,omitempty"` + PushData [][]byte `protobuf:"bytes,2,rep,name=pushData,proto3" json:"pushData,omitempty"` } -func (m *DBQueuePopRes) Reset() { *m = DBQueuePopRes{} } -func (m *DBQueuePopRes) String() string { return proto.CompactTextString(m) } -func (*DBQueuePopRes) ProtoMessage() {} -func (*DBQueuePopRes) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf98a7a010f6009, []int{1} -} -func (m *DBQueuePopRes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DBQueuePopRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DBQueuePopRes.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *DBQueuePopRes) Reset() { + *x = DBQueuePopRes{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_messagequeue_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *DBQueuePopRes) XXX_Merge(src proto.Message) { - xxx_messageInfo_DBQueuePopRes.Merge(m, src) -} -func (m *DBQueuePopRes) XXX_Size() int { - return m.Size() -} -func (m *DBQueuePopRes) XXX_DiscardUnknown() { - xxx_messageInfo_DBQueuePopRes.DiscardUnknown(m) + +func (x *DBQueuePopRes) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_DBQueuePopRes proto.InternalMessageInfo +func (*DBQueuePopRes) ProtoMessage() {} -func (m *DBQueuePopRes) GetQueueName() string { - if m != nil { - return m.QueueName +func (x *DBQueuePopRes) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_messagequeue_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBQueuePopRes.ProtoReflect.Descriptor instead. +func (*DBQueuePopRes) Descriptor() ([]byte, []int) { + return file_test_rpc_messagequeue_proto_rawDescGZIP(), []int{1} +} + +func (x *DBQueuePopRes) GetQueueName() string { + if x != nil { + return x.QueueName } return "" } -func (m *DBQueuePopRes) GetPushData() [][]byte { - if m != nil { - return m.PushData +func (x *DBQueuePopRes) GetPushData() [][]byte { + if x != nil { + return x.PushData } return nil } -//订阅 +// 订阅 type DBQueueSubscribeReq struct { - SubType SubscribeType `protobuf:"varint,1,opt,name=SubType,proto3,enum=SubscribeType" json:"SubType,omitempty"` - Method SubscribeMethod `protobuf:"varint,2,opt,name=Method,proto3,enum=SubscribeMethod" json:"Method,omitempty"` - CustomerId string `protobuf:"bytes,3,opt,name=CustomerId,proto3" json:"CustomerId,omitempty"` - FromNodeId int32 `protobuf:"varint,4,opt,name=FromNodeId,proto3" json:"FromNodeId,omitempty"` - RpcMethod string `protobuf:"bytes,5,opt,name=RpcMethod,proto3" json:"RpcMethod,omitempty"` - TopicName string `protobuf:"bytes,6,opt,name=TopicName,proto3" json:"TopicName,omitempty"` - StartIndex uint64 `protobuf:"varint,7,opt,name=StartIndex,proto3" json:"StartIndex,omitempty"` - OneBatchQuantity int32 `protobuf:"varint,8,opt,name=OneBatchQuantity,proto3" json:"OneBatchQuantity,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubType SubscribeType `protobuf:"varint,1,opt,name=SubType,proto3,enum=SubscribeType" json:"SubType,omitempty"` //订阅类型 + Method SubscribeMethod `protobuf:"varint,2,opt,name=Method,proto3,enum=SubscribeMethod" json:"Method,omitempty"` //订阅方法 + CustomerId string `protobuf:"bytes,3,opt,name=CustomerId,proto3" json:"CustomerId,omitempty"` //消费者Id + FromNodeId int32 `protobuf:"varint,4,opt,name=FromNodeId,proto3" json:"FromNodeId,omitempty"` + RpcMethod string `protobuf:"bytes,5,opt,name=RpcMethod,proto3" json:"RpcMethod,omitempty"` + TopicName string `protobuf:"bytes,6,opt,name=TopicName,proto3" json:"TopicName,omitempty"` //主题名称 + StartIndex uint64 `protobuf:"varint,7,opt,name=StartIndex,proto3" json:"StartIndex,omitempty"` //开始位置 ,格式前4位是时间戳秒,后面是序号。如果填0时,服务自动修改成:(4bit 当前时间秒)| (0000 4bit) + OneBatchQuantity int32 `protobuf:"varint,8,opt,name=OneBatchQuantity,proto3" json:"OneBatchQuantity,omitempty"` //订阅一次发送的数量,不设置有默认值1000条 } -func (m *DBQueueSubscribeReq) Reset() { *m = DBQueueSubscribeReq{} } -func (m *DBQueueSubscribeReq) String() string { return proto.CompactTextString(m) } -func (*DBQueueSubscribeReq) ProtoMessage() {} -func (*DBQueueSubscribeReq) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf98a7a010f6009, []int{2} -} -func (m *DBQueueSubscribeReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DBQueueSubscribeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DBQueueSubscribeReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *DBQueueSubscribeReq) Reset() { + *x = DBQueueSubscribeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_messagequeue_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *DBQueueSubscribeReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_DBQueueSubscribeReq.Merge(m, src) -} -func (m *DBQueueSubscribeReq) XXX_Size() int { - return m.Size() -} -func (m *DBQueueSubscribeReq) XXX_DiscardUnknown() { - xxx_messageInfo_DBQueueSubscribeReq.DiscardUnknown(m) + +func (x *DBQueueSubscribeReq) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_DBQueueSubscribeReq proto.InternalMessageInfo +func (*DBQueueSubscribeReq) ProtoMessage() {} -func (m *DBQueueSubscribeReq) GetSubType() SubscribeType { - if m != nil { - return m.SubType +func (x *DBQueueSubscribeReq) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_messagequeue_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBQueueSubscribeReq.ProtoReflect.Descriptor instead. +func (*DBQueueSubscribeReq) Descriptor() ([]byte, []int) { + return file_test_rpc_messagequeue_proto_rawDescGZIP(), []int{2} +} + +func (x *DBQueueSubscribeReq) GetSubType() SubscribeType { + if x != nil { + return x.SubType } return SubscribeType_Subscribe } -func (m *DBQueueSubscribeReq) GetMethod() SubscribeMethod { - if m != nil { - return m.Method +func (x *DBQueueSubscribeReq) GetMethod() SubscribeMethod { + if x != nil { + return x.Method } return SubscribeMethod_Method_Custom } -func (m *DBQueueSubscribeReq) GetCustomerId() string { - if m != nil { - return m.CustomerId +func (x *DBQueueSubscribeReq) GetCustomerId() string { + if x != nil { + return x.CustomerId } return "" } -func (m *DBQueueSubscribeReq) GetFromNodeId() int32 { - if m != nil { - return m.FromNodeId +func (x *DBQueueSubscribeReq) GetFromNodeId() int32 { + if x != nil { + return x.FromNodeId } return 0 } -func (m *DBQueueSubscribeReq) GetRpcMethod() string { - if m != nil { - return m.RpcMethod +func (x *DBQueueSubscribeReq) GetRpcMethod() string { + if x != nil { + return x.RpcMethod } return "" } -func (m *DBQueueSubscribeReq) GetTopicName() string { - if m != nil { - return m.TopicName +func (x *DBQueueSubscribeReq) GetTopicName() string { + if x != nil { + return x.TopicName } return "" } -func (m *DBQueueSubscribeReq) GetStartIndex() uint64 { - if m != nil { - return m.StartIndex +func (x *DBQueueSubscribeReq) GetStartIndex() uint64 { + if x != nil { + return x.StartIndex } return 0 } -func (m *DBQueueSubscribeReq) GetOneBatchQuantity() int32 { - if m != nil { - return m.OneBatchQuantity +func (x *DBQueueSubscribeReq) GetOneBatchQuantity() int32 { + if x != nil { + return x.OneBatchQuantity } return 0 } type DBQueueSubscribeRes struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *DBQueueSubscribeRes) Reset() { *m = DBQueueSubscribeRes{} } -func (m *DBQueueSubscribeRes) String() string { return proto.CompactTextString(m) } -func (*DBQueueSubscribeRes) ProtoMessage() {} -func (*DBQueueSubscribeRes) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf98a7a010f6009, []int{3} -} -func (m *DBQueueSubscribeRes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DBQueueSubscribeRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DBQueueSubscribeRes.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *DBQueueSubscribeRes) Reset() { + *x = DBQueueSubscribeRes{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_messagequeue_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *DBQueueSubscribeRes) XXX_Merge(src proto.Message) { - xxx_messageInfo_DBQueueSubscribeRes.Merge(m, src) -} -func (m *DBQueueSubscribeRes) XXX_Size() int { - return m.Size() -} -func (m *DBQueueSubscribeRes) XXX_DiscardUnknown() { - xxx_messageInfo_DBQueueSubscribeRes.DiscardUnknown(m) + +func (x *DBQueueSubscribeRes) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_DBQueueSubscribeRes proto.InternalMessageInfo +func (*DBQueueSubscribeRes) ProtoMessage() {} + +func (x *DBQueueSubscribeRes) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_messagequeue_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBQueueSubscribeRes.ProtoReflect.Descriptor instead. +func (*DBQueueSubscribeRes) Descriptor() ([]byte, []int) { + return file_test_rpc_messagequeue_proto_rawDescGZIP(), []int{3} +} type DBQueuePublishReq struct { - TopicName string `protobuf:"bytes,1,opt,name=TopicName,proto3" json:"TopicName,omitempty"` - PushData [][]byte `protobuf:"bytes,2,rep,name=pushData,proto3" json:"pushData,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TopicName string `protobuf:"bytes,1,opt,name=TopicName,proto3" json:"TopicName,omitempty"` //主是,名称,数据 + PushData [][]byte `protobuf:"bytes,2,rep,name=pushData,proto3" json:"pushData,omitempty"` } -func (m *DBQueuePublishReq) Reset() { *m = DBQueuePublishReq{} } -func (m *DBQueuePublishReq) String() string { return proto.CompactTextString(m) } -func (*DBQueuePublishReq) ProtoMessage() {} -func (*DBQueuePublishReq) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf98a7a010f6009, []int{4} -} -func (m *DBQueuePublishReq) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DBQueuePublishReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DBQueuePublishReq.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *DBQueuePublishReq) Reset() { + *x = DBQueuePublishReq{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_messagequeue_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *DBQueuePublishReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_DBQueuePublishReq.Merge(m, src) -} -func (m *DBQueuePublishReq) XXX_Size() int { - return m.Size() -} -func (m *DBQueuePublishReq) XXX_DiscardUnknown() { - xxx_messageInfo_DBQueuePublishReq.DiscardUnknown(m) + +func (x *DBQueuePublishReq) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_DBQueuePublishReq proto.InternalMessageInfo +func (*DBQueuePublishReq) ProtoMessage() {} -func (m *DBQueuePublishReq) GetTopicName() string { - if m != nil { - return m.TopicName +func (x *DBQueuePublishReq) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_messagequeue_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBQueuePublishReq.ProtoReflect.Descriptor instead. +func (*DBQueuePublishReq) Descriptor() ([]byte, []int) { + return file_test_rpc_messagequeue_proto_rawDescGZIP(), []int{4} +} + +func (x *DBQueuePublishReq) GetTopicName() string { + if x != nil { + return x.TopicName } return "" } -func (m *DBQueuePublishReq) GetPushData() [][]byte { - if m != nil { - return m.PushData +func (x *DBQueuePublishReq) GetPushData() [][]byte { + if x != nil { + return x.PushData } return nil } type DBQueuePublishRes struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *DBQueuePublishRes) Reset() { *m = DBQueuePublishRes{} } -func (m *DBQueuePublishRes) String() string { return proto.CompactTextString(m) } -func (*DBQueuePublishRes) ProtoMessage() {} +func (x *DBQueuePublishRes) Reset() { + *x = DBQueuePublishRes{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_messagequeue_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBQueuePublishRes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBQueuePublishRes) ProtoMessage() {} + +func (x *DBQueuePublishRes) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_messagequeue_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBQueuePublishRes.ProtoReflect.Descriptor instead. func (*DBQueuePublishRes) Descriptor() ([]byte, []int) { - return fileDescriptor_2bf98a7a010f6009, []int{5} -} -func (m *DBQueuePublishRes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DBQueuePublishRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DBQueuePublishRes.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DBQueuePublishRes) XXX_Merge(src proto.Message) { - xxx_messageInfo_DBQueuePublishRes.Merge(m, src) -} -func (m *DBQueuePublishRes) XXX_Size() int { - return m.Size() -} -func (m *DBQueuePublishRes) XXX_DiscardUnknown() { - xxx_messageInfo_DBQueuePublishRes.DiscardUnknown(m) + return file_test_rpc_messagequeue_proto_rawDescGZIP(), []int{5} } -var xxx_messageInfo_DBQueuePublishRes proto.InternalMessageInfo +var File_test_rpc_messagequeue_proto protoreflect.FileDescriptor -func init() { - proto.RegisterEnum("SubscribeType", SubscribeType_name, SubscribeType_value) - proto.RegisterEnum("SubscribeMethod", SubscribeMethod_name, SubscribeMethod_value) - proto.RegisterType((*DBQueuePopReq)(nil), "DBQueuePopReq") - proto.RegisterType((*DBQueuePopRes)(nil), "DBQueuePopRes") - proto.RegisterType((*DBQueueSubscribeReq)(nil), "DBQueueSubscribeReq") - proto.RegisterType((*DBQueueSubscribeRes)(nil), "DBQueueSubscribeRes") - proto.RegisterType((*DBQueuePublishReq)(nil), "DBQueuePublishReq") - proto.RegisterType((*DBQueuePublishRes)(nil), "DBQueuePublishRes") -} - -func init() { proto.RegisterFile("proto/rpcproto/messagequeue.proto", fileDescriptor_2bf98a7a010f6009) } - -var fileDescriptor_2bf98a7a010f6009 = []byte{ - // 432 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0xc1, 0x6e, 0xd3, 0x30, - 0x1c, 0xc6, 0x71, 0xbb, 0x76, 0xeb, 0x7f, 0xb4, 0xeb, 0x5c, 0x81, 0x22, 0x84, 0xa2, 0xd0, 0x53, - 0xd4, 0x43, 0x27, 0x0d, 0x71, 0xe2, 0x56, 0x26, 0xa4, 0x48, 0xac, 0x64, 0xee, 0xb8, 0x70, 0x41, - 0x4e, 0x62, 0x91, 0x48, 0x24, 0xf6, 0x62, 0x5b, 0x62, 0xcf, 0xc3, 0x13, 0xf0, 0x16, 0x1c, 0x79, - 0x04, 0xd4, 0x27, 0x41, 0xb1, 0xb3, 0x2c, 0x49, 0x11, 0x37, 0xfb, 0xf7, 0xb9, 0x5f, 0xbf, 0xff, - 0xf7, 0x57, 0xe0, 0x95, 0x28, 0xb9, 0xe2, 0x17, 0xa5, 0x88, 0xed, 0x21, 0x67, 0x52, 0xd2, 0xaf, - 0xec, 0x4e, 0x33, 0xcd, 0xd6, 0x06, 0x2d, 0x7f, 0x20, 0x98, 0x5e, 0x6d, 0x6e, 0x2a, 0x12, 0x72, - 0x41, 0xd8, 0x1d, 0x76, 0x01, 0xde, 0x69, 0xa9, 0x78, 0xce, 0xca, 0x20, 0x71, 0x90, 0x87, 0xfc, - 0x09, 0x69, 0x11, 0xfc, 0x12, 0x26, 0xe6, 0xf9, 0x96, 0xe6, 0xcc, 0x19, 0x18, 0xf9, 0x11, 0x60, - 0x0f, 0x4e, 0x43, 0x2e, 0x76, 0x8a, 0x96, 0x2a, 0xe4, 0xd2, 0x19, 0x7a, 0xc8, 0x1f, 0x91, 0x36, - 0xc2, 0xcf, 0x61, 0x1c, 0x72, 0xb1, 0xd5, 0xb9, 0x73, 0x64, 0xc4, 0xfa, 0x86, 0x5f, 0xc0, 0x89, - 0xd0, 0x32, 0xbd, 0xa2, 0x8a, 0x3a, 0x23, 0x0f, 0xf9, 0x4f, 0x49, 0x73, 0x5f, 0x06, 0xdd, 0x90, - 0xb2, 0x1b, 0x02, 0xf5, 0x43, 0xb4, 0xad, 0x06, 0xde, 0xb0, 0x63, 0xf5, 0x73, 0x00, 0x8b, 0xda, - 0x6b, 0xa7, 0x23, 0x19, 0x97, 0x59, 0xc4, 0xaa, 0xb1, 0x7d, 0x38, 0xde, 0xe9, 0xe8, 0xf6, 0x5e, - 0x58, 0xbf, 0xd9, 0xe5, 0x6c, 0xdd, 0xe8, 0x15, 0x25, 0x0f, 0x32, 0xf6, 0x61, 0x7c, 0xcd, 0x54, - 0xca, 0x13, 0x33, 0xfd, 0xec, 0x72, 0xfe, 0xf8, 0xd0, 0x72, 0x52, 0xeb, 0xbd, 0x2a, 0x87, 0x07, - 0x55, 0xba, 0x00, 0xef, 0x4b, 0x9e, 0x6f, 0x79, 0xc2, 0x82, 0xa4, 0xae, 0xa3, 0x45, 0xaa, 0x29, - 0x89, 0x88, 0xeb, 0x3f, 0x1b, 0xd9, 0x29, 0x1b, 0x50, 0xa9, 0xb7, 0x5c, 0x64, 0xb1, 0xe9, 0x60, - 0x6c, 0xd5, 0x06, 0x54, 0xde, 0xa6, 0xf2, 0xa0, 0x48, 0xd8, 0x77, 0xe7, 0xd8, 0x43, 0xfe, 0x11, - 0x69, 0x11, 0xbc, 0x82, 0xf9, 0xc7, 0x82, 0x6d, 0xa8, 0x8a, 0xd3, 0x1b, 0x4d, 0x0b, 0x95, 0xa9, - 0x7b, 0xe7, 0xc4, 0x24, 0x38, 0xe0, 0xcb, 0x67, 0xff, 0xaa, 0x4c, 0x2e, 0xaf, 0xe1, 0xfc, 0x61, - 0x2b, 0x3a, 0xfa, 0x96, 0xc9, 0xb4, 0xea, 0xb1, 0x93, 0x0a, 0xf5, 0x53, 0xfd, 0x6f, 0x33, 0x8b, - 0x43, 0x3b, 0xb9, 0xba, 0x80, 0x69, 0x67, 0x0d, 0x78, 0x0a, 0x93, 0x06, 0xcc, 0x9f, 0xe0, 0x33, - 0x38, 0xfd, 0x54, 0xc8, 0x06, 0xa0, 0xd5, 0x1b, 0x38, 0xeb, 0xad, 0x03, 0x9f, 0xc3, 0xd4, 0x9e, - 0xbe, 0xd8, 0xee, 0xed, 0xcf, 0x6a, 0xf4, 0x81, 0x4a, 0x35, 0x47, 0x9b, 0xc5, 0xaf, 0xbd, 0x8b, - 0x7e, 0xef, 0x5d, 0xf4, 0x67, 0xef, 0xa2, 0xcf, 0xa3, 0xf5, 0xdb, 0x52, 0xc4, 0xd1, 0xd8, 0x7c, - 0x23, 0xaf, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x86, 0xbb, 0x7c, 0xa8, 0x48, 0x03, 0x00, 0x00, -} - -func (m *DBQueuePopReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DBQueuePopReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DBQueuePopReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PushData) > 0 { - i -= len(m.PushData) - copy(dAtA[i:], m.PushData) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.PushData))) - i-- - dAtA[i] = 0x2a - } - if m.PopNum != 0 { - i = encodeVarintMessagequeue(dAtA, i, uint64(m.PopNum)) - i-- - dAtA[i] = 0x20 - } - if m.PopStartPos != 0 { - i = encodeVarintMessagequeue(dAtA, i, uint64(m.PopStartPos)) - i-- - dAtA[i] = 0x18 - } - if len(m.QueueName) > 0 { - i -= len(m.QueueName) - copy(dAtA[i:], m.QueueName) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.QueueName))) - i-- - dAtA[i] = 0x12 - } - if len(m.CustomerId) > 0 { - i -= len(m.CustomerId) - copy(dAtA[i:], m.CustomerId) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.CustomerId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DBQueuePopRes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DBQueuePopRes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DBQueuePopRes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PushData) > 0 { - for iNdEx := len(m.PushData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PushData[iNdEx]) - copy(dAtA[i:], m.PushData[iNdEx]) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.PushData[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.QueueName) > 0 { - i -= len(m.QueueName) - copy(dAtA[i:], m.QueueName) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.QueueName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DBQueueSubscribeReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DBQueueSubscribeReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DBQueueSubscribeReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.OneBatchQuantity != 0 { - i = encodeVarintMessagequeue(dAtA, i, uint64(m.OneBatchQuantity)) - i-- - dAtA[i] = 0x40 - } - if m.StartIndex != 0 { - i = encodeVarintMessagequeue(dAtA, i, uint64(m.StartIndex)) - i-- - dAtA[i] = 0x38 - } - if len(m.TopicName) > 0 { - i -= len(m.TopicName) - copy(dAtA[i:], m.TopicName) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.TopicName))) - i-- - dAtA[i] = 0x32 - } - if len(m.RpcMethod) > 0 { - i -= len(m.RpcMethod) - copy(dAtA[i:], m.RpcMethod) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.RpcMethod))) - i-- - dAtA[i] = 0x2a - } - if m.FromNodeId != 0 { - i = encodeVarintMessagequeue(dAtA, i, uint64(m.FromNodeId)) - i-- - dAtA[i] = 0x20 - } - if len(m.CustomerId) > 0 { - i -= len(m.CustomerId) - copy(dAtA[i:], m.CustomerId) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.CustomerId))) - i-- - dAtA[i] = 0x1a - } - if m.Method != 0 { - i = encodeVarintMessagequeue(dAtA, i, uint64(m.Method)) - i-- - dAtA[i] = 0x10 - } - if m.SubType != 0 { - i = encodeVarintMessagequeue(dAtA, i, uint64(m.SubType)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *DBQueueSubscribeRes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DBQueueSubscribeRes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DBQueueSubscribeRes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *DBQueuePublishReq) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DBQueuePublishReq) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DBQueuePublishReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.PushData) > 0 { - for iNdEx := len(m.PushData) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PushData[iNdEx]) - copy(dAtA[i:], m.PushData[iNdEx]) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.PushData[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.TopicName) > 0 { - i -= len(m.TopicName) - copy(dAtA[i:], m.TopicName) - i = encodeVarintMessagequeue(dAtA, i, uint64(len(m.TopicName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DBQueuePublishRes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DBQueuePublishRes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DBQueuePublishRes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func encodeVarintMessagequeue(dAtA []byte, offset int, v uint64) int { - offset -= sovMessagequeue(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *DBQueuePopReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CustomerId) - if l > 0 { - n += 1 + l + sovMessagequeue(uint64(l)) - } - l = len(m.QueueName) - if l > 0 { - n += 1 + l + sovMessagequeue(uint64(l)) - } - if m.PopStartPos != 0 { - n += 1 + sovMessagequeue(uint64(m.PopStartPos)) - } - if m.PopNum != 0 { - n += 1 + sovMessagequeue(uint64(m.PopNum)) - } - l = len(m.PushData) - if l > 0 { - n += 1 + l + sovMessagequeue(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DBQueuePopRes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.QueueName) - if l > 0 { - n += 1 + l + sovMessagequeue(uint64(l)) - } - if len(m.PushData) > 0 { - for _, b := range m.PushData { - l = len(b) - n += 1 + l + sovMessagequeue(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DBQueueSubscribeReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SubType != 0 { - n += 1 + sovMessagequeue(uint64(m.SubType)) - } - if m.Method != 0 { - n += 1 + sovMessagequeue(uint64(m.Method)) - } - l = len(m.CustomerId) - if l > 0 { - n += 1 + l + sovMessagequeue(uint64(l)) - } - if m.FromNodeId != 0 { - n += 1 + sovMessagequeue(uint64(m.FromNodeId)) - } - l = len(m.RpcMethod) - if l > 0 { - n += 1 + l + sovMessagequeue(uint64(l)) - } - l = len(m.TopicName) - if l > 0 { - n += 1 + l + sovMessagequeue(uint64(l)) - } - if m.StartIndex != 0 { - n += 1 + sovMessagequeue(uint64(m.StartIndex)) - } - if m.OneBatchQuantity != 0 { - n += 1 + sovMessagequeue(uint64(m.OneBatchQuantity)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DBQueueSubscribeRes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DBQueuePublishReq) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TopicName) - if l > 0 { - n += 1 + l + sovMessagequeue(uint64(l)) - } - if len(m.PushData) > 0 { - for _, b := range m.PushData { - l = len(b) - n += 1 + l + sovMessagequeue(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DBQueuePublishRes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMessagequeue(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMessagequeue(x uint64) (n int) { - return sovMessagequeue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *DBQueuePopReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DBQueuePopReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DBQueuePopReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CustomerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueueName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueueName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PopStartPos", wireType) - } - m.PopStartPos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PopStartPos |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PopNum", wireType) - } - m.PopNum = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PopNum |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PushData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PushData = append(m.PushData[:0], dAtA[iNdEx:postIndex]...) - if m.PushData == nil { - m.PushData = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessagequeue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DBQueuePopRes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DBQueuePopRes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DBQueuePopRes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueueName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueueName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PushData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PushData = append(m.PushData, make([]byte, postIndex-iNdEx)) - copy(m.PushData[len(m.PushData)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessagequeue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DBQueueSubscribeReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DBQueueSubscribeReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DBQueueSubscribeReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SubType", wireType) - } - m.SubType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SubType |= SubscribeType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) - } - m.Method = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Method |= SubscribeMethod(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomerId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CustomerId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FromNodeId", wireType) - } - m.FromNodeId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FromNodeId |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RpcMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RpcMethod = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TopicName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TopicName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartIndex", wireType) - } - m.StartIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OneBatchQuantity", wireType) - } - m.OneBatchQuantity = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OneBatchQuantity |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMessagequeue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DBQueueSubscribeRes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DBQueueSubscribeRes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DBQueueSubscribeRes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMessagequeue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DBQueuePublishReq) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DBQueuePublishReq: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DBQueuePublishReq: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TopicName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TopicName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PushData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMessagequeue - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMessagequeue - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PushData = append(m.PushData, make([]byte, postIndex-iNdEx)) - copy(m.PushData[len(m.PushData)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessagequeue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DBQueuePublishRes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DBQueuePublishRes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DBQueuePublishRes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMessagequeue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMessagequeue - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMessagequeue(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMessagequeue - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMessagequeue - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMessagequeue - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMessagequeue - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF +var file_test_rpc_messagequeue_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, + 0x0a, 0x0d, 0x44, 0x42, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, + 0x1e, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x50, 0x6f, 0x70, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0b, 0x50, 0x6f, 0x70, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x50, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x50, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x44, + 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x75, 0x73, 0x68, 0x44, + 0x61, 0x74, 0x61, 0x22, 0x49, 0x0a, 0x0d, 0x44, 0x42, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x6f, + 0x70, 0x52, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x22, 0xb1, + 0x02, 0x0a, 0x13, 0x44, 0x42, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x53, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x28, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x10, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x52, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x46, 0x72, + 0x6f, 0x6d, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, + 0x46, 0x72, 0x6f, 0x6d, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x70, + 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x52, + 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x54, 0x6f, 0x70, + 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x10, 0x4f, 0x6e, 0x65, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x10, 0x4f, 0x6e, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x42, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x22, 0x4d, 0x0a, 0x11, 0x44, 0x42, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, + 0x0a, 0x09, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, + 0x70, 0x75, 0x73, 0x68, 0x44, 0x61, 0x74, 0x61, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x42, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x2a, 0x2f, 0x0a, + 0x0d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, + 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x10, 0x00, 0x12, 0x0f, 0x0a, + 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x10, 0x01, 0x2a, 0x35, + 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x4c, + 0x61, 0x73, 0x74, 0x10, 0x01, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - ErrInvalidLengthMessagequeue = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMessagequeue = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMessagequeue = fmt.Errorf("proto: unexpected end of group") + file_test_rpc_messagequeue_proto_rawDescOnce sync.Once + file_test_rpc_messagequeue_proto_rawDescData = file_test_rpc_messagequeue_proto_rawDesc ) + +func file_test_rpc_messagequeue_proto_rawDescGZIP() []byte { + file_test_rpc_messagequeue_proto_rawDescOnce.Do(func() { + file_test_rpc_messagequeue_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_rpc_messagequeue_proto_rawDescData) + }) + return file_test_rpc_messagequeue_proto_rawDescData +} + +var file_test_rpc_messagequeue_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_test_rpc_messagequeue_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_test_rpc_messagequeue_proto_goTypes = []interface{}{ + (SubscribeType)(0), // 0: SubscribeType + (SubscribeMethod)(0), // 1: SubscribeMethod + (*DBQueuePopReq)(nil), // 2: DBQueuePopReq + (*DBQueuePopRes)(nil), // 3: DBQueuePopRes + (*DBQueueSubscribeReq)(nil), // 4: DBQueueSubscribeReq + (*DBQueueSubscribeRes)(nil), // 5: DBQueueSubscribeRes + (*DBQueuePublishReq)(nil), // 6: DBQueuePublishReq + (*DBQueuePublishRes)(nil), // 7: DBQueuePublishRes +} +var file_test_rpc_messagequeue_proto_depIdxs = []int32{ + 0, // 0: DBQueueSubscribeReq.SubType:type_name -> SubscribeType + 1, // 1: DBQueueSubscribeReq.Method:type_name -> SubscribeMethod + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_test_rpc_messagequeue_proto_init() } +func file_test_rpc_messagequeue_proto_init() { + if File_test_rpc_messagequeue_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_test_rpc_messagequeue_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBQueuePopReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_messagequeue_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBQueuePopRes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_messagequeue_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBQueueSubscribeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_messagequeue_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBQueueSubscribeRes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_messagequeue_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBQueuePublishReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_messagequeue_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBQueuePublishRes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_test_rpc_messagequeue_proto_rawDesc, + NumEnums: 2, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_test_rpc_messagequeue_proto_goTypes, + DependencyIndexes: file_test_rpc_messagequeue_proto_depIdxs, + EnumInfos: file_test_rpc_messagequeue_proto_enumTypes, + MessageInfos: file_test_rpc_messagequeue_proto_msgTypes, + }.Build() + File_test_rpc_messagequeue_proto = out.File + file_test_rpc_messagequeue_proto_rawDesc = nil + file_test_rpc_messagequeue_proto_goTypes = nil + file_test_rpc_messagequeue_proto_depIdxs = nil +} diff --git a/rpc/pbprocessor.go b/rpc/pbprocessor.go new file mode 100644 index 0000000..7d91453 --- /dev/null +++ b/rpc/pbprocessor.go @@ -0,0 +1,106 @@ +package rpc + +import ( + "github.com/duanhf2012/origin/util/sync" + "google.golang.org/protobuf/proto" + "fmt" +) + +type PBProcessor struct { +} + +var rpcPbResponseDataPool =sync.NewPool(make(chan interface{},10240), func()interface{}{ + return &PBRpcResponseData{} +}) + +var rpcPbRequestDataPool =sync.NewPool(make(chan interface{},10240), func()interface{}{ + return &PBRpcRequestData{} +}) + +func (slf *PBRpcRequestData) MakeRequest(seq uint64,rpcMethodId uint32,serviceMethod string,noReply bool,inParam []byte) *PBRpcRequestData{ + slf.Seq = seq + slf.RpcMethodId = rpcMethodId + slf.ServiceMethod = serviceMethod + slf.NoReply = noReply + slf.InParam = inParam + + return slf +} + + +func (slf *PBRpcResponseData) MakeRespone(seq uint64,err RpcError,reply []byte) *PBRpcResponseData{ + slf.Seq = seq + slf.Error = err.Error() + slf.Reply = reply + + return slf +} + +func (slf *PBProcessor) Marshal(v interface{}) ([]byte, error){ + return proto.Marshal(v.(proto.Message)) +} + +func (slf *PBProcessor) Unmarshal(data []byte, msg interface{}) error{ + protoMsg,ok := msg.(proto.Message) + if ok == false { + return fmt.Errorf("%+v is not of proto.Message type",msg) + } + return proto.Unmarshal(data, protoMsg) +} + +func (slf *PBProcessor) MakeRpcRequest(seq uint64,rpcMethodId uint32,serviceMethod string,noReply bool,inParam []byte) IRpcRequestData{ + pGogoPbRpcRequestData := rpcPbRequestDataPool.Get().(*PBRpcRequestData) + pGogoPbRpcRequestData.MakeRequest(seq,rpcMethodId,serviceMethod,noReply,inParam) + return pGogoPbRpcRequestData +} + +func (slf *PBProcessor) MakeRpcResponse(seq uint64,err RpcError,reply []byte) IRpcResponseData { + pPBRpcResponseData := rpcPbResponseDataPool.Get().(*PBRpcResponseData) + pPBRpcResponseData.MakeRespone(seq,err,reply) + return pPBRpcResponseData +} + +func (slf *PBProcessor) ReleaseRpcRequest(rpcRequestData IRpcRequestData){ + rpcPbRequestDataPool.Put(rpcRequestData) +} + +func (slf *PBProcessor) ReleaseRpcResponse(rpcResponseData IRpcResponseData){ + rpcPbResponseDataPool.Put(rpcResponseData) +} + +func (slf *PBProcessor) IsParse(param interface{}) bool { + _,ok := param.(proto.Message) + return ok +} + +func (slf *PBProcessor) GetProcessorType() RpcProcessorType{ + return RpcProcessorGoGoPB +} + +func (slf *PBProcessor) Clone(src interface{}) (interface{},error){ + srcMsg,ok := src.(proto.Message) + if ok == false { + return nil,fmt.Errorf("param is not of proto.message type") + } + + return proto.Clone(srcMsg),nil +} + +func (slf *PBRpcRequestData) IsNoReply() bool{ + return slf.GetNoReply() +} + +func (slf *PBRpcResponseData) GetErr() *RpcError { + if slf.GetError() == "" { + return nil + } + + err := RpcError(slf.GetError()) + return &err +} + + + + + + diff --git a/rpc/protorpc.pb.go b/rpc/protorpc.pb.go new file mode 100644 index 0000000..f59383b --- /dev/null +++ b/rpc/protorpc.pb.go @@ -0,0 +1,263 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v3.11.4 +// source: test/rpc/protorpc.proto + +package rpc + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PBRpcRequestData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Seq uint64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq,omitempty"` + RpcMethodId uint32 `protobuf:"varint,2,opt,name=RpcMethodId,proto3" json:"RpcMethodId,omitempty"` + ServiceMethod string `protobuf:"bytes,3,opt,name=ServiceMethod,proto3" json:"ServiceMethod,omitempty"` + NoReply bool `protobuf:"varint,4,opt,name=NoReply,proto3" json:"NoReply,omitempty"` + InParam []byte `protobuf:"bytes,5,opt,name=InParam,proto3" json:"InParam,omitempty"` +} + +func (x *PBRpcRequestData) Reset() { + *x = PBRpcRequestData{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_protorpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PBRpcRequestData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PBRpcRequestData) ProtoMessage() {} + +func (x *PBRpcRequestData) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_protorpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PBRpcRequestData.ProtoReflect.Descriptor instead. +func (*PBRpcRequestData) Descriptor() ([]byte, []int) { + return file_test_rpc_protorpc_proto_rawDescGZIP(), []int{0} +} + +func (x *PBRpcRequestData) GetSeq() uint64 { + if x != nil { + return x.Seq + } + return 0 +} + +func (x *PBRpcRequestData) GetRpcMethodId() uint32 { + if x != nil { + return x.RpcMethodId + } + return 0 +} + +func (x *PBRpcRequestData) GetServiceMethod() string { + if x != nil { + return x.ServiceMethod + } + return "" +} + +func (x *PBRpcRequestData) GetNoReply() bool { + if x != nil { + return x.NoReply + } + return false +} + +func (x *PBRpcRequestData) GetInParam() []byte { + if x != nil { + return x.InParam + } + return nil +} + +type PBRpcResponseData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Seq uint64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq,omitempty"` + Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` + Reply []byte `protobuf:"bytes,3,opt,name=Reply,proto3" json:"Reply,omitempty"` +} + +func (x *PBRpcResponseData) Reset() { + *x = PBRpcResponseData{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_protorpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PBRpcResponseData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PBRpcResponseData) ProtoMessage() {} + +func (x *PBRpcResponseData) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_protorpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PBRpcResponseData.ProtoReflect.Descriptor instead. +func (*PBRpcResponseData) Descriptor() ([]byte, []int) { + return file_test_rpc_protorpc_proto_rawDescGZIP(), []int{1} +} + +func (x *PBRpcResponseData) GetSeq() uint64 { + if x != nil { + return x.Seq + } + return 0 +} + +func (x *PBRpcResponseData) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +func (x *PBRpcResponseData) GetReply() []byte { + if x != nil { + return x.Reply + } + return nil +} + +var File_test_rpc_protorpc_proto protoreflect.FileDescriptor + +var file_test_rpc_protorpc_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x72, 0x70, 0x63, 0x22, 0xa0, + 0x01, 0x0a, 0x10, 0x50, 0x42, 0x52, 0x70, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x03, 0x53, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x52, 0x70, 0x63, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x4e, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x4e, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x6e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x49, 0x6e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x22, 0x51, 0x0a, 0x11, 0x50, 0x42, 0x52, 0x70, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x53, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_test_rpc_protorpc_proto_rawDescOnce sync.Once + file_test_rpc_protorpc_proto_rawDescData = file_test_rpc_protorpc_proto_rawDesc +) + +func file_test_rpc_protorpc_proto_rawDescGZIP() []byte { + file_test_rpc_protorpc_proto_rawDescOnce.Do(func() { + file_test_rpc_protorpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_rpc_protorpc_proto_rawDescData) + }) + return file_test_rpc_protorpc_proto_rawDescData +} + +var file_test_rpc_protorpc_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_test_rpc_protorpc_proto_goTypes = []interface{}{ + (*PBRpcRequestData)(nil), // 0: rpc.PBRpcRequestData + (*PBRpcResponseData)(nil), // 1: rpc.PBRpcResponseData +} +var file_test_rpc_protorpc_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_test_rpc_protorpc_proto_init() } +func file_test_rpc_protorpc_proto_init() { + if File_test_rpc_protorpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_test_rpc_protorpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PBRpcRequestData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_protorpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PBRpcResponseData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_test_rpc_protorpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_test_rpc_protorpc_proto_goTypes, + DependencyIndexes: file_test_rpc_protorpc_proto_depIdxs, + MessageInfos: file_test_rpc_protorpc_proto_msgTypes, + }.Build() + File_test_rpc_protorpc_proto = out.File + file_test_rpc_protorpc_proto_rawDesc = nil + file_test_rpc_protorpc_proto_goTypes = nil + file_test_rpc_protorpc_proto_depIdxs = nil +} diff --git a/rpc/gogorpc.proto b/rpc/protorpc.proto similarity index 72% rename from rpc/gogorpc.proto rename to rpc/protorpc.proto index 194e4d4..25afa2c 100644 --- a/rpc/gogorpc.proto +++ b/rpc/protorpc.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package rpc; -option go_package = "./rpc"; +option go_package = ".;rpc"; -message GoGoPBRpcRequestData{ +message PBRpcRequestData{ uint64 Seq = 1; uint32 RpcMethodId = 2; string ServiceMethod = 3; @@ -10,7 +10,7 @@ message GoGoPBRpcRequestData{ bytes InParam = 5; } -message GoGoPBRpcResponseData{ +message PBRpcResponseData{ uint64 Seq = 1; string Error = 2; bytes Reply = 3; diff --git a/rpc/rank.pb.go b/rpc/rank.pb.go index 9160caf..d4e2d49 100644 --- a/rpc/rank.pb.go +++ b/rpc/rank.pb.go @@ -1,5399 +1,1621 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/rpcproto/rank.proto +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v3.11.4 +// source: test/rpc/rank.proto package rpc import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type SetSortAndExtendData struct { - IsSortData bool `protobuf:"varint,1,opt,name=IsSortData,proto3" json:"IsSortData,omitempty"` - Pos int32 `protobuf:"varint,2,opt,name=Pos,proto3" json:"Pos,omitempty"` - Data int64 `protobuf:"varint,3,opt,name=Data,proto3" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsSortData bool `protobuf:"varint,1,opt,name=IsSortData,proto3" json:"IsSortData,omitempty"` //是否为排序字段,为true时,修改Sort字段,否则修改Extend数据 + Pos int32 `protobuf:"varint,2,opt,name=Pos,proto3" json:"Pos,omitempty"` //排序位置 + Data int64 `protobuf:"varint,3,opt,name=Data,proto3" json:"Data,omitempty"` //排序值 } -func (m *SetSortAndExtendData) Reset() { *m = SetSortAndExtendData{} } -func (m *SetSortAndExtendData) String() string { return proto.CompactTextString(m) } -func (*SetSortAndExtendData) ProtoMessage() {} +func (x *SetSortAndExtendData) Reset() { + *x = SetSortAndExtendData{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSortAndExtendData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSortAndExtendData) ProtoMessage() {} + +func (x *SetSortAndExtendData) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSortAndExtendData.ProtoReflect.Descriptor instead. func (*SetSortAndExtendData) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{0} -} -func (m *SetSortAndExtendData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SetSortAndExtendData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SetSortAndExtendData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SetSortAndExtendData) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetSortAndExtendData.Merge(m, src) -} -func (m *SetSortAndExtendData) XXX_Size() int { - return m.Size() -} -func (m *SetSortAndExtendData) XXX_DiscardUnknown() { - xxx_messageInfo_SetSortAndExtendData.DiscardUnknown(m) + return file_test_rpc_rank_proto_rawDescGZIP(), []int{0} } -var xxx_messageInfo_SetSortAndExtendData proto.InternalMessageInfo - -func (m *SetSortAndExtendData) GetIsSortData() bool { - if m != nil { - return m.IsSortData +func (x *SetSortAndExtendData) GetIsSortData() bool { + if x != nil { + return x.IsSortData } return false } -func (m *SetSortAndExtendData) GetPos() int32 { - if m != nil { - return m.Pos +func (x *SetSortAndExtendData) GetPos() int32 { + if x != nil { + return x.Pos } return 0 } -func (m *SetSortAndExtendData) GetData() int64 { - if m != nil { - return m.Data +func (x *SetSortAndExtendData) GetData() int64 { + if x != nil { + return x.Data } return 0 } -//自增值 +// 自增值 type IncreaseRankData struct { - RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` - Key uint64 `protobuf:"varint,2,opt,name=Key,proto3" json:"Key,omitempty"` - Extend []*ExtendIncData `protobuf:"bytes,3,rep,name=Extend,proto3" json:"Extend,omitempty"` - IncreaseSortData []int64 `protobuf:"varint,4,rep,packed,name=IncreaseSortData,proto3" json:"IncreaseSortData,omitempty"` - SetSortAndExtendData []*SetSortAndExtendData `protobuf:"bytes,5,rep,name=SetSortAndExtendData,proto3" json:"SetSortAndExtendData,omitempty"` - ReturnRankData bool `protobuf:"varint,6,opt,name=ReturnRankData,proto3" json:"ReturnRankData,omitempty"` - InsertDataOnNonExistent bool `protobuf:"varint,7,opt,name=InsertDataOnNonExistent,proto3" json:"InsertDataOnNonExistent,omitempty"` - InitData []byte `protobuf:"bytes,8,opt,name=InitData,proto3" json:"InitData,omitempty"` - InitSortData []int64 `protobuf:"varint,9,rep,packed,name=InitSortData,proto3" json:"InitSortData,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的ID + Key uint64 `protobuf:"varint,2,opt,name=Key,proto3" json:"Key,omitempty"` //数据主建 + Extend []*ExtendIncData `protobuf:"bytes,3,rep,name=Extend,proto3" json:"Extend,omitempty"` //扩展数据 + IncreaseSortData []int64 `protobuf:"varint,4,rep,packed,name=IncreaseSortData,proto3" json:"IncreaseSortData,omitempty"` //自增排行数值 + SetSortAndExtendData []*SetSortAndExtendData `protobuf:"bytes,5,rep,name=SetSortAndExtendData,proto3" json:"SetSortAndExtendData,omitempty"` //设置排序数据值 + ReturnRankData bool `protobuf:"varint,6,opt,name=ReturnRankData,proto3" json:"ReturnRankData,omitempty"` //是否查找最新排名,否则不返回排行Rank字段 + InsertDataOnNonExistent bool `protobuf:"varint,7,opt,name=InsertDataOnNonExistent,proto3" json:"InsertDataOnNonExistent,omitempty"` //为true时:存在不进行更新,不存在则插入InitData与InitSortData数据。为false时:忽略不对InitData与InitSortData数据 + InitData []byte `protobuf:"bytes,8,opt,name=InitData,proto3" json:"InitData,omitempty"` //不参与排行的数据 + InitSortData []int64 `protobuf:"varint,9,rep,packed,name=InitSortData,proto3" json:"InitSortData,omitempty"` //参与排行的数据 } -func (m *IncreaseRankData) Reset() { *m = IncreaseRankData{} } -func (m *IncreaseRankData) String() string { return proto.CompactTextString(m) } -func (*IncreaseRankData) ProtoMessage() {} -func (*IncreaseRankData) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{1} +func (x *IncreaseRankData) Reset() { + *x = IncreaseRankData{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *IncreaseRankData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *IncreaseRankData) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *IncreaseRankData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IncreaseRankData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*IncreaseRankData) ProtoMessage() {} + +func (x *IncreaseRankData) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *IncreaseRankData) XXX_Merge(src proto.Message) { - xxx_messageInfo_IncreaseRankData.Merge(m, src) -} -func (m *IncreaseRankData) XXX_Size() int { - return m.Size() -} -func (m *IncreaseRankData) XXX_DiscardUnknown() { - xxx_messageInfo_IncreaseRankData.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_IncreaseRankData proto.InternalMessageInfo +// Deprecated: Use IncreaseRankData.ProtoReflect.Descriptor instead. +func (*IncreaseRankData) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{1} +} -func (m *IncreaseRankData) GetRankId() uint64 { - if m != nil { - return m.RankId +func (x *IncreaseRankData) GetRankId() uint64 { + if x != nil { + return x.RankId } return 0 } -func (m *IncreaseRankData) GetKey() uint64 { - if m != nil { - return m.Key +func (x *IncreaseRankData) GetKey() uint64 { + if x != nil { + return x.Key } return 0 } -func (m *IncreaseRankData) GetExtend() []*ExtendIncData { - if m != nil { - return m.Extend +func (x *IncreaseRankData) GetExtend() []*ExtendIncData { + if x != nil { + return x.Extend } return nil } -func (m *IncreaseRankData) GetIncreaseSortData() []int64 { - if m != nil { - return m.IncreaseSortData +func (x *IncreaseRankData) GetIncreaseSortData() []int64 { + if x != nil { + return x.IncreaseSortData } return nil } -func (m *IncreaseRankData) GetSetSortAndExtendData() []*SetSortAndExtendData { - if m != nil { - return m.SetSortAndExtendData +func (x *IncreaseRankData) GetSetSortAndExtendData() []*SetSortAndExtendData { + if x != nil { + return x.SetSortAndExtendData } return nil } -func (m *IncreaseRankData) GetReturnRankData() bool { - if m != nil { - return m.ReturnRankData +func (x *IncreaseRankData) GetReturnRankData() bool { + if x != nil { + return x.ReturnRankData } return false } -func (m *IncreaseRankData) GetInsertDataOnNonExistent() bool { - if m != nil { - return m.InsertDataOnNonExistent +func (x *IncreaseRankData) GetInsertDataOnNonExistent() bool { + if x != nil { + return x.InsertDataOnNonExistent } return false } -func (m *IncreaseRankData) GetInitData() []byte { - if m != nil { - return m.InitData +func (x *IncreaseRankData) GetInitData() []byte { + if x != nil { + return x.InitData } return nil } -func (m *IncreaseRankData) GetInitSortData() []int64 { - if m != nil { - return m.InitSortData +func (x *IncreaseRankData) GetInitSortData() []int64 { + if x != nil { + return x.InitSortData } return nil } type IncreaseRankDataRet struct { - PosData *RankPosData `protobuf:"bytes,1,opt,name=PosData,proto3" json:"PosData,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PosData *RankPosData `protobuf:"bytes,1,opt,name=PosData,proto3" json:"PosData,omitempty"` } -func (m *IncreaseRankDataRet) Reset() { *m = IncreaseRankDataRet{} } -func (m *IncreaseRankDataRet) String() string { return proto.CompactTextString(m) } -func (*IncreaseRankDataRet) ProtoMessage() {} -func (*IncreaseRankDataRet) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{2} -} -func (m *IncreaseRankDataRet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IncreaseRankDataRet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IncreaseRankDataRet.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *IncreaseRankDataRet) Reset() { + *x = IncreaseRankDataRet{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *IncreaseRankDataRet) XXX_Merge(src proto.Message) { - xxx_messageInfo_IncreaseRankDataRet.Merge(m, src) -} -func (m *IncreaseRankDataRet) XXX_Size() int { - return m.Size() -} -func (m *IncreaseRankDataRet) XXX_DiscardUnknown() { - xxx_messageInfo_IncreaseRankDataRet.DiscardUnknown(m) + +func (x *IncreaseRankDataRet) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_IncreaseRankDataRet proto.InternalMessageInfo +func (*IncreaseRankDataRet) ProtoMessage() {} -func (m *IncreaseRankDataRet) GetPosData() *RankPosData { - if m != nil { - return m.PosData +func (x *IncreaseRankDataRet) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IncreaseRankDataRet.ProtoReflect.Descriptor instead. +func (*IncreaseRankDataRet) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{2} +} + +func (x *IncreaseRankDataRet) GetPosData() *RankPosData { + if x != nil { + return x.PosData } return nil } -//用于单独刷新排行榜数据 +// 用于单独刷新排行榜数据 type UpdateRankData struct { - RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` - Key uint64 `protobuf:"varint,2,opt,name=Key,proto3" json:"Key,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的ID + Key uint64 `protobuf:"varint,2,opt,name=Key,proto3" json:"Key,omitempty"` //数据主建 + Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` //数据部分 } -func (m *UpdateRankData) Reset() { *m = UpdateRankData{} } -func (m *UpdateRankData) String() string { return proto.CompactTextString(m) } -func (*UpdateRankData) ProtoMessage() {} -func (*UpdateRankData) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{3} +func (x *UpdateRankData) Reset() { + *x = UpdateRankData{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *UpdateRankData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *UpdateRankData) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UpdateRankData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpdateRankData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*UpdateRankData) ProtoMessage() {} + +func (x *UpdateRankData) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *UpdateRankData) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateRankData.Merge(m, src) -} -func (m *UpdateRankData) XXX_Size() int { - return m.Size() -} -func (m *UpdateRankData) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateRankData.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_UpdateRankData proto.InternalMessageInfo +// Deprecated: Use UpdateRankData.ProtoReflect.Descriptor instead. +func (*UpdateRankData) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{3} +} -func (m *UpdateRankData) GetRankId() uint64 { - if m != nil { - return m.RankId +func (x *UpdateRankData) GetRankId() uint64 { + if x != nil { + return x.RankId } return 0 } -func (m *UpdateRankData) GetKey() uint64 { - if m != nil { - return m.Key +func (x *UpdateRankData) GetKey() uint64 { + if x != nil { + return x.Key } return 0 } -func (m *UpdateRankData) GetData() []byte { - if m != nil { - return m.Data +func (x *UpdateRankData) GetData() []byte { + if x != nil { + return x.Data } return nil } type UpdateRankDataRet struct { - Ret bool `protobuf:"varint,1,opt,name=Ret,proto3" json:"Ret,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ret bool `protobuf:"varint,1,opt,name=Ret,proto3" json:"Ret,omitempty"` } -func (m *UpdateRankDataRet) Reset() { *m = UpdateRankDataRet{} } -func (m *UpdateRankDataRet) String() string { return proto.CompactTextString(m) } -func (*UpdateRankDataRet) ProtoMessage() {} -func (*UpdateRankDataRet) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{4} -} -func (m *UpdateRankDataRet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpdateRankDataRet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpdateRankDataRet.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *UpdateRankDataRet) Reset() { + *x = UpdateRankDataRet{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *UpdateRankDataRet) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateRankDataRet.Merge(m, src) -} -func (m *UpdateRankDataRet) XXX_Size() int { - return m.Size() -} -func (m *UpdateRankDataRet) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateRankDataRet.DiscardUnknown(m) + +func (x *UpdateRankDataRet) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_UpdateRankDataRet proto.InternalMessageInfo +func (*UpdateRankDataRet) ProtoMessage() {} -func (m *UpdateRankDataRet) GetRet() bool { - if m != nil { - return m.Ret +func (x *UpdateRankDataRet) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateRankDataRet.ProtoReflect.Descriptor instead. +func (*UpdateRankDataRet) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateRankDataRet) GetRet() bool { + if x != nil { + return x.Ret } return false } // RankPosData 排行数据——查询返回 type RankPosData struct { - Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` - Rank uint64 `protobuf:"varint,2,opt,name=Rank,proto3" json:"Rank,omitempty"` - SortData []int64 `protobuf:"varint,3,rep,packed,name=SortData,proto3" json:"SortData,omitempty"` - Data []byte `protobuf:"bytes,4,opt,name=Data,proto3" json:"Data,omitempty"` - ExtendData []int64 `protobuf:"varint,5,rep,packed,name=ExtendData,proto3" json:"ExtendData,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` //数据主建 + Rank uint64 `protobuf:"varint,2,opt,name=Rank,proto3" json:"Rank,omitempty"` //名次 + SortData []int64 `protobuf:"varint,3,rep,packed,name=SortData,proto3" json:"SortData,omitempty"` //参与排行的数据 + Data []byte `protobuf:"bytes,4,opt,name=Data,proto3" json:"Data,omitempty"` //不参与排行的数据 + ExtendData []int64 `protobuf:"varint,5,rep,packed,name=ExtendData,proto3" json:"ExtendData,omitempty"` //扩展数据 } -func (m *RankPosData) Reset() { *m = RankPosData{} } -func (m *RankPosData) String() string { return proto.CompactTextString(m) } -func (*RankPosData) ProtoMessage() {} -func (*RankPosData) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{5} +func (x *RankPosData) Reset() { + *x = RankPosData{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RankPosData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *RankPosData) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RankPosData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RankPosData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*RankPosData) ProtoMessage() {} + +func (x *RankPosData) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *RankPosData) XXX_Merge(src proto.Message) { - xxx_messageInfo_RankPosData.Merge(m, src) -} -func (m *RankPosData) XXX_Size() int { - return m.Size() -} -func (m *RankPosData) XXX_DiscardUnknown() { - xxx_messageInfo_RankPosData.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_RankPosData proto.InternalMessageInfo +// Deprecated: Use RankPosData.ProtoReflect.Descriptor instead. +func (*RankPosData) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{5} +} -func (m *RankPosData) GetKey() uint64 { - if m != nil { - return m.Key +func (x *RankPosData) GetKey() uint64 { + if x != nil { + return x.Key } return 0 } -func (m *RankPosData) GetRank() uint64 { - if m != nil { - return m.Rank +func (x *RankPosData) GetRank() uint64 { + if x != nil { + return x.Rank } return 0 } -func (m *RankPosData) GetSortData() []int64 { - if m != nil { - return m.SortData +func (x *RankPosData) GetSortData() []int64 { + if x != nil { + return x.SortData } return nil } -func (m *RankPosData) GetData() []byte { - if m != nil { - return m.Data +func (x *RankPosData) GetData() []byte { + if x != nil { + return x.Data } return nil } -func (m *RankPosData) GetExtendData() []int64 { - if m != nil { - return m.ExtendData +func (x *RankPosData) GetExtendData() []int64 { + if x != nil { + return x.ExtendData } return nil } // RankList 排行榜数据 type RankList struct { - RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` - RankName string `protobuf:"bytes,2,opt,name=RankName,proto3" json:"RankName,omitempty"` - SkipListLevel int32 `protobuf:"varint,3,opt,name=SkipListLevel,proto3" json:"SkipListLevel,omitempty"` - IsDec bool `protobuf:"varint,4,opt,name=IsDec,proto3" json:"IsDec,omitempty"` - MaxRank uint64 `protobuf:"varint,5,opt,name=MaxRank,proto3" json:"MaxRank,omitempty"` - ExpireMs int64 `protobuf:"varint,6,opt,name=ExpireMs,proto3" json:"ExpireMs,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜类型 + RankName string `protobuf:"bytes,2,opt,name=RankName,proto3" json:"RankName,omitempty"` //排行榜名称 + SkipListLevel int32 `protobuf:"varint,3,opt,name=SkipListLevel,proto3" json:"SkipListLevel,omitempty"` //排行榜level-生成的跳表的level, 8/16/32/64等 + IsDec bool `protobuf:"varint,4,opt,name=IsDec,proto3" json:"IsDec,omitempty"` //不参与排行的数据 + MaxRank uint64 `protobuf:"varint,5,opt,name=MaxRank,proto3" json:"MaxRank,omitempty"` //最大排名 + ExpireMs int64 `protobuf:"varint,6,opt,name=ExpireMs,proto3" json:"ExpireMs,omitempty"` //有效时间,0永不过期 } -func (m *RankList) Reset() { *m = RankList{} } -func (m *RankList) String() string { return proto.CompactTextString(m) } -func (*RankList) ProtoMessage() {} -func (*RankList) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{6} -} -func (m *RankList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RankList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RankList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *RankList) Reset() { + *x = RankList{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *RankList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RankList.Merge(m, src) -} -func (m *RankList) XXX_Size() int { - return m.Size() -} -func (m *RankList) XXX_DiscardUnknown() { - xxx_messageInfo_RankList.DiscardUnknown(m) + +func (x *RankList) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_RankList proto.InternalMessageInfo +func (*RankList) ProtoMessage() {} -func (m *RankList) GetRankId() uint64 { - if m != nil { - return m.RankId +func (x *RankList) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RankList.ProtoReflect.Descriptor instead. +func (*RankList) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{6} +} + +func (x *RankList) GetRankId() uint64 { + if x != nil { + return x.RankId } return 0 } -func (m *RankList) GetRankName() string { - if m != nil { - return m.RankName +func (x *RankList) GetRankName() string { + if x != nil { + return x.RankName } return "" } -func (m *RankList) GetSkipListLevel() int32 { - if m != nil { - return m.SkipListLevel +func (x *RankList) GetSkipListLevel() int32 { + if x != nil { + return x.SkipListLevel } return 0 } -func (m *RankList) GetIsDec() bool { - if m != nil { - return m.IsDec +func (x *RankList) GetIsDec() bool { + if x != nil { + return x.IsDec } return false } -func (m *RankList) GetMaxRank() uint64 { - if m != nil { - return m.MaxRank +func (x *RankList) GetMaxRank() uint64 { + if x != nil { + return x.MaxRank } return 0 } -func (m *RankList) GetExpireMs() int64 { - if m != nil { - return m.ExpireMs +func (x *RankList) GetExpireMs() int64 { + if x != nil { + return x.ExpireMs } return 0 } // UpsetRankData 更新排行榜数据 type UpsetRankData struct { - RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` - RankDataList []*RankData `protobuf:"bytes,2,rep,name=RankDataList,proto3" json:"RankDataList,omitempty"` - FindNewRank bool `protobuf:"varint,3,opt,name=FindNewRank,proto3" json:"FindNewRank,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的ID + RankDataList []*RankData `protobuf:"bytes,2,rep,name=RankDataList,proto3" json:"RankDataList,omitempty"` //排行数据 + FindNewRank bool `protobuf:"varint,3,opt,name=FindNewRank,proto3" json:"FindNewRank,omitempty"` //是否查找最新排名 } -func (m *UpsetRankData) Reset() { *m = UpsetRankData{} } -func (m *UpsetRankData) String() string { return proto.CompactTextString(m) } -func (*UpsetRankData) ProtoMessage() {} -func (*UpsetRankData) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{7} -} -func (m *UpsetRankData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpsetRankData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpsetRankData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *UpsetRankData) Reset() { + *x = UpsetRankData{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *UpsetRankData) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpsetRankData.Merge(m, src) -} -func (m *UpsetRankData) XXX_Size() int { - return m.Size() -} -func (m *UpsetRankData) XXX_DiscardUnknown() { - xxx_messageInfo_UpsetRankData.DiscardUnknown(m) + +func (x *UpsetRankData) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_UpsetRankData proto.InternalMessageInfo +func (*UpsetRankData) ProtoMessage() {} -func (m *UpsetRankData) GetRankId() uint64 { - if m != nil { - return m.RankId +func (x *UpsetRankData) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpsetRankData.ProtoReflect.Descriptor instead. +func (*UpsetRankData) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{7} +} + +func (x *UpsetRankData) GetRankId() uint64 { + if x != nil { + return x.RankId } return 0 } -func (m *UpsetRankData) GetRankDataList() []*RankData { - if m != nil { - return m.RankDataList +func (x *UpsetRankData) GetRankDataList() []*RankData { + if x != nil { + return x.RankDataList } return nil } -func (m *UpsetRankData) GetFindNewRank() bool { - if m != nil { - return m.FindNewRank +func (x *UpsetRankData) GetFindNewRank() bool { + if x != nil { + return x.FindNewRank } return false } type ExtendIncData struct { - InitValue int64 `protobuf:"varint,1,opt,name=InitValue,proto3" json:"InitValue,omitempty"` - IncreaseValue int64 `protobuf:"varint,2,opt,name=IncreaseValue,proto3" json:"IncreaseValue,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InitValue int64 `protobuf:"varint,1,opt,name=InitValue,proto3" json:"InitValue,omitempty"` + IncreaseValue int64 `protobuf:"varint,2,opt,name=IncreaseValue,proto3" json:"IncreaseValue,omitempty"` } -func (m *ExtendIncData) Reset() { *m = ExtendIncData{} } -func (m *ExtendIncData) String() string { return proto.CompactTextString(m) } -func (*ExtendIncData) ProtoMessage() {} -func (*ExtendIncData) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{8} -} -func (m *ExtendIncData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtendIncData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExtendIncData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *ExtendIncData) Reset() { + *x = ExtendIncData{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *ExtendIncData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtendIncData.Merge(m, src) -} -func (m *ExtendIncData) XXX_Size() int { - return m.Size() -} -func (m *ExtendIncData) XXX_DiscardUnknown() { - xxx_messageInfo_ExtendIncData.DiscardUnknown(m) + +func (x *ExtendIncData) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_ExtendIncData proto.InternalMessageInfo +func (*ExtendIncData) ProtoMessage() {} -func (m *ExtendIncData) GetInitValue() int64 { - if m != nil { - return m.InitValue +func (x *ExtendIncData) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtendIncData.ProtoReflect.Descriptor instead. +func (*ExtendIncData) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{8} +} + +func (x *ExtendIncData) GetInitValue() int64 { + if x != nil { + return x.InitValue } return 0 } -func (m *ExtendIncData) GetIncreaseValue() int64 { - if m != nil { - return m.IncreaseValue +func (x *ExtendIncData) GetIncreaseValue() int64 { + if x != nil { + return x.IncreaseValue } return 0 } // RankData 排行数据 type RankData struct { - Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` - SortData []int64 `protobuf:"varint,2,rep,packed,name=SortData,proto3" json:"SortData,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` - ExData []*ExtendIncData `protobuf:"bytes,4,rep,name=ExData,proto3" json:"ExData,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` //数据主建 + SortData []int64 `protobuf:"varint,2,rep,packed,name=SortData,proto3" json:"SortData,omitempty"` //参与排行的数据 + Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` //不参与排行的数据 + ExData []*ExtendIncData `protobuf:"bytes,4,rep,name=ExData,proto3" json:"ExData,omitempty"` //扩展增量数据 } -func (m *RankData) Reset() { *m = RankData{} } -func (m *RankData) String() string { return proto.CompactTextString(m) } -func (*RankData) ProtoMessage() {} -func (*RankData) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{9} -} -func (m *RankData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RankData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RankData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *RankData) Reset() { + *x = RankData{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *RankData) XXX_Merge(src proto.Message) { - xxx_messageInfo_RankData.Merge(m, src) -} -func (m *RankData) XXX_Size() int { - return m.Size() -} -func (m *RankData) XXX_DiscardUnknown() { - xxx_messageInfo_RankData.DiscardUnknown(m) + +func (x *RankData) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_RankData proto.InternalMessageInfo +func (*RankData) ProtoMessage() {} -func (m *RankData) GetKey() uint64 { - if m != nil { - return m.Key +func (x *RankData) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RankData.ProtoReflect.Descriptor instead. +func (*RankData) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{9} +} + +func (x *RankData) GetKey() uint64 { + if x != nil { + return x.Key } return 0 } -func (m *RankData) GetSortData() []int64 { - if m != nil { - return m.SortData +func (x *RankData) GetSortData() []int64 { + if x != nil { + return x.SortData } return nil } -func (m *RankData) GetData() []byte { - if m != nil { - return m.Data +func (x *RankData) GetData() []byte { + if x != nil { + return x.Data } return nil } -func (m *RankData) GetExData() []*ExtendIncData { - if m != nil { - return m.ExData +func (x *RankData) GetExData() []*ExtendIncData { + if x != nil { + return x.ExData } return nil } // DeleteByKey 删除排行榜数据 type DeleteByKey struct { - RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` - KeyList []uint64 `protobuf:"varint,2,rep,packed,name=KeyList,proto3" json:"KeyList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的分类ID + KeyList []uint64 `protobuf:"varint,2,rep,packed,name=KeyList,proto3" json:"KeyList,omitempty"` //排行数据 } -func (m *DeleteByKey) Reset() { *m = DeleteByKey{} } -func (m *DeleteByKey) String() string { return proto.CompactTextString(m) } -func (*DeleteByKey) ProtoMessage() {} -func (*DeleteByKey) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{10} -} -func (m *DeleteByKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteByKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteByKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *DeleteByKey) Reset() { + *x = DeleteByKey{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *DeleteByKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteByKey.Merge(m, src) -} -func (m *DeleteByKey) XXX_Size() int { - return m.Size() -} -func (m *DeleteByKey) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteByKey.DiscardUnknown(m) + +func (x *DeleteByKey) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_DeleteByKey proto.InternalMessageInfo +func (*DeleteByKey) ProtoMessage() {} -func (m *DeleteByKey) GetRankId() uint64 { - if m != nil { - return m.RankId +func (x *DeleteByKey) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteByKey.ProtoReflect.Descriptor instead. +func (*DeleteByKey) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteByKey) GetRankId() uint64 { + if x != nil { + return x.RankId } return 0 } -func (m *DeleteByKey) GetKeyList() []uint64 { - if m != nil { - return m.KeyList +func (x *DeleteByKey) GetKeyList() []uint64 { + if x != nil { + return x.KeyList } return nil } // AddRankList 新增排行榜 type AddRankList struct { - AddList []*RankList `protobuf:"bytes,1,rep,name=AddList,proto3" json:"AddList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddList []*RankList `protobuf:"bytes,1,rep,name=AddList,proto3" json:"AddList,omitempty"` //添加的排行榜列表 } -func (m *AddRankList) Reset() { *m = AddRankList{} } -func (m *AddRankList) String() string { return proto.CompactTextString(m) } -func (*AddRankList) ProtoMessage() {} -func (*AddRankList) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{11} -} -func (m *AddRankList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddRankList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddRankList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *AddRankList) Reset() { + *x = AddRankList{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *AddRankList) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddRankList.Merge(m, src) -} -func (m *AddRankList) XXX_Size() int { - return m.Size() -} -func (m *AddRankList) XXX_DiscardUnknown() { - xxx_messageInfo_AddRankList.DiscardUnknown(m) + +func (x *AddRankList) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_AddRankList proto.InternalMessageInfo +func (*AddRankList) ProtoMessage() {} -func (m *AddRankList) GetAddList() []*RankList { - if m != nil { - return m.AddList +func (x *AddRankList) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddRankList.ProtoReflect.Descriptor instead. +func (*AddRankList) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{11} +} + +func (x *AddRankList) GetAddList() []*RankList { + if x != nil { + return x.AddList } return nil } // FindRankDataByKey 查找排行信息 type FindRankDataByKey struct { - RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` - Key uint64 `protobuf:"varint,2,opt,name=Key,proto3" json:"Key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的ID + Key uint64 `protobuf:"varint,2,opt,name=Key,proto3" json:"Key,omitempty"` //排行的key } -func (m *FindRankDataByKey) Reset() { *m = FindRankDataByKey{} } -func (m *FindRankDataByKey) String() string { return proto.CompactTextString(m) } -func (*FindRankDataByKey) ProtoMessage() {} -func (*FindRankDataByKey) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{12} -} -func (m *FindRankDataByKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FindRankDataByKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FindRankDataByKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *FindRankDataByKey) Reset() { + *x = FindRankDataByKey{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *FindRankDataByKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_FindRankDataByKey.Merge(m, src) -} -func (m *FindRankDataByKey) XXX_Size() int { - return m.Size() -} -func (m *FindRankDataByKey) XXX_DiscardUnknown() { - xxx_messageInfo_FindRankDataByKey.DiscardUnknown(m) + +func (x *FindRankDataByKey) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_FindRankDataByKey proto.InternalMessageInfo +func (*FindRankDataByKey) ProtoMessage() {} -func (m *FindRankDataByKey) GetRankId() uint64 { - if m != nil { - return m.RankId +func (x *FindRankDataByKey) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FindRankDataByKey.ProtoReflect.Descriptor instead. +func (*FindRankDataByKey) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{12} +} + +func (x *FindRankDataByKey) GetRankId() uint64 { + if x != nil { + return x.RankId } return 0 } -func (m *FindRankDataByKey) GetKey() uint64 { - if m != nil { - return m.Key +func (x *FindRankDataByKey) GetKey() uint64 { + if x != nil { + return x.Key } return 0 } // FindRankDataByRank 查找排行信息 type FindRankDataByRank struct { - RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` - Rank uint64 `protobuf:"varint,2,opt,name=Rank,proto3" json:"Rank,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的ID + Rank uint64 `protobuf:"varint,2,opt,name=Rank,proto3" json:"Rank,omitempty"` //排行名次 } -func (m *FindRankDataByRank) Reset() { *m = FindRankDataByRank{} } -func (m *FindRankDataByRank) String() string { return proto.CompactTextString(m) } -func (*FindRankDataByRank) ProtoMessage() {} -func (*FindRankDataByRank) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{13} -} -func (m *FindRankDataByRank) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FindRankDataByRank) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FindRankDataByRank.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *FindRankDataByRank) Reset() { + *x = FindRankDataByRank{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *FindRankDataByRank) XXX_Merge(src proto.Message) { - xxx_messageInfo_FindRankDataByRank.Merge(m, src) -} -func (m *FindRankDataByRank) XXX_Size() int { - return m.Size() -} -func (m *FindRankDataByRank) XXX_DiscardUnknown() { - xxx_messageInfo_FindRankDataByRank.DiscardUnknown(m) + +func (x *FindRankDataByRank) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_FindRankDataByRank proto.InternalMessageInfo +func (*FindRankDataByRank) ProtoMessage() {} -func (m *FindRankDataByRank) GetRankId() uint64 { - if m != nil { - return m.RankId +func (x *FindRankDataByRank) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FindRankDataByRank.ProtoReflect.Descriptor instead. +func (*FindRankDataByRank) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{13} +} + +func (x *FindRankDataByRank) GetRankId() uint64 { + if x != nil { + return x.RankId } return 0 } -func (m *FindRankDataByRank) GetRank() uint64 { - if m != nil { - return m.Rank +func (x *FindRankDataByRank) GetRank() uint64 { + if x != nil { + return x.Rank } return 0 } // FindRankDataList 查找排行信息 type FindRankDataList struct { - RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` - StartRank uint64 `protobuf:"varint,2,opt,name=StartRank,proto3" json:"StartRank,omitempty"` - Count uint64 `protobuf:"varint,3,opt,name=Count,proto3" json:"Count,omitempty"` - Key uint64 `protobuf:"varint,4,opt,name=Key,proto3" json:"Key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的ID + StartRank uint64 `protobuf:"varint,2,opt,name=StartRank,proto3" json:"StartRank,omitempty"` //排行的位置 0开始 + Count uint64 `protobuf:"varint,3,opt,name=Count,proto3" json:"Count,omitempty"` //查询格式 + Key uint64 `protobuf:"varint,4,opt,name=Key,proto3" json:"Key,omitempty"` //附带一个Key查询排行信息 } -func (m *FindRankDataList) Reset() { *m = FindRankDataList{} } -func (m *FindRankDataList) String() string { return proto.CompactTextString(m) } -func (*FindRankDataList) ProtoMessage() {} -func (*FindRankDataList) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{14} +func (x *FindRankDataList) Reset() { + *x = FindRankDataList{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *FindRankDataList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (x *FindRankDataList) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FindRankDataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FindRankDataList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (*FindRankDataList) ProtoMessage() {} + +func (x *FindRankDataList) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - return b[:n], nil + return ms } -} -func (m *FindRankDataList) XXX_Merge(src proto.Message) { - xxx_messageInfo_FindRankDataList.Merge(m, src) -} -func (m *FindRankDataList) XXX_Size() int { - return m.Size() -} -func (m *FindRankDataList) XXX_DiscardUnknown() { - xxx_messageInfo_FindRankDataList.DiscardUnknown(m) + return mi.MessageOf(x) } -var xxx_messageInfo_FindRankDataList proto.InternalMessageInfo +// Deprecated: Use FindRankDataList.ProtoReflect.Descriptor instead. +func (*FindRankDataList) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{14} +} -func (m *FindRankDataList) GetRankId() uint64 { - if m != nil { - return m.RankId +func (x *FindRankDataList) GetRankId() uint64 { + if x != nil { + return x.RankId } return 0 } -func (m *FindRankDataList) GetStartRank() uint64 { - if m != nil { - return m.StartRank +func (x *FindRankDataList) GetStartRank() uint64 { + if x != nil { + return x.StartRank } return 0 } -func (m *FindRankDataList) GetCount() uint64 { - if m != nil { - return m.Count +func (x *FindRankDataList) GetCount() uint64 { + if x != nil { + return x.Count } return 0 } -func (m *FindRankDataList) GetKey() uint64 { - if m != nil { - return m.Key +func (x *FindRankDataList) GetKey() uint64 { + if x != nil { + return x.Key } return 0 } // RankDataList type RankDataList struct { - RankDataCount uint64 `protobuf:"varint,1,opt,name=RankDataCount,proto3" json:"RankDataCount,omitempty"` - RankPosDataList []*RankPosData `protobuf:"bytes,2,rep,name=RankPosDataList,proto3" json:"RankPosDataList,omitempty"` - KeyRank *RankPosData `protobuf:"bytes,3,opt,name=KeyRank,proto3" json:"KeyRank,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankDataCount uint64 `protobuf:"varint,1,opt,name=RankDataCount,proto3" json:"RankDataCount,omitempty"` //排行长度 + RankPosDataList []*RankPosData `protobuf:"bytes,2,rep,name=RankPosDataList,proto3" json:"RankPosDataList,omitempty"` //排行数据 + KeyRank *RankPosData `protobuf:"bytes,3,opt,name=KeyRank,proto3" json:"KeyRank,omitempty"` //附带的Key查询排行结果信息 } -func (m *RankDataList) Reset() { *m = RankDataList{} } -func (m *RankDataList) String() string { return proto.CompactTextString(m) } -func (*RankDataList) ProtoMessage() {} -func (*RankDataList) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{15} -} -func (m *RankDataList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RankDataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RankDataList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *RankDataList) Reset() { + *x = RankDataList{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *RankDataList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RankDataList.Merge(m, src) -} -func (m *RankDataList) XXX_Size() int { - return m.Size() -} -func (m *RankDataList) XXX_DiscardUnknown() { - xxx_messageInfo_RankDataList.DiscardUnknown(m) + +func (x *RankDataList) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_RankDataList proto.InternalMessageInfo +func (*RankDataList) ProtoMessage() {} -func (m *RankDataList) GetRankDataCount() uint64 { - if m != nil { - return m.RankDataCount +func (x *RankDataList) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RankDataList.ProtoReflect.Descriptor instead. +func (*RankDataList) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{15} +} + +func (x *RankDataList) GetRankDataCount() uint64 { + if x != nil { + return x.RankDataCount } return 0 } -func (m *RankDataList) GetRankPosDataList() []*RankPosData { - if m != nil { - return m.RankPosDataList +func (x *RankDataList) GetRankPosDataList() []*RankPosData { + if x != nil { + return x.RankPosDataList } return nil } -func (m *RankDataList) GetKeyRank() *RankPosData { - if m != nil { - return m.KeyRank +func (x *RankDataList) GetKeyRank() *RankPosData { + if x != nil { + return x.KeyRank } return nil } type RankInfo struct { - Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` - Rank uint64 `protobuf:"varint,2,opt,name=Rank,proto3" json:"Rank,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"` + Rank uint64 `protobuf:"varint,2,opt,name=Rank,proto3" json:"Rank,omitempty"` } -func (m *RankInfo) Reset() { *m = RankInfo{} } -func (m *RankInfo) String() string { return proto.CompactTextString(m) } -func (*RankInfo) ProtoMessage() {} -func (*RankInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{16} -} -func (m *RankInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RankInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RankInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (x *RankInfo) Reset() { + *x = RankInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } } -func (m *RankInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_RankInfo.Merge(m, src) -} -func (m *RankInfo) XXX_Size() int { - return m.Size() -} -func (m *RankInfo) XXX_DiscardUnknown() { - xxx_messageInfo_RankInfo.DiscardUnknown(m) + +func (x *RankInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_RankInfo proto.InternalMessageInfo +func (*RankInfo) ProtoMessage() {} -func (m *RankInfo) GetKey() uint64 { - if m != nil { - return m.Key +func (x *RankInfo) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RankInfo.ProtoReflect.Descriptor instead. +func (*RankInfo) Descriptor() ([]byte, []int) { + return file_test_rpc_rank_proto_rawDescGZIP(), []int{16} +} + +func (x *RankInfo) GetKey() uint64 { + if x != nil { + return x.Key } return 0 } -func (m *RankInfo) GetRank() uint64 { - if m != nil { - return m.Rank +func (x *RankInfo) GetRank() uint64 { + if x != nil { + return x.Rank } return 0 } // RankResult type RankResult struct { - AddCount int32 `protobuf:"varint,1,opt,name=AddCount,proto3" json:"AddCount,omitempty"` - ModifyCount int32 `protobuf:"varint,2,opt,name=ModifyCount,proto3" json:"ModifyCount,omitempty"` - RemoveCount int32 `protobuf:"varint,3,opt,name=RemoveCount,proto3" json:"RemoveCount,omitempty"` - NewRank []*RankInfo `protobuf:"bytes,4,rep,name=NewRank,proto3" json:"NewRank,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddCount int32 `protobuf:"varint,1,opt,name=AddCount,proto3" json:"AddCount,omitempty"` //新增数量 + ModifyCount int32 `protobuf:"varint,2,opt,name=ModifyCount,proto3" json:"ModifyCount,omitempty"` //修改数量 + RemoveCount int32 `protobuf:"varint,3,opt,name=RemoveCount,proto3" json:"RemoveCount,omitempty"` //删除数量 + NewRank []*RankInfo `protobuf:"bytes,4,rep,name=NewRank,proto3" json:"NewRank,omitempty"` //新的排名名次,只有UpsetRankData.FindNewRank为true时才生效 } -func (m *RankResult) Reset() { *m = RankResult{} } -func (m *RankResult) String() string { return proto.CompactTextString(m) } -func (*RankResult) ProtoMessage() {} +func (x *RankResult) Reset() { + *x = RankResult{} + if protoimpl.UnsafeEnabled { + mi := &file_test_rpc_rank_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RankResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RankResult) ProtoMessage() {} + +func (x *RankResult) ProtoReflect() protoreflect.Message { + mi := &file_test_rpc_rank_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RankResult.ProtoReflect.Descriptor instead. func (*RankResult) Descriptor() ([]byte, []int) { - return fileDescriptor_d5b64eda47521620, []int{17} -} -func (m *RankResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RankResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RankResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RankResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_RankResult.Merge(m, src) -} -func (m *RankResult) XXX_Size() int { - return m.Size() -} -func (m *RankResult) XXX_DiscardUnknown() { - xxx_messageInfo_RankResult.DiscardUnknown(m) + return file_test_rpc_rank_proto_rawDescGZIP(), []int{17} } -var xxx_messageInfo_RankResult proto.InternalMessageInfo - -func (m *RankResult) GetAddCount() int32 { - if m != nil { - return m.AddCount +func (x *RankResult) GetAddCount() int32 { + if x != nil { + return x.AddCount } return 0 } -func (m *RankResult) GetModifyCount() int32 { - if m != nil { - return m.ModifyCount +func (x *RankResult) GetModifyCount() int32 { + if x != nil { + return x.ModifyCount } return 0 } -func (m *RankResult) GetRemoveCount() int32 { - if m != nil { - return m.RemoveCount +func (x *RankResult) GetRemoveCount() int32 { + if x != nil { + return x.RemoveCount } return 0 } -func (m *RankResult) GetNewRank() []*RankInfo { - if m != nil { - return m.NewRank +func (x *RankResult) GetNewRank() []*RankInfo { + if x != nil { + return x.NewRank } return nil } -func init() { - proto.RegisterType((*SetSortAndExtendData)(nil), "rpc.SetSortAndExtendData") - proto.RegisterType((*IncreaseRankData)(nil), "rpc.IncreaseRankData") - proto.RegisterType((*IncreaseRankDataRet)(nil), "rpc.IncreaseRankDataRet") - proto.RegisterType((*UpdateRankData)(nil), "rpc.UpdateRankData") - proto.RegisterType((*UpdateRankDataRet)(nil), "rpc.UpdateRankDataRet") - proto.RegisterType((*RankPosData)(nil), "rpc.RankPosData") - proto.RegisterType((*RankList)(nil), "rpc.RankList") - proto.RegisterType((*UpsetRankData)(nil), "rpc.UpsetRankData") - proto.RegisterType((*ExtendIncData)(nil), "rpc.ExtendIncData") - proto.RegisterType((*RankData)(nil), "rpc.RankData") - proto.RegisterType((*DeleteByKey)(nil), "rpc.DeleteByKey") - proto.RegisterType((*AddRankList)(nil), "rpc.AddRankList") - proto.RegisterType((*FindRankDataByKey)(nil), "rpc.FindRankDataByKey") - proto.RegisterType((*FindRankDataByRank)(nil), "rpc.FindRankDataByRank") - proto.RegisterType((*FindRankDataList)(nil), "rpc.FindRankDataList") - proto.RegisterType((*RankDataList)(nil), "rpc.RankDataList") - proto.RegisterType((*RankInfo)(nil), "rpc.RankInfo") - proto.RegisterType((*RankResult)(nil), "rpc.RankResult") -} - -func init() { proto.RegisterFile("proto/rpcproto/rank.proto", fileDescriptor_d5b64eda47521620) } - -var fileDescriptor_d5b64eda47521620 = []byte{ - // 812 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x6a, 0xdb, 0x58, - 0x10, 0x46, 0x96, 0xe4, 0x9f, 0xb1, 0x9d, 0x75, 0x4e, 0xc2, 0xae, 0x12, 0x82, 0x31, 0x87, 0xfd, - 0x31, 0xb9, 0xf0, 0xee, 0x66, 0x61, 0x59, 0x76, 0x59, 0x76, 0x9d, 0x26, 0x05, 0x91, 0xd8, 0x0d, - 0xc7, 0xa4, 0x17, 0xa5, 0x37, 0xaa, 0x75, 0x02, 0x26, 0x8e, 0x24, 0xa4, 0xe3, 0xd4, 0x86, 0xde, - 0x95, 0x3e, 0x42, 0xef, 0xfa, 0x10, 0x7d, 0x8c, 0x5e, 0xf6, 0x11, 0x4a, 0x9e, 0xa4, 0xcc, 0xe8, - 0xc7, 0x92, 0x63, 0xa7, 0xa5, 0x77, 0x33, 0x9f, 0xe6, 0xcc, 0xf9, 0x66, 0xe6, 0x3b, 0x63, 0xc3, - 0x5e, 0x10, 0xfa, 0xca, 0xff, 0x35, 0x0c, 0xc6, 0x89, 0xe1, 0x78, 0xd7, 0x3d, 0x32, 0x99, 0x1e, - 0x06, 0x63, 0xfe, 0x1c, 0x76, 0x47, 0x52, 0x8d, 0xfc, 0x50, 0xf5, 0x3d, 0xf7, 0x74, 0xae, 0xa4, - 0xe7, 0x9e, 0x38, 0xca, 0x61, 0x6d, 0x00, 0x3b, 0x42, 0x18, 0x3d, 0x4b, 0xeb, 0x68, 0xdd, 0xaa, - 0xc8, 0x21, 0xac, 0x05, 0xfa, 0x85, 0x1f, 0x59, 0xa5, 0x8e, 0xd6, 0x35, 0x05, 0x9a, 0x8c, 0x81, - 0x41, 0xb1, 0x7a, 0x47, 0xeb, 0xea, 0x82, 0x6c, 0xfe, 0x46, 0x87, 0x96, 0xed, 0x8d, 0x43, 0xe9, - 0x44, 0x52, 0x38, 0xde, 0x35, 0x1d, 0xfd, 0x1e, 0xca, 0x68, 0xdb, 0x2e, 0xa5, 0x35, 0x44, 0xe2, - 0x61, 0xca, 0x33, 0xb9, 0xa0, 0x94, 0x86, 0x40, 0x93, 0x1d, 0x42, 0x39, 0xa6, 0x64, 0xe9, 0x1d, - 0xbd, 0x5b, 0x3f, 0x62, 0xbd, 0x30, 0x18, 0xf7, 0x62, 0xc8, 0xf6, 0xc6, 0x98, 0x4d, 0x24, 0x11, - 0xec, 0x70, 0x79, 0x53, 0x46, 0xdb, 0xe8, 0xe8, 0x5d, 0x5d, 0xdc, 0xc3, 0xd9, 0x60, 0x7d, 0xd1, - 0x96, 0x49, 0xb7, 0xec, 0xd1, 0x2d, 0xeb, 0x02, 0xc4, 0xfa, 0x5e, 0xfd, 0x0c, 0x5b, 0x42, 0xaa, - 0x59, 0xe8, 0xa5, 0x25, 0x5a, 0x65, 0xea, 0xd7, 0x0a, 0xca, 0xfe, 0x82, 0x1f, 0x6c, 0x2f, 0x92, - 0x31, 0x89, 0x27, 0xde, 0xd0, 0xf7, 0x4e, 0xe7, 0x93, 0x48, 0x49, 0x4f, 0x59, 0x15, 0x3a, 0xb0, - 0xe9, 0x33, 0xdb, 0x87, 0xaa, 0xed, 0x4d, 0xe2, 0xa2, 0xaa, 0x1d, 0xad, 0xdb, 0x10, 0x99, 0xcf, - 0x38, 0x34, 0xd0, 0xce, 0x8a, 0xae, 0x51, 0xd1, 0x05, 0x8c, 0xf7, 0x61, 0x67, 0x75, 0x0c, 0x42, - 0x2a, 0x76, 0x08, 0x95, 0x0b, 0x3f, 0xca, 0x26, 0x5c, 0x3f, 0x6a, 0x51, 0xe9, 0x18, 0x92, 0xe0, - 0x22, 0x0d, 0xe0, 0x43, 0xd8, 0xba, 0x0c, 0x5c, 0x47, 0x7d, 0xcb, 0x1c, 0xf3, 0xd2, 0x68, 0x24, - 0xd2, 0xf8, 0x09, 0xb6, 0x8b, 0xf9, 0x90, 0x50, 0x0b, 0x74, 0x21, 0x55, 0x22, 0x37, 0x34, 0xf9, - 0x6b, 0x0d, 0xea, 0x39, 0x3e, 0x69, 0x72, 0xad, 0x90, 0x1c, 0x03, 0x92, 0xfb, 0xc8, 0xc6, 0x7e, - 0x65, 0xfd, 0xd0, 0xa9, 0x1f, 0x99, 0x9f, 0x91, 0x31, 0x96, 0x64, 0x50, 0xed, 0x2b, 0x32, 0xd0, - 0x45, 0x0e, 0xe1, 0xef, 0x35, 0xa8, 0x62, 0xe2, 0xf3, 0x49, 0xa4, 0x36, 0xd6, 0xbd, 0x1f, 0xc7, - 0x0c, 0x9d, 0x1b, 0x49, 0x64, 0x6a, 0x22, 0xf3, 0xd9, 0x8f, 0xd0, 0x1c, 0x5d, 0x4f, 0x02, 0x3c, - 0x7f, 0x2e, 0x6f, 0xe5, 0x94, 0x5a, 0x61, 0x8a, 0x22, 0xc8, 0x76, 0xc1, 0xb4, 0xa3, 0x13, 0x39, - 0x26, 0x6e, 0x55, 0x11, 0x3b, 0xcc, 0x82, 0xca, 0xc0, 0x99, 0x53, 0x8d, 0x26, 0x5d, 0x98, 0xba, - 0x78, 0xe3, 0xe9, 0x3c, 0x98, 0x84, 0x72, 0x10, 0x91, 0xe4, 0x74, 0x91, 0xf9, 0xfc, 0x15, 0x34, - 0x2f, 0x83, 0x48, 0xaa, 0x2f, 0x8e, 0xeb, 0x77, 0x68, 0xa4, 0x31, 0xc8, 0xc4, 0x2a, 0xd1, 0x23, - 0x68, 0x66, 0x4a, 0xa0, 0xd9, 0x14, 0x42, 0x58, 0x07, 0xea, 0x8f, 0x27, 0x9e, 0x3b, 0x94, 0x2f, - 0x89, 0x95, 0x4e, 0x6c, 0xf3, 0x10, 0x1f, 0x41, 0xb3, 0xf0, 0x4c, 0xd9, 0x01, 0xd4, 0x50, 0x91, - 0x4f, 0x9d, 0xe9, 0x4c, 0x12, 0x01, 0x5d, 0x2c, 0x01, 0x6c, 0x4f, 0xaa, 0xcf, 0x38, 0xa2, 0x44, - 0x11, 0x45, 0x90, 0xcf, 0xe3, 0x06, 0x6f, 0xd0, 0x41, 0x7e, 0xe6, 0xa5, 0x0d, 0x33, 0xcf, 0x09, - 0x30, 0x5e, 0x2e, 0xd9, 0x9a, 0xd8, 0xb8, 0x5c, 0x68, 0xfe, 0xff, 0x41, 0xfd, 0x44, 0x4e, 0xa5, - 0x92, 0xc7, 0x0b, 0xbc, 0x6a, 0x53, 0x2b, 0x2d, 0xa8, 0x9c, 0xc9, 0x45, 0xd6, 0x45, 0x43, 0xa4, - 0x2e, 0xff, 0x13, 0xea, 0x7d, 0xd7, 0xcd, 0x24, 0xf4, 0x0b, 0x54, 0xfa, 0xae, 0x4b, 0x81, 0xda, - 0x4a, 0xbb, 0x11, 0x14, 0xe9, 0x57, 0xfe, 0x2f, 0x6c, 0x63, 0x5b, 0xd3, 0xb2, 0x1f, 0xbe, 0xfe, - 0xde, 0xc3, 0xe3, 0xff, 0x03, 0x2b, 0x1e, 0x27, 0xd9, 0x6c, 0x3a, 0xbf, 0xe6, 0x25, 0xf1, 0x00, - 0x5a, 0xf9, 0x0c, 0x0f, 0x3e, 0x80, 0x03, 0xa8, 0x8d, 0x94, 0x13, 0xaa, 0x5c, 0x92, 0x25, 0x80, - 0xe2, 0x7e, 0xe4, 0xcf, 0x3c, 0x45, 0x43, 0x30, 0x44, 0xec, 0xa4, 0x9c, 0x8d, 0x25, 0xe7, 0x77, - 0x5a, 0x51, 0x90, 0x28, 0x8e, 0xd4, 0x8f, 0x13, 0xc4, 0xb7, 0x16, 0x41, 0xf6, 0x37, 0x7c, 0x97, - 0xdb, 0x13, 0x39, 0x25, 0xdf, 0xdf, 0x69, 0xab, 0x81, 0xb8, 0x07, 0xcf, 0xe4, 0x22, 0xd3, 0xf2, - 0xda, 0x3d, 0x98, 0x04, 0xf0, 0xdf, 0x62, 0x11, 0xda, 0xde, 0x95, 0xff, 0x75, 0xcb, 0x88, 0xbf, - 0xd5, 0x00, 0xd0, 0x10, 0x32, 0x9a, 0x4d, 0x69, 0x97, 0xf7, 0x5d, 0x77, 0x59, 0x89, 0x29, 0x32, - 0x1f, 0x1f, 0xd6, 0xc0, 0x77, 0x27, 0x57, 0x8b, 0xf8, 0x73, 0xfc, 0xeb, 0x9a, 0x87, 0x30, 0x42, - 0xc8, 0x1b, 0xff, 0x56, 0x2e, 0x7b, 0x69, 0x8a, 0x3c, 0x84, 0xda, 0x4a, 0x1f, 0xa6, 0xb1, 0xa2, - 0x2d, 0x24, 0x2d, 0xd2, 0xaf, 0xc7, 0x3b, 0x1f, 0xee, 0xda, 0xda, 0xc7, 0xbb, 0xb6, 0xf6, 0xe9, - 0xae, 0xad, 0x3d, 0x33, 0x7b, 0xff, 0x84, 0xc1, 0xf8, 0x45, 0x99, 0xfe, 0x1b, 0xfc, 0xf1, 0x39, - 0x00, 0x00, 0xff, 0xff, 0xae, 0x8b, 0x04, 0x8f, 0x38, 0x08, 0x00, 0x00, -} - -func (m *SetSortAndExtendData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SetSortAndExtendData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SetSortAndExtendData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Data != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Data)) - i-- - dAtA[i] = 0x18 - } - if m.Pos != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Pos)) - i-- - dAtA[i] = 0x10 - } - if m.IsSortData { - i-- - if m.IsSortData { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *IncreaseRankData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IncreaseRankData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IncreaseRankData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.InitSortData) > 0 { - dAtA2 := make([]byte, len(m.InitSortData)*10) - var j1 int - for _, num1 := range m.InitSortData { - num := uint64(num1) - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintRank(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x4a - } - if len(m.InitData) > 0 { - i -= len(m.InitData) - copy(dAtA[i:], m.InitData) - i = encodeVarintRank(dAtA, i, uint64(len(m.InitData))) - i-- - dAtA[i] = 0x42 - } - if m.InsertDataOnNonExistent { - i-- - if m.InsertDataOnNonExistent { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.ReturnRankData { - i-- - if m.ReturnRankData { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if len(m.SetSortAndExtendData) > 0 { - for iNdEx := len(m.SetSortAndExtendData) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SetSortAndExtendData[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRank(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.IncreaseSortData) > 0 { - dAtA4 := make([]byte, len(m.IncreaseSortData)*10) - var j3 int - for _, num1 := range m.IncreaseSortData { - num := uint64(num1) - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ - } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintRank(dAtA, i, uint64(j3)) - i-- - dAtA[i] = 0x22 - } - if len(m.Extend) > 0 { - for iNdEx := len(m.Extend) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Extend[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRank(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Key != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Key)) - i-- - dAtA[i] = 0x10 - } - if m.RankId != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RankId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *IncreaseRankDataRet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IncreaseRankDataRet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IncreaseRankDataRet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.PosData != nil { - { - size, err := m.PosData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRank(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UpdateRankData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpdateRankData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateRankData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintRank(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - if m.Key != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Key)) - i-- - dAtA[i] = 0x10 - } - if m.RankId != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RankId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *UpdateRankDataRet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpdateRankDataRet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateRankDataRet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Ret { - i-- - if m.Ret { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RankPosData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RankPosData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RankPosData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ExtendData) > 0 { - dAtA7 := make([]byte, len(m.ExtendData)*10) - var j6 int - for _, num1 := range m.ExtendData { - num := uint64(num1) - for num >= 1<<7 { - dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j6++ - } - dAtA7[j6] = uint8(num) - j6++ - } - i -= j6 - copy(dAtA[i:], dAtA7[:j6]) - i = encodeVarintRank(dAtA, i, uint64(j6)) - i-- - dAtA[i] = 0x2a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintRank(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x22 - } - if len(m.SortData) > 0 { - dAtA9 := make([]byte, len(m.SortData)*10) - var j8 int - for _, num1 := range m.SortData { - num := uint64(num1) - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintRank(dAtA, i, uint64(j8)) - i-- - dAtA[i] = 0x1a - } - if m.Rank != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Rank)) - i-- - dAtA[i] = 0x10 - } - if m.Key != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Key)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RankList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RankList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RankList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ExpireMs != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.ExpireMs)) - i-- - dAtA[i] = 0x30 - } - if m.MaxRank != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.MaxRank)) - i-- - dAtA[i] = 0x28 - } - if m.IsDec { - i-- - if m.IsDec { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.SkipListLevel != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.SkipListLevel)) - i-- - dAtA[i] = 0x18 - } - if len(m.RankName) > 0 { - i -= len(m.RankName) - copy(dAtA[i:], m.RankName) - i = encodeVarintRank(dAtA, i, uint64(len(m.RankName))) - i-- - dAtA[i] = 0x12 - } - if m.RankId != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RankId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *UpsetRankData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpsetRankData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpsetRankData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.FindNewRank { - i-- - if m.FindNewRank { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.RankDataList) > 0 { - for iNdEx := len(m.RankDataList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RankDataList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRank(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.RankId != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RankId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ExtendIncData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExtendIncData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExtendIncData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.IncreaseValue != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.IncreaseValue)) - i-- - dAtA[i] = 0x10 - } - if m.InitValue != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.InitValue)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RankData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RankData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RankData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ExData) > 0 { - for iNdEx := len(m.ExData) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ExData[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRank(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintRank(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - if len(m.SortData) > 0 { - dAtA11 := make([]byte, len(m.SortData)*10) - var j10 int - for _, num1 := range m.SortData { - num := uint64(num1) - for num >= 1<<7 { - dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j10++ - } - dAtA11[j10] = uint8(num) - j10++ - } - i -= j10 - copy(dAtA[i:], dAtA11[:j10]) - i = encodeVarintRank(dAtA, i, uint64(j10)) - i-- - dAtA[i] = 0x12 - } - if m.Key != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Key)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *DeleteByKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeleteByKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteByKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.KeyList) > 0 { - dAtA13 := make([]byte, len(m.KeyList)*10) - var j12 int - for _, num := range m.KeyList { - for num >= 1<<7 { - dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j12++ - } - dAtA13[j12] = uint8(num) - j12++ - } - i -= j12 - copy(dAtA[i:], dAtA13[:j12]) - i = encodeVarintRank(dAtA, i, uint64(j12)) - i-- - dAtA[i] = 0x12 - } - if m.RankId != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RankId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AddRankList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AddRankList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddRankList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.AddList) > 0 { - for iNdEx := len(m.AddList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AddList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRank(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *FindRankDataByKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FindRankDataByKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FindRankDataByKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Key != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Key)) - i-- - dAtA[i] = 0x10 - } - if m.RankId != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RankId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *FindRankDataByRank) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FindRankDataByRank) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FindRankDataByRank) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Rank != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Rank)) - i-- - dAtA[i] = 0x10 - } - if m.RankId != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RankId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *FindRankDataList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FindRankDataList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FindRankDataList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Key != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Key)) - i-- - dAtA[i] = 0x20 - } - if m.Count != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x18 - } - if m.StartRank != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.StartRank)) - i-- - dAtA[i] = 0x10 - } - if m.RankId != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RankId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RankDataList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RankDataList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RankDataList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.KeyRank != nil { - { - size, err := m.KeyRank.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRank(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.RankPosDataList) > 0 { - for iNdEx := len(m.RankPosDataList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RankPosDataList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRank(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.RankDataCount != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RankDataCount)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RankInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RankInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RankInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Rank != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Rank)) - i-- - dAtA[i] = 0x10 - } - if m.Key != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.Key)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RankResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RankResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RankResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.NewRank) > 0 { - for iNdEx := len(m.NewRank) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.NewRank[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRank(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.RemoveCount != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.RemoveCount)) - i-- - dAtA[i] = 0x18 - } - if m.ModifyCount != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.ModifyCount)) - i-- - dAtA[i] = 0x10 - } - if m.AddCount != 0 { - i = encodeVarintRank(dAtA, i, uint64(m.AddCount)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintRank(dAtA []byte, offset int, v uint64) int { - offset -= sovRank(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SetSortAndExtendData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IsSortData { - n += 2 - } - if m.Pos != 0 { - n += 1 + sovRank(uint64(m.Pos)) - } - if m.Data != 0 { - n += 1 + sovRank(uint64(m.Data)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *IncreaseRankData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RankId != 0 { - n += 1 + sovRank(uint64(m.RankId)) - } - if m.Key != 0 { - n += 1 + sovRank(uint64(m.Key)) - } - if len(m.Extend) > 0 { - for _, e := range m.Extend { - l = e.Size() - n += 1 + l + sovRank(uint64(l)) - } - } - if len(m.IncreaseSortData) > 0 { - l = 0 - for _, e := range m.IncreaseSortData { - l += sovRank(uint64(e)) - } - n += 1 + sovRank(uint64(l)) + l - } - if len(m.SetSortAndExtendData) > 0 { - for _, e := range m.SetSortAndExtendData { - l = e.Size() - n += 1 + l + sovRank(uint64(l)) - } - } - if m.ReturnRankData { - n += 2 - } - if m.InsertDataOnNonExistent { - n += 2 - } - l = len(m.InitData) - if l > 0 { - n += 1 + l + sovRank(uint64(l)) - } - if len(m.InitSortData) > 0 { - l = 0 - for _, e := range m.InitSortData { - l += sovRank(uint64(e)) - } - n += 1 + sovRank(uint64(l)) + l - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *IncreaseRankDataRet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PosData != nil { - l = m.PosData.Size() - n += 1 + l + sovRank(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpdateRankData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RankId != 0 { - n += 1 + sovRank(uint64(m.RankId)) - } - if m.Key != 0 { - n += 1 + sovRank(uint64(m.Key)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovRank(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpdateRankDataRet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ret { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RankPosData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Key != 0 { - n += 1 + sovRank(uint64(m.Key)) - } - if m.Rank != 0 { - n += 1 + sovRank(uint64(m.Rank)) - } - if len(m.SortData) > 0 { - l = 0 - for _, e := range m.SortData { - l += sovRank(uint64(e)) - } - n += 1 + sovRank(uint64(l)) + l - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovRank(uint64(l)) - } - if len(m.ExtendData) > 0 { - l = 0 - for _, e := range m.ExtendData { - l += sovRank(uint64(e)) - } - n += 1 + sovRank(uint64(l)) + l - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RankList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RankId != 0 { - n += 1 + sovRank(uint64(m.RankId)) - } - l = len(m.RankName) - if l > 0 { - n += 1 + l + sovRank(uint64(l)) - } - if m.SkipListLevel != 0 { - n += 1 + sovRank(uint64(m.SkipListLevel)) - } - if m.IsDec { - n += 2 - } - if m.MaxRank != 0 { - n += 1 + sovRank(uint64(m.MaxRank)) - } - if m.ExpireMs != 0 { - n += 1 + sovRank(uint64(m.ExpireMs)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpsetRankData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RankId != 0 { - n += 1 + sovRank(uint64(m.RankId)) - } - if len(m.RankDataList) > 0 { - for _, e := range m.RankDataList { - l = e.Size() - n += 1 + l + sovRank(uint64(l)) - } - } - if m.FindNewRank { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ExtendIncData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InitValue != 0 { - n += 1 + sovRank(uint64(m.InitValue)) - } - if m.IncreaseValue != 0 { - n += 1 + sovRank(uint64(m.IncreaseValue)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RankData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Key != 0 { - n += 1 + sovRank(uint64(m.Key)) - } - if len(m.SortData) > 0 { - l = 0 - for _, e := range m.SortData { - l += sovRank(uint64(e)) - } - n += 1 + sovRank(uint64(l)) + l - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovRank(uint64(l)) - } - if len(m.ExData) > 0 { - for _, e := range m.ExData { - l = e.Size() - n += 1 + l + sovRank(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DeleteByKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RankId != 0 { - n += 1 + sovRank(uint64(m.RankId)) - } - if len(m.KeyList) > 0 { - l = 0 - for _, e := range m.KeyList { - l += sovRank(uint64(e)) - } - n += 1 + sovRank(uint64(l)) + l - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AddRankList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AddList) > 0 { - for _, e := range m.AddList { - l = e.Size() - n += 1 + l + sovRank(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FindRankDataByKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RankId != 0 { - n += 1 + sovRank(uint64(m.RankId)) - } - if m.Key != 0 { - n += 1 + sovRank(uint64(m.Key)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FindRankDataByRank) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RankId != 0 { - n += 1 + sovRank(uint64(m.RankId)) - } - if m.Rank != 0 { - n += 1 + sovRank(uint64(m.Rank)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FindRankDataList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RankId != 0 { - n += 1 + sovRank(uint64(m.RankId)) - } - if m.StartRank != 0 { - n += 1 + sovRank(uint64(m.StartRank)) - } - if m.Count != 0 { - n += 1 + sovRank(uint64(m.Count)) - } - if m.Key != 0 { - n += 1 + sovRank(uint64(m.Key)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RankDataList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RankDataCount != 0 { - n += 1 + sovRank(uint64(m.RankDataCount)) - } - if len(m.RankPosDataList) > 0 { - for _, e := range m.RankPosDataList { - l = e.Size() - n += 1 + l + sovRank(uint64(l)) - } - } - if m.KeyRank != nil { - l = m.KeyRank.Size() - n += 1 + l + sovRank(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RankInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Key != 0 { - n += 1 + sovRank(uint64(m.Key)) - } - if m.Rank != 0 { - n += 1 + sovRank(uint64(m.Rank)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RankResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AddCount != 0 { - n += 1 + sovRank(uint64(m.AddCount)) - } - if m.ModifyCount != 0 { - n += 1 + sovRank(uint64(m.ModifyCount)) - } - if m.RemoveCount != 0 { - n += 1 + sovRank(uint64(m.RemoveCount)) - } - if len(m.NewRank) > 0 { - for _, e := range m.NewRank { - l = e.Size() - n += 1 + l + sovRank(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRank(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRank(x uint64) (n int) { - return sovRank(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SetSortAndExtendData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SetSortAndExtendData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SetSortAndExtendData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSortData", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSortData = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Pos", wireType) - } - m.Pos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Pos |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - m.Data = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Data |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IncreaseRankData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IncreaseRankData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IncreaseRankData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RankId", wireType) - } - m.RankId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RankId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Key |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Extend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Extend = append(m.Extend, &ExtendIncData{}) - if err := m.Extend[len(m.Extend)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncreaseSortData = append(m.IncreaseSortData, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.IncreaseSortData) == 0 { - m.IncreaseSortData = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncreaseSortData = append(m.IncreaseSortData, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field IncreaseSortData", wireType) - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SetSortAndExtendData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SetSortAndExtendData = append(m.SetSortAndExtendData, &SetSortAndExtendData{}) - if err := m.SetSortAndExtendData[len(m.SetSortAndExtendData)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReturnRankData", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ReturnRankData = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InsertDataOnNonExistent", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InsertDataOnNonExistent = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InitData = append(m.InitData[:0], dAtA[iNdEx:postIndex]...) - if m.InitData == nil { - m.InitData = []byte{} - } - iNdEx = postIndex - case 9: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InitSortData = append(m.InitSortData, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.InitSortData) == 0 { - m.InitSortData = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InitSortData = append(m.InitSortData, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field InitSortData", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IncreaseRankDataRet) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IncreaseRankDataRet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IncreaseRankDataRet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PosData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PosData == nil { - m.PosData = &RankPosData{} - } - if err := m.PosData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdateRankData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdateRankData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateRankData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RankId", wireType) - } - m.RankId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RankId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Key |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdateRankDataRet) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdateRankDataRet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateRankDataRet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ret", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ret = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RankPosData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RankPosData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RankPosData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Key |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Rank", wireType) - } - m.Rank = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Rank |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SortData = append(m.SortData, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.SortData) == 0 { - m.SortData = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SortData = append(m.SortData, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field SortData", wireType) - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 5: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExtendData = append(m.ExtendData, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.ExtendData) == 0 { - m.ExtendData = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExtendData = append(m.ExtendData, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendData", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RankList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RankList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RankList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RankId", wireType) - } - m.RankId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RankId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RankName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RankName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SkipListLevel", wireType) - } - m.SkipListLevel = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SkipListLevel |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsDec", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsDec = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRank", wireType) - } - m.MaxRank = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxRank |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpireMs", wireType) - } - m.ExpireMs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpireMs |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpsetRankData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpsetRankData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpsetRankData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RankId", wireType) - } - m.RankId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RankId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RankDataList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RankDataList = append(m.RankDataList, &RankData{}) - if err := m.RankDataList[len(m.RankDataList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FindNewRank", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FindNewRank = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExtendIncData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExtendIncData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtendIncData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InitValue", wireType) - } - m.InitValue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InitValue |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncreaseValue", wireType) - } - m.IncreaseValue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IncreaseValue |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RankData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RankData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RankData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Key |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SortData = append(m.SortData, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.SortData) == 0 { - m.SortData = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SortData = append(m.SortData, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field SortData", wireType) - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExData = append(m.ExData, &ExtendIncData{}) - if err := m.ExData[len(m.ExData)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteByKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteByKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteByKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RankId", wireType) - } - m.RankId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RankId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.KeyList = append(m.KeyList, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.KeyList) == 0 { - m.KeyList = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.KeyList = append(m.KeyList, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field KeyList", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddRankList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AddRankList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddRankList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AddList = append(m.AddList, &RankList{}) - if err := m.AddList[len(m.AddList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FindRankDataByKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FindRankDataByKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FindRankDataByKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RankId", wireType) - } - m.RankId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RankId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Key |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FindRankDataByRank) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FindRankDataByRank: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FindRankDataByRank: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RankId", wireType) - } - m.RankId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RankId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Rank", wireType) - } - m.Rank = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Rank |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FindRankDataList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FindRankDataList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FindRankDataList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RankId", wireType) - } - m.RankId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RankId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartRank", wireType) - } - m.StartRank = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartRank |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Key |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RankDataList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RankDataList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RankDataList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RankDataCount", wireType) - } - m.RankDataCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RankDataCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RankPosDataList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RankPosDataList = append(m.RankPosDataList, &RankPosData{}) - if err := m.RankPosDataList[len(m.RankPosDataList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyRank", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.KeyRank == nil { - m.KeyRank = &RankPosData{} - } - if err := m.KeyRank.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RankInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RankInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RankInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - m.Key = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Key |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Rank", wireType) - } - m.Rank = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Rank |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RankResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RankResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RankResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AddCount", wireType) - } - m.AddCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AddCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ModifyCount", wireType) - } - m.ModifyCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ModifyCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RemoveCount", wireType) - } - m.RemoveCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RemoveCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewRank", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRank - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRank - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRank - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NewRank = append(m.NewRank, &RankInfo{}) - if err := m.NewRank[len(m.NewRank)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRank(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRank - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRank(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRank - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRank - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRank - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthRank - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupRank - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthRank - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF +var File_test_rpc_rank_proto protoreflect.FileDescriptor + +var file_test_rpc_rank_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x61, 0x6e, 0x6b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x72, 0x70, 0x63, 0x22, 0x5c, 0x0a, 0x14, 0x53, 0x65, + 0x74, 0x53, 0x6f, 0x72, 0x74, 0x41, 0x6e, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x49, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x50, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x85, 0x03, 0x0a, 0x10, 0x49, 0x6e, 0x63, + 0x72, 0x65, 0x61, 0x73, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, + 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x52, + 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x06, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x53, + 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x10, 0x49, + 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x4d, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x41, 0x6e, 0x64, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x41, 0x6e, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x14, 0x53, 0x65, 0x74, 0x53, 0x6f, 0x72, + 0x74, 0x41, 0x6e, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, + 0x0a, 0x0e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x61, + 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x17, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x6e, 0x4e, 0x6f, 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x4f, 0x6e, 0x4e, 0x6f, 0x6e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x6e, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x49, 0x6e, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0c, + 0x49, 0x6e, 0x69, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x03, 0x52, 0x0c, 0x49, 0x6e, 0x69, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x22, 0x41, 0x0a, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x52, 0x61, 0x6e, 0x6b, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x50, 0x6f, 0x73, 0x44, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, + 0x61, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x50, 0x6f, 0x73, 0x44, + 0x61, 0x74, 0x61, 0x22, 0x4e, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, + 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, + 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, + 0x61, 0x74, 0x61, 0x22, 0x25, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, + 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x52, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x52, 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x0b, 0x52, + 0x61, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, + 0x52, 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x52, 0x61, 0x6e, 0x6b, + 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x03, 0x52, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, + 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x1e, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x22, 0xb0, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x52, + 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x6b, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x53, 0x6b, 0x69, 0x70, 0x4c, 0x69, + 0x73, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x73, 0x44, 0x65, 0x63, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x49, 0x73, 0x44, 0x65, 0x63, 0x12, 0x18, 0x0a, + 0x07, 0x4d, 0x61, 0x78, 0x52, 0x61, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, + 0x4d, 0x61, 0x78, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x4d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x4d, 0x73, 0x22, 0x7c, 0x0a, 0x0d, 0x55, 0x70, 0x73, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x6b, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x0c, + 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x0c, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x20, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x65, 0x77, 0x52, 0x61, 0x6e, 0x6b, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x65, 0x77, 0x52, 0x61, 0x6e, + 0x6b, 0x22, 0x53, 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x63, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x24, 0x0a, 0x0d, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x78, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x03, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x06, 0x45, 0x78, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x49, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x45, 0x78, 0x44, 0x61, 0x74, 0x61, + 0x22, 0x3f, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, + 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x4c, 0x69, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x4b, 0x65, 0x79, 0x4c, 0x69, 0x73, + 0x74, 0x22, 0x36, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x27, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x07, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x11, 0x46, 0x69, 0x6e, + 0x64, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x16, + 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, + 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x22, 0x40, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, + 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x16, + 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, + 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x22, 0x70, 0x0a, 0x10, 0x46, 0x69, + 0x6e, 0x64, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, + 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, + 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x22, 0x9c, 0x01, 0x0a, + 0x0c, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, + 0x0d, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0f, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x44, 0x61, + 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, + 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x2a, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x6f, 0x73, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x07, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x22, 0x30, 0x0a, 0x08, 0x52, + 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x61, 0x6e, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x22, 0x95, 0x01, + 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x41, 0x64, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x41, 0x64, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x69, + 0x66, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x4d, + 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x07, + 0x4e, 0x65, 0x77, 0x52, 0x61, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x4e, 0x65, + 0x77, 0x52, 0x61, 0x6e, 0x6b, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - ErrInvalidLengthRank = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRank = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupRank = fmt.Errorf("proto: unexpected end of group") + file_test_rpc_rank_proto_rawDescOnce sync.Once + file_test_rpc_rank_proto_rawDescData = file_test_rpc_rank_proto_rawDesc ) + +func file_test_rpc_rank_proto_rawDescGZIP() []byte { + file_test_rpc_rank_proto_rawDescOnce.Do(func() { + file_test_rpc_rank_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_rpc_rank_proto_rawDescData) + }) + return file_test_rpc_rank_proto_rawDescData +} + +var file_test_rpc_rank_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_test_rpc_rank_proto_goTypes = []interface{}{ + (*SetSortAndExtendData)(nil), // 0: rpc.SetSortAndExtendData + (*IncreaseRankData)(nil), // 1: rpc.IncreaseRankData + (*IncreaseRankDataRet)(nil), // 2: rpc.IncreaseRankDataRet + (*UpdateRankData)(nil), // 3: rpc.UpdateRankData + (*UpdateRankDataRet)(nil), // 4: rpc.UpdateRankDataRet + (*RankPosData)(nil), // 5: rpc.RankPosData + (*RankList)(nil), // 6: rpc.RankList + (*UpsetRankData)(nil), // 7: rpc.UpsetRankData + (*ExtendIncData)(nil), // 8: rpc.ExtendIncData + (*RankData)(nil), // 9: rpc.RankData + (*DeleteByKey)(nil), // 10: rpc.DeleteByKey + (*AddRankList)(nil), // 11: rpc.AddRankList + (*FindRankDataByKey)(nil), // 12: rpc.FindRankDataByKey + (*FindRankDataByRank)(nil), // 13: rpc.FindRankDataByRank + (*FindRankDataList)(nil), // 14: rpc.FindRankDataList + (*RankDataList)(nil), // 15: rpc.RankDataList + (*RankInfo)(nil), // 16: rpc.RankInfo + (*RankResult)(nil), // 17: rpc.RankResult +} +var file_test_rpc_rank_proto_depIdxs = []int32{ + 8, // 0: rpc.IncreaseRankData.Extend:type_name -> rpc.ExtendIncData + 0, // 1: rpc.IncreaseRankData.SetSortAndExtendData:type_name -> rpc.SetSortAndExtendData + 5, // 2: rpc.IncreaseRankDataRet.PosData:type_name -> rpc.RankPosData + 9, // 3: rpc.UpsetRankData.RankDataList:type_name -> rpc.RankData + 8, // 4: rpc.RankData.ExData:type_name -> rpc.ExtendIncData + 6, // 5: rpc.AddRankList.AddList:type_name -> rpc.RankList + 5, // 6: rpc.RankDataList.RankPosDataList:type_name -> rpc.RankPosData + 5, // 7: rpc.RankDataList.KeyRank:type_name -> rpc.RankPosData + 16, // 8: rpc.RankResult.NewRank:type_name -> rpc.RankInfo + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_test_rpc_rank_proto_init() } +func file_test_rpc_rank_proto_init() { + if File_test_rpc_rank_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_test_rpc_rank_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSortAndExtendData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IncreaseRankData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IncreaseRankDataRet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateRankData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateRankDataRet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPosData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpsetRankData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtendIncData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteByKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddRankList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindRankDataByKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindRankDataByRank); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindRankDataList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankDataList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_rpc_rank_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_test_rpc_rank_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_test_rpc_rank_proto_goTypes, + DependencyIndexes: file_test_rpc_rank_proto_depIdxs, + MessageInfos: file_test_rpc_rank_proto_msgTypes, + }.Build() + File_test_rpc_rank_proto = out.File + file_test_rpc_rank_proto_rawDesc = nil + file_test_rpc_rank_proto_goTypes = nil + file_test_rpc_rank_proto_depIdxs = nil +} diff --git a/rpc/server.go b/rpc/server.go index efbf545..2b61408 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -19,7 +19,7 @@ const ( RpcProcessorGoGoPB RpcProcessorType = 1 ) -var arrayProcessor = []IRpcProcessor{&JsonProcessor{}, &GoGoPBProcessor{}} +var arrayProcessor = []IRpcProcessor{&JsonProcessor{}, &PBProcessor{}} var arrayProcessorLen uint8 = 2 var LittleEndian bool