|
@@ -1,379 +0,0 @@
|
|
|
-// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
-// source: messageCenter.proto
|
|
|
-
|
|
|
-package messageCenter
|
|
|
-
|
|
|
-import (
|
|
|
- context "context"
|
|
|
- fmt "fmt"
|
|
|
- proto "github.com/golang/protobuf/proto"
|
|
|
- grpc "google.golang.org/grpc"
|
|
|
- codes "google.golang.org/grpc/codes"
|
|
|
- status "google.golang.org/grpc/status"
|
|
|
- math "math"
|
|
|
-)
|
|
|
-
|
|
|
-// 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.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
-
|
|
|
-type CountReq struct {
|
|
|
- ReadType int64 `protobuf:"varint,1,opt,name=readType,proto3" json:"readType,omitempty"`
|
|
|
- MsgType int64 `protobuf:"varint,2,opt,name=msgType,proto3" json:"msgType,omitempty"`
|
|
|
- SendId string `protobuf:"bytes,3,opt,name=sendId,proto3" json:"sendId,omitempty"`
|
|
|
- ReceiveId string `protobuf:"bytes,4,opt,name=receiveId,proto3" json:"receiveId,omitempty"`
|
|
|
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
- XXX_unrecognized []byte `json:"-"`
|
|
|
- XXX_sizecache int32 `json:"-"`
|
|
|
-}
|
|
|
-
|
|
|
-func (m *CountReq) Reset() { *m = CountReq{} }
|
|
|
-func (m *CountReq) String() string { return proto.CompactTextString(m) }
|
|
|
-func (*CountReq) ProtoMessage() {}
|
|
|
-func (*CountReq) Descriptor() ([]byte, []int) {
|
|
|
- return fileDescriptor_e1ab527c77caa1b6, []int{0}
|
|
|
-}
|
|
|
-
|
|
|
-func (m *CountReq) XXX_Unmarshal(b []byte) error {
|
|
|
- return xxx_messageInfo_CountReq.Unmarshal(m, b)
|
|
|
-}
|
|
|
-func (m *CountReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
- return xxx_messageInfo_CountReq.Marshal(b, m, deterministic)
|
|
|
-}
|
|
|
-func (m *CountReq) XXX_Merge(src proto.Message) {
|
|
|
- xxx_messageInfo_CountReq.Merge(m, src)
|
|
|
-}
|
|
|
-func (m *CountReq) XXX_Size() int {
|
|
|
- return xxx_messageInfo_CountReq.Size(m)
|
|
|
-}
|
|
|
-func (m *CountReq) XXX_DiscardUnknown() {
|
|
|
- xxx_messageInfo_CountReq.DiscardUnknown(m)
|
|
|
-}
|
|
|
-
|
|
|
-var xxx_messageInfo_CountReq proto.InternalMessageInfo
|
|
|
-
|
|
|
-func (m *CountReq) GetReadType() int64 {
|
|
|
- if m != nil {
|
|
|
- return m.ReadType
|
|
|
- }
|
|
|
- return 0
|
|
|
-}
|
|
|
-
|
|
|
-func (m *CountReq) GetMsgType() int64 {
|
|
|
- if m != nil {
|
|
|
- return m.MsgType
|
|
|
- }
|
|
|
- return 0
|
|
|
-}
|
|
|
-
|
|
|
-func (m *CountReq) GetSendId() string {
|
|
|
- if m != nil {
|
|
|
- return m.SendId
|
|
|
- }
|
|
|
- return ""
|
|
|
-}
|
|
|
-
|
|
|
-func (m *CountReq) GetReceiveId() string {
|
|
|
- if m != nil {
|
|
|
- return m.ReceiveId
|
|
|
- }
|
|
|
- return ""
|
|
|
-}
|
|
|
-
|
|
|
-type CountResp struct {
|
|
|
- Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
|
|
|
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
- XXX_unrecognized []byte `json:"-"`
|
|
|
- XXX_sizecache int32 `json:"-"`
|
|
|
-}
|
|
|
-
|
|
|
-func (m *CountResp) Reset() { *m = CountResp{} }
|
|
|
-func (m *CountResp) String() string { return proto.CompactTextString(m) }
|
|
|
-func (*CountResp) ProtoMessage() {}
|
|
|
-func (*CountResp) Descriptor() ([]byte, []int) {
|
|
|
- return fileDescriptor_e1ab527c77caa1b6, []int{1}
|
|
|
-}
|
|
|
-
|
|
|
-func (m *CountResp) XXX_Unmarshal(b []byte) error {
|
|
|
- return xxx_messageInfo_CountResp.Unmarshal(m, b)
|
|
|
-}
|
|
|
-func (m *CountResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
- return xxx_messageInfo_CountResp.Marshal(b, m, deterministic)
|
|
|
-}
|
|
|
-func (m *CountResp) XXX_Merge(src proto.Message) {
|
|
|
- xxx_messageInfo_CountResp.Merge(m, src)
|
|
|
-}
|
|
|
-func (m *CountResp) XXX_Size() int {
|
|
|
- return xxx_messageInfo_CountResp.Size(m)
|
|
|
-}
|
|
|
-func (m *CountResp) XXX_DiscardUnknown() {
|
|
|
- xxx_messageInfo_CountResp.DiscardUnknown(m)
|
|
|
-}
|
|
|
-
|
|
|
-var xxx_messageInfo_CountResp proto.InternalMessageInfo
|
|
|
-
|
|
|
-func (m *CountResp) GetCount() int64 {
|
|
|
- if m != nil {
|
|
|
- return m.Count
|
|
|
- }
|
|
|
- return 0
|
|
|
-}
|
|
|
-
|
|
|
-type GetReq struct {
|
|
|
- MsgType int64 `protobuf:"varint,1,opt,name=msgType,proto3" json:"msgType,omitempty"`
|
|
|
- SendId string `protobuf:"bytes,2,opt,name=sendId,proto3" json:"sendId,omitempty"`
|
|
|
- ReceiveId string `protobuf:"bytes,3,opt,name=receiveId,proto3" json:"receiveId,omitempty"`
|
|
|
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
- XXX_unrecognized []byte `json:"-"`
|
|
|
- XXX_sizecache int32 `json:"-"`
|
|
|
-}
|
|
|
-
|
|
|
-func (m *GetReq) Reset() { *m = GetReq{} }
|
|
|
-func (m *GetReq) String() string { return proto.CompactTextString(m) }
|
|
|
-func (*GetReq) ProtoMessage() {}
|
|
|
-func (*GetReq) Descriptor() ([]byte, []int) {
|
|
|
- return fileDescriptor_e1ab527c77caa1b6, []int{2}
|
|
|
-}
|
|
|
-
|
|
|
-func (m *GetReq) XXX_Unmarshal(b []byte) error {
|
|
|
- return xxx_messageInfo_GetReq.Unmarshal(m, b)
|
|
|
-}
|
|
|
-func (m *GetReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
- return xxx_messageInfo_GetReq.Marshal(b, m, deterministic)
|
|
|
-}
|
|
|
-func (m *GetReq) XXX_Merge(src proto.Message) {
|
|
|
- xxx_messageInfo_GetReq.Merge(m, src)
|
|
|
-}
|
|
|
-func (m *GetReq) XXX_Size() int {
|
|
|
- return xxx_messageInfo_GetReq.Size(m)
|
|
|
-}
|
|
|
-func (m *GetReq) XXX_DiscardUnknown() {
|
|
|
- xxx_messageInfo_GetReq.DiscardUnknown(m)
|
|
|
-}
|
|
|
-
|
|
|
-var xxx_messageInfo_GetReq proto.InternalMessageInfo
|
|
|
-
|
|
|
-func (m *GetReq) GetMsgType() int64 {
|
|
|
- if m != nil {
|
|
|
- return m.MsgType
|
|
|
- }
|
|
|
- return 0
|
|
|
-}
|
|
|
-
|
|
|
-func (m *GetReq) GetSendId() string {
|
|
|
- if m != nil {
|
|
|
- return m.SendId
|
|
|
- }
|
|
|
- return ""
|
|
|
-}
|
|
|
-
|
|
|
-func (m *GetReq) GetReceiveId() string {
|
|
|
- if m != nil {
|
|
|
- return m.ReceiveId
|
|
|
- }
|
|
|
- return ""
|
|
|
-}
|
|
|
-
|
|
|
-type GetResp struct {
|
|
|
- Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
|
|
|
- CreateTime string `protobuf:"bytes,2,opt,name=createTime,proto3" json:"createTime,omitempty"`
|
|
|
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
- XXX_unrecognized []byte `json:"-"`
|
|
|
- XXX_sizecache int32 `json:"-"`
|
|
|
-}
|
|
|
-
|
|
|
-func (m *GetResp) Reset() { *m = GetResp{} }
|
|
|
-func (m *GetResp) String() string { return proto.CompactTextString(m) }
|
|
|
-func (*GetResp) ProtoMessage() {}
|
|
|
-func (*GetResp) Descriptor() ([]byte, []int) {
|
|
|
- return fileDescriptor_e1ab527c77caa1b6, []int{3}
|
|
|
-}
|
|
|
-
|
|
|
-func (m *GetResp) XXX_Unmarshal(b []byte) error {
|
|
|
- return xxx_messageInfo_GetResp.Unmarshal(m, b)
|
|
|
-}
|
|
|
-func (m *GetResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
- return xxx_messageInfo_GetResp.Marshal(b, m, deterministic)
|
|
|
-}
|
|
|
-func (m *GetResp) XXX_Merge(src proto.Message) {
|
|
|
- xxx_messageInfo_GetResp.Merge(m, src)
|
|
|
-}
|
|
|
-func (m *GetResp) XXX_Size() int {
|
|
|
- return xxx_messageInfo_GetResp.Size(m)
|
|
|
-}
|
|
|
-func (m *GetResp) XXX_DiscardUnknown() {
|
|
|
- xxx_messageInfo_GetResp.DiscardUnknown(m)
|
|
|
-}
|
|
|
-
|
|
|
-var xxx_messageInfo_GetResp proto.InternalMessageInfo
|
|
|
-
|
|
|
-func (m *GetResp) GetContent() string {
|
|
|
- if m != nil {
|
|
|
- return m.Content
|
|
|
- }
|
|
|
- return ""
|
|
|
-}
|
|
|
-
|
|
|
-func (m *GetResp) GetCreateTime() string {
|
|
|
- if m != nil {
|
|
|
- return m.CreateTime
|
|
|
- }
|
|
|
- return ""
|
|
|
-}
|
|
|
-
|
|
|
-func init() {
|
|
|
- proto.RegisterType((*CountReq)(nil), "messageCenter.CountReq")
|
|
|
- proto.RegisterType((*CountResp)(nil), "messageCenter.CountResp")
|
|
|
- proto.RegisterType((*GetReq)(nil), "messageCenter.GetReq")
|
|
|
- proto.RegisterType((*GetResp)(nil), "messageCenter.GetResp")
|
|
|
-}
|
|
|
-
|
|
|
-func init() { proto.RegisterFile("messageCenter.proto", fileDescriptor_e1ab527c77caa1b6) }
|
|
|
-
|
|
|
-var fileDescriptor_e1ab527c77caa1b6 = []byte{
|
|
|
- // 265 bytes of a gzipped FileDescriptorProto
|
|
|
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4b, 0xc3, 0x40,
|
|
|
- 0x10, 0x85, 0xd9, 0xc6, 0xa6, 0xcd, 0x80, 0x88, 0xa3, 0xd6, 0x25, 0x88, 0xd4, 0x9c, 0x7a, 0x8a,
|
|
|
- 0xa0, 0x17, 0xf1, 0x68, 0x0e, 0x52, 0xf0, 0x14, 0x7a, 0x10, 0x6f, 0x31, 0x19, 0x4a, 0x0f, 0x49,
|
|
|
- 0xd6, 0x9d, 0xb5, 0xe0, 0x0f, 0xf0, 0x7f, 0x4b, 0xb7, 0x1b, 0xdb, 0x2d, 0xcd, 0xf1, 0xbd, 0x17,
|
|
|
- 0xde, 0x37, 0x79, 0x0b, 0x17, 0x35, 0x31, 0x17, 0x4b, 0xca, 0xa8, 0x31, 0xa4, 0x53, 0xa5, 0x5b,
|
|
|
- 0xd3, 0xe2, 0xa9, 0x67, 0x26, 0x6b, 0x18, 0x67, 0xed, 0x77, 0x63, 0x72, 0xfa, 0xc2, 0x18, 0xc6,
|
|
|
- 0x9a, 0x8a, 0x6a, 0xf1, 0xa3, 0x48, 0x8a, 0xa9, 0x98, 0x05, 0xf9, 0xbf, 0x46, 0x09, 0xa3, 0x9a,
|
|
|
- 0x97, 0x36, 0x1a, 0xd8, 0xa8, 0x93, 0x38, 0x81, 0x90, 0xa9, 0xa9, 0xe6, 0x95, 0x0c, 0xa6, 0x62,
|
|
|
- 0x16, 0xe5, 0x4e, 0xe1, 0x0d, 0x44, 0x9a, 0x4a, 0x5a, 0xad, 0x69, 0x5e, 0xc9, 0x13, 0x1b, 0xed,
|
|
|
- 0x8c, 0xe4, 0x0e, 0x22, 0xc7, 0x65, 0x85, 0x97, 0x30, 0x2c, 0x37, 0xc2, 0x51, 0xb7, 0x22, 0x79,
|
|
|
- 0x87, 0xf0, 0x95, 0xec, 0x61, 0x7b, 0x70, 0xd1, 0x07, 0x1f, 0xf4, 0xc3, 0x83, 0x43, 0x78, 0x06,
|
|
|
- 0x23, 0xdb, 0xcc, 0x6a, 0x53, 0x5d, 0xb6, 0x8d, 0x21, 0x07, 0x8f, 0xf2, 0x4e, 0xe2, 0x2d, 0x40,
|
|
|
- 0xa9, 0xa9, 0x30, 0xb4, 0x58, 0xd5, 0xe4, 0xea, 0xf7, 0x9c, 0x87, 0x5f, 0x01, 0xfe, 0x96, 0xf8,
|
|
|
- 0x0c, 0x43, 0xfb, 0x4f, 0x78, 0x9d, 0xfa, 0xcb, 0x77, 0x0b, 0xc7, 0xf2, 0x78, 0xc0, 0x0a, 0x9f,
|
|
|
- 0xec, 0x49, 0x6f, 0x05, 0x1b, 0xbc, 0x3a, 0xf8, 0x68, 0x3b, 0x42, 0x3c, 0x39, 0x66, 0xb3, 0x7a,
|
|
|
- 0x39, 0xff, 0x38, 0x4b, 0xef, 0xbd, 0xe8, 0x33, 0xb4, 0x4f, 0xfd, 0xf8, 0x17, 0x00, 0x00, 0xff,
|
|
|
- 0xff, 0x91, 0x3b, 0x3d, 0xef, 0x01, 0x02, 0x00, 0x00,
|
|
|
-}
|
|
|
-
|
|
|
-// Reference imports to suppress errors if they are not otherwise used.
|
|
|
-var _ context.Context
|
|
|
-var _ grpc.ClientConn
|
|
|
-
|
|
|
-// This is a compile-time assertion to ensure that this generated file
|
|
|
-// is compatible with the grpc package it is being compiled against.
|
|
|
-const _ = grpc.SupportPackageIsVersion4
|
|
|
-
|
|
|
-// MessageCenterClient is the client API for MessageCenter service.
|
|
|
-//
|
|
|
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
-type MessageCenterClient interface {
|
|
|
- // 查询数量
|
|
|
- Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error)
|
|
|
- // 获取消息
|
|
|
- GetLast(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error)
|
|
|
-}
|
|
|
-
|
|
|
-type messageCenterClient struct {
|
|
|
- cc *grpc.ClientConn
|
|
|
-}
|
|
|
-
|
|
|
-func NewMessageCenterClient(cc *grpc.ClientConn) MessageCenterClient {
|
|
|
- return &messageCenterClient{cc}
|
|
|
-}
|
|
|
-
|
|
|
-func (c *messageCenterClient) Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error) {
|
|
|
- out := new(CountResp)
|
|
|
- err := c.cc.Invoke(ctx, "/messageCenter.messageCenter/Count", in, out, opts...)
|
|
|
- if err != nil {
|
|
|
- return nil, err
|
|
|
- }
|
|
|
- return out, nil
|
|
|
-}
|
|
|
-
|
|
|
-func (c *messageCenterClient) GetLast(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error) {
|
|
|
- out := new(GetResp)
|
|
|
- err := c.cc.Invoke(ctx, "/messageCenter.messageCenter/GetLast", in, out, opts...)
|
|
|
- if err != nil {
|
|
|
- return nil, err
|
|
|
- }
|
|
|
- return out, nil
|
|
|
-}
|
|
|
-
|
|
|
-// MessageCenterServer is the server API for MessageCenter service.
|
|
|
-type MessageCenterServer interface {
|
|
|
- // 查询数量
|
|
|
- Count(context.Context, *CountReq) (*CountResp, error)
|
|
|
- // 获取消息
|
|
|
- GetLast(context.Context, *GetReq) (*GetResp, error)
|
|
|
-}
|
|
|
-
|
|
|
-// UnimplementedMessageCenterServer can be embedded to have forward compatible implementations.
|
|
|
-type UnimplementedMessageCenterServer struct {
|
|
|
-}
|
|
|
-
|
|
|
-func (*UnimplementedMessageCenterServer) Count(ctx context.Context, req *CountReq) (*CountResp, error) {
|
|
|
- return nil, status.Errorf(codes.Unimplemented, "method Count not implemented")
|
|
|
-}
|
|
|
-func (*UnimplementedMessageCenterServer) GetLast(ctx context.Context, req *GetReq) (*GetResp, error) {
|
|
|
- return nil, status.Errorf(codes.Unimplemented, "method GetLast not implemented")
|
|
|
-}
|
|
|
-
|
|
|
-func RegisterMessageCenterServer(s *grpc.Server, srv MessageCenterServer) {
|
|
|
- s.RegisterService(&_MessageCenter_serviceDesc, srv)
|
|
|
-}
|
|
|
-
|
|
|
-func _MessageCenter_Count_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
- in := new(CountReq)
|
|
|
- if err := dec(in); err != nil {
|
|
|
- return nil, err
|
|
|
- }
|
|
|
- if interceptor == nil {
|
|
|
- return srv.(MessageCenterServer).Count(ctx, in)
|
|
|
- }
|
|
|
- info := &grpc.UnaryServerInfo{
|
|
|
- Server: srv,
|
|
|
- FullMethod: "/messageCenter.messageCenter/Count",
|
|
|
- }
|
|
|
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
- return srv.(MessageCenterServer).Count(ctx, req.(*CountReq))
|
|
|
- }
|
|
|
- return interceptor(ctx, in, info, handler)
|
|
|
-}
|
|
|
-
|
|
|
-func _MessageCenter_GetLast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
- in := new(GetReq)
|
|
|
- if err := dec(in); err != nil {
|
|
|
- return nil, err
|
|
|
- }
|
|
|
- if interceptor == nil {
|
|
|
- return srv.(MessageCenterServer).GetLast(ctx, in)
|
|
|
- }
|
|
|
- info := &grpc.UnaryServerInfo{
|
|
|
- Server: srv,
|
|
|
- FullMethod: "/messageCenter.messageCenter/GetLast",
|
|
|
- }
|
|
|
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
- return srv.(MessageCenterServer).GetLast(ctx, req.(*GetReq))
|
|
|
- }
|
|
|
- return interceptor(ctx, in, info, handler)
|
|
|
-}
|
|
|
-
|
|
|
-var _MessageCenter_serviceDesc = grpc.ServiceDesc{
|
|
|
- ServiceName: "messageCenter.messageCenter",
|
|
|
- HandlerType: (*MessageCenterServer)(nil),
|
|
|
- Methods: []grpc.MethodDesc{
|
|
|
- {
|
|
|
- MethodName: "Count",
|
|
|
- Handler: _MessageCenter_Count_Handler,
|
|
|
- },
|
|
|
- {
|
|
|
- MethodName: "GetLast",
|
|
|
- Handler: _MessageCenter_GetLast_Handler,
|
|
|
- },
|
|
|
- },
|
|
|
- Streams: []grpc.StreamDesc{},
|
|
|
- Metadata: "messageCenter.proto",
|
|
|
-}
|