messageCenter.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: messageCenter.proto
  3. package messageCenter
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. math "math"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  22. type CountReq struct {
  23. ReadType int64 `protobuf:"varint,1,opt,name=readType,proto3" json:"readType,omitempty"`
  24. MsgType int64 `protobuf:"varint,2,opt,name=msgType,proto3" json:"msgType,omitempty"`
  25. SendId string `protobuf:"bytes,3,opt,name=sendId,proto3" json:"sendId,omitempty"`
  26. ReceiveId string `protobuf:"bytes,4,opt,name=receiveId,proto3" json:"receiveId,omitempty"`
  27. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  28. XXX_unrecognized []byte `json:"-"`
  29. XXX_sizecache int32 `json:"-"`
  30. }
  31. func (m *CountReq) Reset() { *m = CountReq{} }
  32. func (m *CountReq) String() string { return proto.CompactTextString(m) }
  33. func (*CountReq) ProtoMessage() {}
  34. func (*CountReq) Descriptor() ([]byte, []int) {
  35. return fileDescriptor_e1ab527c77caa1b6, []int{0}
  36. }
  37. func (m *CountReq) XXX_Unmarshal(b []byte) error {
  38. return xxx_messageInfo_CountReq.Unmarshal(m, b)
  39. }
  40. func (m *CountReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  41. return xxx_messageInfo_CountReq.Marshal(b, m, deterministic)
  42. }
  43. func (m *CountReq) XXX_Merge(src proto.Message) {
  44. xxx_messageInfo_CountReq.Merge(m, src)
  45. }
  46. func (m *CountReq) XXX_Size() int {
  47. return xxx_messageInfo_CountReq.Size(m)
  48. }
  49. func (m *CountReq) XXX_DiscardUnknown() {
  50. xxx_messageInfo_CountReq.DiscardUnknown(m)
  51. }
  52. var xxx_messageInfo_CountReq proto.InternalMessageInfo
  53. func (m *CountReq) GetReadType() int64 {
  54. if m != nil {
  55. return m.ReadType
  56. }
  57. return 0
  58. }
  59. func (m *CountReq) GetMsgType() int64 {
  60. if m != nil {
  61. return m.MsgType
  62. }
  63. return 0
  64. }
  65. func (m *CountReq) GetSendId() string {
  66. if m != nil {
  67. return m.SendId
  68. }
  69. return ""
  70. }
  71. func (m *CountReq) GetReceiveId() string {
  72. if m != nil {
  73. return m.ReceiveId
  74. }
  75. return ""
  76. }
  77. type CountResp struct {
  78. Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
  79. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  80. XXX_unrecognized []byte `json:"-"`
  81. XXX_sizecache int32 `json:"-"`
  82. }
  83. func (m *CountResp) Reset() { *m = CountResp{} }
  84. func (m *CountResp) String() string { return proto.CompactTextString(m) }
  85. func (*CountResp) ProtoMessage() {}
  86. func (*CountResp) Descriptor() ([]byte, []int) {
  87. return fileDescriptor_e1ab527c77caa1b6, []int{1}
  88. }
  89. func (m *CountResp) XXX_Unmarshal(b []byte) error {
  90. return xxx_messageInfo_CountResp.Unmarshal(m, b)
  91. }
  92. func (m *CountResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  93. return xxx_messageInfo_CountResp.Marshal(b, m, deterministic)
  94. }
  95. func (m *CountResp) XXX_Merge(src proto.Message) {
  96. xxx_messageInfo_CountResp.Merge(m, src)
  97. }
  98. func (m *CountResp) XXX_Size() int {
  99. return xxx_messageInfo_CountResp.Size(m)
  100. }
  101. func (m *CountResp) XXX_DiscardUnknown() {
  102. xxx_messageInfo_CountResp.DiscardUnknown(m)
  103. }
  104. var xxx_messageInfo_CountResp proto.InternalMessageInfo
  105. func (m *CountResp) GetCount() int64 {
  106. if m != nil {
  107. return m.Count
  108. }
  109. return 0
  110. }
  111. type GetReq struct {
  112. MsgType int64 `protobuf:"varint,1,opt,name=msgType,proto3" json:"msgType,omitempty"`
  113. SendId string `protobuf:"bytes,2,opt,name=sendId,proto3" json:"sendId,omitempty"`
  114. ReceiveId string `protobuf:"bytes,3,opt,name=receiveId,proto3" json:"receiveId,omitempty"`
  115. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  116. XXX_unrecognized []byte `json:"-"`
  117. XXX_sizecache int32 `json:"-"`
  118. }
  119. func (m *GetReq) Reset() { *m = GetReq{} }
  120. func (m *GetReq) String() string { return proto.CompactTextString(m) }
  121. func (*GetReq) ProtoMessage() {}
  122. func (*GetReq) Descriptor() ([]byte, []int) {
  123. return fileDescriptor_e1ab527c77caa1b6, []int{2}
  124. }
  125. func (m *GetReq) XXX_Unmarshal(b []byte) error {
  126. return xxx_messageInfo_GetReq.Unmarshal(m, b)
  127. }
  128. func (m *GetReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  129. return xxx_messageInfo_GetReq.Marshal(b, m, deterministic)
  130. }
  131. func (m *GetReq) XXX_Merge(src proto.Message) {
  132. xxx_messageInfo_GetReq.Merge(m, src)
  133. }
  134. func (m *GetReq) XXX_Size() int {
  135. return xxx_messageInfo_GetReq.Size(m)
  136. }
  137. func (m *GetReq) XXX_DiscardUnknown() {
  138. xxx_messageInfo_GetReq.DiscardUnknown(m)
  139. }
  140. var xxx_messageInfo_GetReq proto.InternalMessageInfo
  141. func (m *GetReq) GetMsgType() int64 {
  142. if m != nil {
  143. return m.MsgType
  144. }
  145. return 0
  146. }
  147. func (m *GetReq) GetSendId() string {
  148. if m != nil {
  149. return m.SendId
  150. }
  151. return ""
  152. }
  153. func (m *GetReq) GetReceiveId() string {
  154. if m != nil {
  155. return m.ReceiveId
  156. }
  157. return ""
  158. }
  159. type GetResp struct {
  160. Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
  161. CreateTime string `protobuf:"bytes,2,opt,name=createTime,proto3" json:"createTime,omitempty"`
  162. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  163. XXX_unrecognized []byte `json:"-"`
  164. XXX_sizecache int32 `json:"-"`
  165. }
  166. func (m *GetResp) Reset() { *m = GetResp{} }
  167. func (m *GetResp) String() string { return proto.CompactTextString(m) }
  168. func (*GetResp) ProtoMessage() {}
  169. func (*GetResp) Descriptor() ([]byte, []int) {
  170. return fileDescriptor_e1ab527c77caa1b6, []int{3}
  171. }
  172. func (m *GetResp) XXX_Unmarshal(b []byte) error {
  173. return xxx_messageInfo_GetResp.Unmarshal(m, b)
  174. }
  175. func (m *GetResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  176. return xxx_messageInfo_GetResp.Marshal(b, m, deterministic)
  177. }
  178. func (m *GetResp) XXX_Merge(src proto.Message) {
  179. xxx_messageInfo_GetResp.Merge(m, src)
  180. }
  181. func (m *GetResp) XXX_Size() int {
  182. return xxx_messageInfo_GetResp.Size(m)
  183. }
  184. func (m *GetResp) XXX_DiscardUnknown() {
  185. xxx_messageInfo_GetResp.DiscardUnknown(m)
  186. }
  187. var xxx_messageInfo_GetResp proto.InternalMessageInfo
  188. func (m *GetResp) GetContent() string {
  189. if m != nil {
  190. return m.Content
  191. }
  192. return ""
  193. }
  194. func (m *GetResp) GetCreateTime() string {
  195. if m != nil {
  196. return m.CreateTime
  197. }
  198. return ""
  199. }
  200. func init() {
  201. proto.RegisterType((*CountReq)(nil), "messageCenter.CountReq")
  202. proto.RegisterType((*CountResp)(nil), "messageCenter.CountResp")
  203. proto.RegisterType((*GetReq)(nil), "messageCenter.GetReq")
  204. proto.RegisterType((*GetResp)(nil), "messageCenter.GetResp")
  205. }
  206. func init() { proto.RegisterFile("messageCenter.proto", fileDescriptor_e1ab527c77caa1b6) }
  207. var fileDescriptor_e1ab527c77caa1b6 = []byte{
  208. // 265 bytes of a gzipped FileDescriptorProto
  209. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4b, 0xc3, 0x40,
  210. 0x10, 0x85, 0xd9, 0xc6, 0xa6, 0xcd, 0x80, 0x88, 0xa3, 0xd6, 0x25, 0x88, 0xd4, 0x9c, 0x7a, 0x8a,
  211. 0xa0, 0x17, 0xf1, 0x68, 0x0e, 0x52, 0xf0, 0x14, 0x7a, 0x10, 0x6f, 0x31, 0x19, 0x4a, 0x0f, 0x49,
  212. 0xd6, 0x9d, 0xb5, 0xe0, 0x0f, 0xf0, 0x7f, 0x4b, 0xb7, 0x1b, 0xdb, 0x2d, 0xcd, 0xf1, 0xbd, 0x17,
  213. 0xde, 0x37, 0x79, 0x0b, 0x17, 0x35, 0x31, 0x17, 0x4b, 0xca, 0xa8, 0x31, 0xa4, 0x53, 0xa5, 0x5b,
  214. 0xd3, 0xe2, 0xa9, 0x67, 0x26, 0x6b, 0x18, 0x67, 0xed, 0x77, 0x63, 0x72, 0xfa, 0xc2, 0x18, 0xc6,
  215. 0x9a, 0x8a, 0x6a, 0xf1, 0xa3, 0x48, 0x8a, 0xa9, 0x98, 0x05, 0xf9, 0xbf, 0x46, 0x09, 0xa3, 0x9a,
  216. 0x97, 0x36, 0x1a, 0xd8, 0xa8, 0x93, 0x38, 0x81, 0x90, 0xa9, 0xa9, 0xe6, 0x95, 0x0c, 0xa6, 0x62,
  217. 0x16, 0xe5, 0x4e, 0xe1, 0x0d, 0x44, 0x9a, 0x4a, 0x5a, 0xad, 0x69, 0x5e, 0xc9, 0x13, 0x1b, 0xed,
  218. 0x8c, 0xe4, 0x0e, 0x22, 0xc7, 0x65, 0x85, 0x97, 0x30, 0x2c, 0x37, 0xc2, 0x51, 0xb7, 0x22, 0x79,
  219. 0x87, 0xf0, 0x95, 0xec, 0x61, 0x7b, 0x70, 0xd1, 0x07, 0x1f, 0xf4, 0xc3, 0x83, 0x43, 0x78, 0x06,
  220. 0x23, 0xdb, 0xcc, 0x6a, 0x53, 0x5d, 0xb6, 0x8d, 0x21, 0x07, 0x8f, 0xf2, 0x4e, 0xe2, 0x2d, 0x40,
  221. 0xa9, 0xa9, 0x30, 0xb4, 0x58, 0xd5, 0xe4, 0xea, 0xf7, 0x9c, 0x87, 0x5f, 0x01, 0xfe, 0x96, 0xf8,
  222. 0x0c, 0x43, 0xfb, 0x4f, 0x78, 0x9d, 0xfa, 0xcb, 0x77, 0x0b, 0xc7, 0xf2, 0x78, 0xc0, 0x0a, 0x9f,
  223. 0xec, 0x49, 0x6f, 0x05, 0x1b, 0xbc, 0x3a, 0xf8, 0x68, 0x3b, 0x42, 0x3c, 0x39, 0x66, 0xb3, 0x7a,
  224. 0x39, 0xff, 0x38, 0x4b, 0xef, 0xbd, 0xe8, 0x33, 0xb4, 0x4f, 0xfd, 0xf8, 0x17, 0x00, 0x00, 0xff,
  225. 0xff, 0x91, 0x3b, 0x3d, 0xef, 0x01, 0x02, 0x00, 0x00,
  226. }
  227. // Reference imports to suppress errors if they are not otherwise used.
  228. var _ context.Context
  229. var _ grpc.ClientConn
  230. // This is a compile-time assertion to ensure that this generated file
  231. // is compatible with the grpc package it is being compiled against.
  232. const _ = grpc.SupportPackageIsVersion4
  233. // MessageCenterClient is the client API for MessageCenter service.
  234. //
  235. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  236. type MessageCenterClient interface {
  237. // 查询数量
  238. Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error)
  239. // 获取消息
  240. GetLast(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error)
  241. }
  242. type messageCenterClient struct {
  243. cc *grpc.ClientConn
  244. }
  245. func NewMessageCenterClient(cc *grpc.ClientConn) MessageCenterClient {
  246. return &messageCenterClient{cc}
  247. }
  248. func (c *messageCenterClient) Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error) {
  249. out := new(CountResp)
  250. err := c.cc.Invoke(ctx, "/messageCenter.messageCenter/Count", in, out, opts...)
  251. if err != nil {
  252. return nil, err
  253. }
  254. return out, nil
  255. }
  256. func (c *messageCenterClient) GetLast(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error) {
  257. out := new(GetResp)
  258. err := c.cc.Invoke(ctx, "/messageCenter.messageCenter/GetLast", in, out, opts...)
  259. if err != nil {
  260. return nil, err
  261. }
  262. return out, nil
  263. }
  264. // MessageCenterServer is the server API for MessageCenter service.
  265. type MessageCenterServer interface {
  266. // 查询数量
  267. Count(context.Context, *CountReq) (*CountResp, error)
  268. // 获取消息
  269. GetLast(context.Context, *GetReq) (*GetResp, error)
  270. }
  271. // UnimplementedMessageCenterServer can be embedded to have forward compatible implementations.
  272. type UnimplementedMessageCenterServer struct {
  273. }
  274. func (*UnimplementedMessageCenterServer) Count(ctx context.Context, req *CountReq) (*CountResp, error) {
  275. return nil, status.Errorf(codes.Unimplemented, "method Count not implemented")
  276. }
  277. func (*UnimplementedMessageCenterServer) GetLast(ctx context.Context, req *GetReq) (*GetResp, error) {
  278. return nil, status.Errorf(codes.Unimplemented, "method GetLast not implemented")
  279. }
  280. func RegisterMessageCenterServer(s *grpc.Server, srv MessageCenterServer) {
  281. s.RegisterService(&_MessageCenter_serviceDesc, srv)
  282. }
  283. func _MessageCenter_Count_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  284. in := new(CountReq)
  285. if err := dec(in); err != nil {
  286. return nil, err
  287. }
  288. if interceptor == nil {
  289. return srv.(MessageCenterServer).Count(ctx, in)
  290. }
  291. info := &grpc.UnaryServerInfo{
  292. Server: srv,
  293. FullMethod: "/messageCenter.messageCenter/Count",
  294. }
  295. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  296. return srv.(MessageCenterServer).Count(ctx, req.(*CountReq))
  297. }
  298. return interceptor(ctx, in, info, handler)
  299. }
  300. func _MessageCenter_GetLast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  301. in := new(GetReq)
  302. if err := dec(in); err != nil {
  303. return nil, err
  304. }
  305. if interceptor == nil {
  306. return srv.(MessageCenterServer).GetLast(ctx, in)
  307. }
  308. info := &grpc.UnaryServerInfo{
  309. Server: srv,
  310. FullMethod: "/messageCenter.messageCenter/GetLast",
  311. }
  312. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  313. return srv.(MessageCenterServer).GetLast(ctx, req.(*GetReq))
  314. }
  315. return interceptor(ctx, in, info, handler)
  316. }
  317. var _MessageCenter_serviceDesc = grpc.ServiceDesc{
  318. ServiceName: "messageCenter.messageCenter",
  319. HandlerType: (*MessageCenterServer)(nil),
  320. Methods: []grpc.MethodDesc{
  321. {
  322. MethodName: "Count",
  323. Handler: _MessageCenter_Count_Handler,
  324. },
  325. {
  326. MethodName: "GetLast",
  327. Handler: _MessageCenter_GetLast_Handler,
  328. },
  329. },
  330. Streams: []grpc.StreamDesc{},
  331. Metadata: "messageCenter.proto",
  332. }