From dbf2e56f37ac589461813121d75ebc2265ef2307 Mon Sep 17 00:00:00 2001 From: hailong <605739610@qq.com> Date: Wed, 26 May 2021 19:19:41 +0800 Subject: [PATCH] AUTH AND CHAT PB --- src/proto/auth/auth.pb.go | 420 +++++++++++++ src/proto/auth/auth.proto | 35 ++ src/proto/auto_proto.sh | 10 + src/proto/chat/chat.pb.go | 1180 +++++++++++++++++++++++++++++++++++++ src/proto/chat/chat.proto | 124 ++++ src/proto/proto_dir.cfg | 10 + 6 files changed, 1779 insertions(+) create mode 100644 src/proto/auth/auth.pb.go create mode 100644 src/proto/auth/auth.proto create mode 100644 src/proto/auto_proto.sh create mode 100644 src/proto/chat/chat.pb.go create mode 100644 src/proto/chat/chat.proto create mode 100644 src/proto/proto_dir.cfg diff --git a/src/proto/auth/auth.pb.go b/src/proto/auth/auth.pb.go new file mode 100644 index 000000000..16b91a97f --- /dev/null +++ b/src/proto/auth/auth.pb.go @@ -0,0 +1,420 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: auth/auth.proto + +package pbAuth + +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 UserRegisterReq struct { + UID string `protobuf:"bytes,1,opt,name=UID,proto3" json:"UID,omitempty"` + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` + Icon string `protobuf:"bytes,3,opt,name=Icon,proto3" json:"Icon,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=Gender,proto3" json:"Gender,omitempty"` + Mobile string `protobuf:"bytes,5,opt,name=Mobile,proto3" json:"Mobile,omitempty"` + Birth string `protobuf:"bytes,6,opt,name=Birth,proto3" json:"Birth,omitempty"` + Email string `protobuf:"bytes,7,opt,name=Email,proto3" json:"Email,omitempty"` + Ex string `protobuf:"bytes,8,opt,name=Ex,proto3" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserRegisterReq) Reset() { *m = UserRegisterReq{} } +func (m *UserRegisterReq) String() string { return proto.CompactTextString(m) } +func (*UserRegisterReq) ProtoMessage() {} +func (*UserRegisterReq) Descriptor() ([]byte, []int) { + return fileDescriptor_712ec48c1eaf43a2, []int{0} +} + +func (m *UserRegisterReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserRegisterReq.Unmarshal(m, b) +} +func (m *UserRegisterReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserRegisterReq.Marshal(b, m, deterministic) +} +func (m *UserRegisterReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserRegisterReq.Merge(m, src) +} +func (m *UserRegisterReq) XXX_Size() int { + return xxx_messageInfo_UserRegisterReq.Size(m) +} +func (m *UserRegisterReq) XXX_DiscardUnknown() { + xxx_messageInfo_UserRegisterReq.DiscardUnknown(m) +} + +var xxx_messageInfo_UserRegisterReq proto.InternalMessageInfo + +func (m *UserRegisterReq) GetUID() string { + if m != nil { + return m.UID + } + return "" +} + +func (m *UserRegisterReq) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *UserRegisterReq) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *UserRegisterReq) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *UserRegisterReq) GetMobile() string { + if m != nil { + return m.Mobile + } + return "" +} + +func (m *UserRegisterReq) GetBirth() string { + if m != nil { + return m.Birth + } + return "" +} + +func (m *UserRegisterReq) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *UserRegisterReq) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type UserRegisterResp struct { + Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserRegisterResp) Reset() { *m = UserRegisterResp{} } +func (m *UserRegisterResp) String() string { return proto.CompactTextString(m) } +func (*UserRegisterResp) ProtoMessage() {} +func (*UserRegisterResp) Descriptor() ([]byte, []int) { + return fileDescriptor_712ec48c1eaf43a2, []int{1} +} + +func (m *UserRegisterResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserRegisterResp.Unmarshal(m, b) +} +func (m *UserRegisterResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserRegisterResp.Marshal(b, m, deterministic) +} +func (m *UserRegisterResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserRegisterResp.Merge(m, src) +} +func (m *UserRegisterResp) XXX_Size() int { + return xxx_messageInfo_UserRegisterResp.Size(m) +} +func (m *UserRegisterResp) XXX_DiscardUnknown() { + xxx_messageInfo_UserRegisterResp.DiscardUnknown(m) +} + +var xxx_messageInfo_UserRegisterResp proto.InternalMessageInfo + +func (m *UserRegisterResp) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +type UserTokenReq struct { + Platform int32 `protobuf:"varint,1,opt,name=Platform,proto3" json:"Platform,omitempty"` + UID string `protobuf:"bytes,2,opt,name=UID,proto3" json:"UID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserTokenReq) Reset() { *m = UserTokenReq{} } +func (m *UserTokenReq) String() string { return proto.CompactTextString(m) } +func (*UserTokenReq) ProtoMessage() {} +func (*UserTokenReq) Descriptor() ([]byte, []int) { + return fileDescriptor_712ec48c1eaf43a2, []int{2} +} + +func (m *UserTokenReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserTokenReq.Unmarshal(m, b) +} +func (m *UserTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserTokenReq.Marshal(b, m, deterministic) +} +func (m *UserTokenReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserTokenReq.Merge(m, src) +} +func (m *UserTokenReq) XXX_Size() int { + return xxx_messageInfo_UserTokenReq.Size(m) +} +func (m *UserTokenReq) XXX_DiscardUnknown() { + xxx_messageInfo_UserTokenReq.DiscardUnknown(m) +} + +var xxx_messageInfo_UserTokenReq proto.InternalMessageInfo + +func (m *UserTokenReq) GetPlatform() int32 { + if m != nil { + return m.Platform + } + return 0 +} + +func (m *UserTokenReq) GetUID() string { + if m != nil { + return m.UID + } + return "" +} + +type UserTokenResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode,proto3" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg,proto3" json:"ErrMsg,omitempty"` + Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"` + ExpiredTime int64 `protobuf:"varint,4,opt,name=ExpiredTime,proto3" json:"ExpiredTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserTokenResp) Reset() { *m = UserTokenResp{} } +func (m *UserTokenResp) String() string { return proto.CompactTextString(m) } +func (*UserTokenResp) ProtoMessage() {} +func (*UserTokenResp) Descriptor() ([]byte, []int) { + return fileDescriptor_712ec48c1eaf43a2, []int{3} +} + +func (m *UserTokenResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserTokenResp.Unmarshal(m, b) +} +func (m *UserTokenResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserTokenResp.Marshal(b, m, deterministic) +} +func (m *UserTokenResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserTokenResp.Merge(m, src) +} +func (m *UserTokenResp) XXX_Size() int { + return xxx_messageInfo_UserTokenResp.Size(m) +} +func (m *UserTokenResp) XXX_DiscardUnknown() { + xxx_messageInfo_UserTokenResp.DiscardUnknown(m) +} + +var xxx_messageInfo_UserTokenResp proto.InternalMessageInfo + +func (m *UserTokenResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *UserTokenResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *UserTokenResp) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *UserTokenResp) GetExpiredTime() int64 { + if m != nil { + return m.ExpiredTime + } + return 0 +} + +func init() { + proto.RegisterType((*UserRegisterReq)(nil), "pbAuth.UserRegisterReq") + proto.RegisterType((*UserRegisterResp)(nil), "pbAuth.UserRegisterResp") + proto.RegisterType((*UserTokenReq)(nil), "pbAuth.UserTokenReq") + proto.RegisterType((*UserTokenResp)(nil), "pbAuth.UserTokenResp") +} + +func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_712ec48c1eaf43a2) } + +var fileDescriptor_712ec48c1eaf43a2 = []byte{ + // 346 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x4e, 0xc2, 0x40, + 0x10, 0x86, 0xd3, 0x42, 0x0b, 0x0c, 0x22, 0x64, 0x82, 0xba, 0xe1, 0x44, 0x7a, 0xe2, 0x60, 0x30, + 0xd1, 0x8b, 0x89, 0x5e, 0x40, 0x1b, 0xc3, 0x01, 0x63, 0x2a, 0x5c, 0xbc, 0x15, 0x58, 0xa1, 0x91, + 0xb2, 0x75, 0xb7, 0x24, 0x78, 0xf6, 0xa1, 0x7c, 0x3d, 0x33, 0xbb, 0x5b, 0x82, 0x86, 0x4b, 0x3b, + 0xff, 0xb7, 0x33, 0xd9, 0xfd, 0x67, 0x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ac, 0x96, 0xb6, 0xde, + 0x2a, 0x32, 0xa5, 0xcb, 0x6d, 0xbf, 0x8c, 0xc0, 0x2e, 0xd4, 0xc3, 0x5d, 0x96, 0x48, 0xbe, 0x98, + 0x24, 0x29, 0xd7, 0x5d, 0x2b, 0x45, 0x87, 0xe8, 0xfa, 0xdb, 0x81, 0x32, 0x4d, 0x0a, 0x07, 0xc6, + 0x41, 0xe1, 0x17, 0x2f, 0xfa, 0x66, 0x84, 0xfd, 0x7f, 0xe3, 0xeb, 0xb0, 0xe3, 0x07, 0x2a, 0xc3, + 0x5b, 0xa8, 0xed, 0x6d, 0x60, 0xfb, 0x30, 0xad, 0xe8, 0x4b, 0xe7, 0xec, 0x08, 0x55, 0xd9, 0xb0, + 0xf1, 0x56, 0xa7, 0xe5, 0xb9, 0x33, 0x87, 0x33, 0x5f, 0x2f, 0xd1, 0xcd, 0x6f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x03, 0x0f, 0xb1, 0xb3, 0x57, 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 + +// AuthClient is the client API for Auth service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AuthClient interface { + UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) + UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error) +} + +type authClient struct { + cc *grpc.ClientConn +} + +func NewAuthClient(cc *grpc.ClientConn) AuthClient { + return &authClient{cc} +} + +func (c *authClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) { + out := new(UserRegisterResp) + err := c.cc.Invoke(ctx, "/pbAuth.Auth/UserRegister", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authClient) UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error) { + out := new(UserTokenResp) + err := c.cc.Invoke(ctx, "/pbAuth.Auth/UserToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthServer is the server API for Auth service. +type AuthServer interface { + UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) + UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error) +} + +// UnimplementedAuthServer can be embedded to have forward compatible implementations. +type UnimplementedAuthServer struct { +} + +func (*UnimplementedAuthServer) UserRegister(ctx context.Context, req *UserRegisterReq) (*UserRegisterResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserRegister not implemented") +} +func (*UnimplementedAuthServer) UserToken(ctx context.Context, req *UserTokenReq) (*UserTokenResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserToken not implemented") +} + +func RegisterAuthServer(s *grpc.Server, srv AuthServer) { + s.RegisterService(&_Auth_serviceDesc, srv) +} + +func _Auth_UserRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserRegisterReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServer).UserRegister(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbAuth.Auth/UserRegister", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServer).UserRegister(ctx, req.(*UserRegisterReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Auth_UserToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserTokenReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServer).UserToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbAuth.Auth/UserToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServer).UserToken(ctx, req.(*UserTokenReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Auth_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pbAuth.Auth", + HandlerType: (*AuthServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UserRegister", + Handler: _Auth_UserRegister_Handler, + }, + { + MethodName: "UserToken", + Handler: _Auth_UserToken_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "auth/auth.proto", +} diff --git a/src/proto/auth/auth.proto b/src/proto/auth/auth.proto new file mode 100644 index 000000000..94c664125 --- /dev/null +++ b/src/proto/auth/auth.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; +package pbAuth; +option go_package = "auth;pbAuth"; + +message UserRegisterReq { + string UID = 1; + string Name = 2; + string Icon = 3; + int32 Gender = 4; + string Mobile = 5; + string Birth = 6; + string Email = 7; + string Ex = 8; +} + +message UserRegisterResp { + bool Success = 1; +} + +message UserTokenReq { + int32 Platform = 1; + string UID = 2; +} + +message UserTokenResp { + int32 ErrCode = 1; + string ErrMsg = 2; + string Token = 3; + int64 ExpiredTime = 4; +} + +service Auth { + rpc UserRegister(UserRegisterReq) returns(UserRegisterResp); + rpc UserToken(UserTokenReq) returns(UserTokenResp); +} diff --git a/src/proto/auto_proto.sh b/src/proto/auto_proto.sh new file mode 100644 index 000000000..c4ce363c5 --- /dev/null +++ b/src/proto/auto_proto.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +source ./proto_dir.cfg + +for ((i = 0; i < ${#all_proto[*]}; i++)); do + proto=${all_proto[$i]} + protoc --go_out=plugins=grpc:. $proto + echo "protoc --go_out=plugins=grpc:." $proto +done +echo "proto file generate success..." diff --git a/src/proto/chat/chat.pb.go b/src/proto/chat/chat.pb.go new file mode 100644 index 000000000..fa72d073e --- /dev/null +++ b/src/proto/chat/chat.pb.go @@ -0,0 +1,1180 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: chat/chat.proto + +package pbChat + +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 WSToMsgSvrChatMsg struct { + SendID string `protobuf:"bytes,1,opt,name=SendID,proto3" json:"SendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID,proto3" json:"RecvID,omitempty"` + Content string `protobuf:"bytes,3,opt,name=Content,proto3" json:"Content,omitempty"` + SendTime int64 `protobuf:"varint,4,opt,name=SendTime,proto3" json:"SendTime,omitempty"` + MsgFrom int32 `protobuf:"varint,5,opt,name=MsgFrom,proto3" json:"MsgFrom,omitempty"` + ContentType int32 `protobuf:"varint,6,opt,name=ContentType,proto3" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,7,opt,name=SessionType,proto3" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,8,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,9,opt,name=MsgID,proto3" json:"MsgID,omitempty"` + Token string `protobuf:"bytes,10,opt,name=Token,proto3" json:"Token,omitempty"` + OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo,proto3" json:"OfflineInfo,omitempty"` + Options string `protobuf:"bytes,12,opt,name=Options,proto3" json:"Options,omitempty"` + PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` + ForceList []string `protobuf:"bytes,14,rep,name=ForceList,proto3" json:"ForceList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WSToMsgSvrChatMsg) Reset() { *m = WSToMsgSvrChatMsg{} } +func (m *WSToMsgSvrChatMsg) String() string { return proto.CompactTextString(m) } +func (*WSToMsgSvrChatMsg) ProtoMessage() {} +func (*WSToMsgSvrChatMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{0} +} + +func (m *WSToMsgSvrChatMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WSToMsgSvrChatMsg.Unmarshal(m, b) +} +func (m *WSToMsgSvrChatMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WSToMsgSvrChatMsg.Marshal(b, m, deterministic) +} +func (m *WSToMsgSvrChatMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_WSToMsgSvrChatMsg.Merge(m, src) +} +func (m *WSToMsgSvrChatMsg) XXX_Size() int { + return xxx_messageInfo_WSToMsgSvrChatMsg.Size(m) +} +func (m *WSToMsgSvrChatMsg) XXX_DiscardUnknown() { + xxx_messageInfo_WSToMsgSvrChatMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_WSToMsgSvrChatMsg proto.InternalMessageInfo + +func (m *WSToMsgSvrChatMsg) GetSendID() string { + if m != nil { + return m.SendID + } + return "" +} + +func (m *WSToMsgSvrChatMsg) GetRecvID() string { + if m != nil { + return m.RecvID + } + return "" +} + +func (m *WSToMsgSvrChatMsg) GetContent() string { + if m != nil { + return m.Content + } + return "" +} + +func (m *WSToMsgSvrChatMsg) GetSendTime() int64 { + if m != nil { + return m.SendTime + } + return 0 +} + +func (m *WSToMsgSvrChatMsg) GetMsgFrom() int32 { + if m != nil { + return m.MsgFrom + } + return 0 +} + +func (m *WSToMsgSvrChatMsg) GetContentType() int32 { + if m != nil { + return m.ContentType + } + return 0 +} + +func (m *WSToMsgSvrChatMsg) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *WSToMsgSvrChatMsg) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *WSToMsgSvrChatMsg) GetMsgID() string { + if m != nil { + return m.MsgID + } + return "" +} + +func (m *WSToMsgSvrChatMsg) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *WSToMsgSvrChatMsg) GetOfflineInfo() string { + if m != nil { + return m.OfflineInfo + } + return "" +} + +func (m *WSToMsgSvrChatMsg) GetOptions() string { + if m != nil { + return m.Options + } + return "" +} + +func (m *WSToMsgSvrChatMsg) GetPlatformID() int32 { + if m != nil { + return m.PlatformID + } + return 0 +} + +func (m *WSToMsgSvrChatMsg) GetForceList() []string { + if m != nil { + return m.ForceList + } + return nil +} + +type MsgSvrToPushSvrChatMsg struct { + SendID string `protobuf:"bytes,1,opt,name=SendID,proto3" json:"SendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID,proto3" json:"RecvID,omitempty"` + Content string `protobuf:"bytes,3,opt,name=Content,proto3" json:"Content,omitempty"` + RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq,proto3" json:"RecvSeq,omitempty"` + SendTime int64 `protobuf:"varint,5,opt,name=SendTime,proto3" json:"SendTime,omitempty"` + MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom,proto3" json:"MsgFrom,omitempty"` + ContentType int32 `protobuf:"varint,7,opt,name=ContentType,proto3" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,8,opt,name=SessionType,proto3" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,9,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,10,opt,name=MsgID,proto3" json:"MsgID,omitempty"` + OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo,proto3" json:"OfflineInfo,omitempty"` + Options string `protobuf:"bytes,12,opt,name=Options,proto3" json:"Options,omitempty"` + PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` + IsEmphasize bool `protobuf:"varint,14,opt,name=IsEmphasize,proto3" json:"IsEmphasize,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgSvrToPushSvrChatMsg) Reset() { *m = MsgSvrToPushSvrChatMsg{} } +func (m *MsgSvrToPushSvrChatMsg) String() string { return proto.CompactTextString(m) } +func (*MsgSvrToPushSvrChatMsg) ProtoMessage() {} +func (*MsgSvrToPushSvrChatMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{1} +} + +func (m *MsgSvrToPushSvrChatMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Unmarshal(m, b) +} +func (m *MsgSvrToPushSvrChatMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Marshal(b, m, deterministic) +} +func (m *MsgSvrToPushSvrChatMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSvrToPushSvrChatMsg.Merge(m, src) +} +func (m *MsgSvrToPushSvrChatMsg) XXX_Size() int { + return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Size(m) +} +func (m *MsgSvrToPushSvrChatMsg) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSvrToPushSvrChatMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSvrToPushSvrChatMsg proto.InternalMessageInfo + +func (m *MsgSvrToPushSvrChatMsg) GetSendID() string { + if m != nil { + return m.SendID + } + return "" +} + +func (m *MsgSvrToPushSvrChatMsg) GetRecvID() string { + if m != nil { + return m.RecvID + } + return "" +} + +func (m *MsgSvrToPushSvrChatMsg) GetContent() string { + if m != nil { + return m.Content + } + return "" +} + +func (m *MsgSvrToPushSvrChatMsg) GetRecvSeq() int64 { + if m != nil { + return m.RecvSeq + } + return 0 +} + +func (m *MsgSvrToPushSvrChatMsg) GetSendTime() int64 { + if m != nil { + return m.SendTime + } + return 0 +} + +func (m *MsgSvrToPushSvrChatMsg) GetMsgFrom() int32 { + if m != nil { + return m.MsgFrom + } + return 0 +} + +func (m *MsgSvrToPushSvrChatMsg) GetContentType() int32 { + if m != nil { + return m.ContentType + } + return 0 +} + +func (m *MsgSvrToPushSvrChatMsg) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *MsgSvrToPushSvrChatMsg) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *MsgSvrToPushSvrChatMsg) GetMsgID() string { + if m != nil { + return m.MsgID + } + return "" +} + +func (m *MsgSvrToPushSvrChatMsg) GetOfflineInfo() string { + if m != nil { + return m.OfflineInfo + } + return "" +} + +func (m *MsgSvrToPushSvrChatMsg) GetOptions() string { + if m != nil { + return m.Options + } + return "" +} + +func (m *MsgSvrToPushSvrChatMsg) GetPlatformID() int32 { + if m != nil { + return m.PlatformID + } + return 0 +} + +func (m *MsgSvrToPushSvrChatMsg) GetIsEmphasize() bool { + if m != nil { + return m.IsEmphasize + } + return false +} + +type PullMessageReq struct { + UserID string `protobuf:"bytes,1,opt,name=UserID,proto3" json:"UserID,omitempty"` + SeqBegin int64 `protobuf:"varint,2,opt,name=SeqBegin,proto3" json:"SeqBegin,omitempty"` + SeqEnd int64 `protobuf:"varint,3,opt,name=SeqEnd,proto3" json:"SeqEnd,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } +func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } +func (*PullMessageReq) ProtoMessage() {} +func (*PullMessageReq) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{2} +} + +func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) +} +func (m *PullMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageReq.Marshal(b, m, deterministic) +} +func (m *PullMessageReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageReq.Merge(m, src) +} +func (m *PullMessageReq) XXX_Size() int { + return xxx_messageInfo_PullMessageReq.Size(m) +} +func (m *PullMessageReq) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageReq.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageReq proto.InternalMessageInfo + +func (m *PullMessageReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *PullMessageReq) GetSeqBegin() int64 { + if m != nil { + return m.SeqBegin + } + return 0 +} + +func (m *PullMessageReq) GetSeqEnd() int64 { + if m != nil { + return m.SeqEnd + } + return 0 +} + +func (m *PullMessageReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type PullMessageResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode,proto3" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg,proto3" json:"ErrMsg,omitempty"` + MaxSeq int64 `protobuf:"varint,3,opt,name=MaxSeq,proto3" json:"MaxSeq,omitempty"` + MinSeq int64 `protobuf:"varint,4,opt,name=MinSeq,proto3" json:"MinSeq,omitempty"` + SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=SingleUserMsg,proto3" json:"SingleUserMsg,omitempty"` + GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=GroupUserMsg,proto3" json:"GroupUserMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } +func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } +func (*PullMessageResp) ProtoMessage() {} +func (*PullMessageResp) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{3} +} + +func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) +} +func (m *PullMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageResp.Marshal(b, m, deterministic) +} +func (m *PullMessageResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageResp.Merge(m, src) +} +func (m *PullMessageResp) XXX_Size() int { + return xxx_messageInfo_PullMessageResp.Size(m) +} +func (m *PullMessageResp) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageResp.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageResp proto.InternalMessageInfo + +func (m *PullMessageResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *PullMessageResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *PullMessageResp) GetMaxSeq() int64 { + if m != nil { + return m.MaxSeq + } + return 0 +} + +func (m *PullMessageResp) GetMinSeq() int64 { + if m != nil { + return m.MinSeq + } + return 0 +} + +func (m *PullMessageResp) GetSingleUserMsg() []*GatherFormat { + if m != nil { + return m.SingleUserMsg + } + return nil +} + +func (m *PullMessageResp) GetGroupUserMsg() []*GatherFormat { + if m != nil { + return m.GroupUserMsg + } + return nil +} + +type GetNewSeqReq struct { + UserID string `protobuf:"bytes,1,opt,name=UserID,proto3" json:"UserID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetNewSeqReq) Reset() { *m = GetNewSeqReq{} } +func (m *GetNewSeqReq) String() string { return proto.CompactTextString(m) } +func (*GetNewSeqReq) ProtoMessage() {} +func (*GetNewSeqReq) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{4} +} + +func (m *GetNewSeqReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetNewSeqReq.Unmarshal(m, b) +} +func (m *GetNewSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetNewSeqReq.Marshal(b, m, deterministic) +} +func (m *GetNewSeqReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetNewSeqReq.Merge(m, src) +} +func (m *GetNewSeqReq) XXX_Size() int { + return xxx_messageInfo_GetNewSeqReq.Size(m) +} +func (m *GetNewSeqReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetNewSeqReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetNewSeqReq proto.InternalMessageInfo + +func (m *GetNewSeqReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GetNewSeqReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type GetNewSeqResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode,proto3" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg,proto3" json:"ErrMsg,omitempty"` + Seq int64 `protobuf:"varint,3,opt,name=Seq,proto3" json:"Seq,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetNewSeqResp) Reset() { *m = GetNewSeqResp{} } +func (m *GetNewSeqResp) String() string { return proto.CompactTextString(m) } +func (*GetNewSeqResp) ProtoMessage() {} +func (*GetNewSeqResp) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{5} +} + +func (m *GetNewSeqResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetNewSeqResp.Unmarshal(m, b) +} +func (m *GetNewSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetNewSeqResp.Marshal(b, m, deterministic) +} +func (m *GetNewSeqResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetNewSeqResp.Merge(m, src) +} +func (m *GetNewSeqResp) XXX_Size() int { + return xxx_messageInfo_GetNewSeqResp.Size(m) +} +func (m *GetNewSeqResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetNewSeqResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetNewSeqResp proto.InternalMessageInfo + +func (m *GetNewSeqResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetNewSeqResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetNewSeqResp) GetSeq() int64 { + if m != nil { + return m.Seq + } + return 0 +} + +type GatherFormat struct { + // @inject_tag: json:"id" + ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"id"` + // @inject_tag: json:"list" + List []*MsgFormat `protobuf:"bytes,2,rep,name=List,proto3" json:"list"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GatherFormat) Reset() { *m = GatherFormat{} } +func (m *GatherFormat) String() string { return proto.CompactTextString(m) } +func (*GatherFormat) ProtoMessage() {} +func (*GatherFormat) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{6} +} + +func (m *GatherFormat) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GatherFormat.Unmarshal(m, b) +} +func (m *GatherFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GatherFormat.Marshal(b, m, deterministic) +} +func (m *GatherFormat) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatherFormat.Merge(m, src) +} +func (m *GatherFormat) XXX_Size() int { + return xxx_messageInfo_GatherFormat.Size(m) +} +func (m *GatherFormat) XXX_DiscardUnknown() { + xxx_messageInfo_GatherFormat.DiscardUnknown(m) +} + +var xxx_messageInfo_GatherFormat proto.InternalMessageInfo + +func (m *GatherFormat) GetID() string { + if m != nil { + return m.ID + } + return "" +} + +func (m *GatherFormat) GetList() []*MsgFormat { + if m != nil { + return m.List + } + return nil +} + +type MsgFormat struct { + // @inject_tag: json:"sendID" + SendID string `protobuf:"bytes,1,opt,name=SendID,proto3" json:"sendID"` + // @inject_tag: json:"recvID" + RecvID string `protobuf:"bytes,2,opt,name=RecvID,proto3" json:"recvID"` + // @inject_tag: json:"msgFrom" + MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom,proto3" json:"msgFrom"` + // @inject_tag: json:"contentType" + ContentType int32 `protobuf:"varint,4,opt,name=ContentType,proto3" json:"contentType"` + // @inject_tag: json:"serverMsgID" + ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID,proto3" json:"serverMsgID"` + // @inject_tag: json:"content" + Content string `protobuf:"bytes,6,opt,name=Content,proto3" json:"content"` + // @inject_tag: json:"seq" + Seq int64 `protobuf:"varint,7,opt,name=Seq,proto3" json:"seq"` + // @inject_tag: json:"sendTime" + SendTime int64 `protobuf:"varint,8,opt,name=SendTime,proto3" json:"sendTime"` + // @inject_tag: json:"senderPlatformID" + SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID,proto3" json:"senderPlatformID"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgFormat) Reset() { *m = MsgFormat{} } +func (m *MsgFormat) String() string { return proto.CompactTextString(m) } +func (*MsgFormat) ProtoMessage() {} +func (*MsgFormat) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{7} +} + +func (m *MsgFormat) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgFormat.Unmarshal(m, b) +} +func (m *MsgFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgFormat.Marshal(b, m, deterministic) +} +func (m *MsgFormat) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFormat.Merge(m, src) +} +func (m *MsgFormat) XXX_Size() int { + return xxx_messageInfo_MsgFormat.Size(m) +} +func (m *MsgFormat) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFormat.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFormat proto.InternalMessageInfo + +func (m *MsgFormat) GetSendID() string { + if m != nil { + return m.SendID + } + return "" +} + +func (m *MsgFormat) GetRecvID() string { + if m != nil { + return m.RecvID + } + return "" +} + +func (m *MsgFormat) GetMsgFrom() int32 { + if m != nil { + return m.MsgFrom + } + return 0 +} + +func (m *MsgFormat) GetContentType() int32 { + if m != nil { + return m.ContentType + } + return 0 +} + +func (m *MsgFormat) GetServerMsgID() string { + if m != nil { + return m.ServerMsgID + } + return "" +} + +func (m *MsgFormat) GetContent() string { + if m != nil { + return m.Content + } + return "" +} + +func (m *MsgFormat) GetSeq() int64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *MsgFormat) GetSendTime() int64 { + if m != nil { + return m.SendTime + } + return 0 +} + +func (m *MsgFormat) GetSenderPlatformID() int32 { + if m != nil { + return m.SenderPlatformID + } + return 0 +} + +type UserSendMsgReq struct { + ReqIdentifier int32 `protobuf:"varint,1,opt,name=ReqIdentifier,proto3" json:"ReqIdentifier,omitempty"` + Token string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"` + SendID string `protobuf:"bytes,3,opt,name=SendID,proto3" json:"SendID,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + MsgIncr int32 `protobuf:"varint,5,opt,name=MsgIncr,proto3" json:"MsgIncr,omitempty"` + PlatformID int32 `protobuf:"varint,6,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` + SessionType int32 `protobuf:"varint,7,opt,name=SessionType,proto3" json:"SessionType,omitempty"` + MsgFrom int32 `protobuf:"varint,8,opt,name=MsgFrom,proto3" json:"MsgFrom,omitempty"` + ContentType int32 `protobuf:"varint,9,opt,name=ContentType,proto3" json:"ContentType,omitempty"` + RecvID string `protobuf:"bytes,10,opt,name=RecvID,proto3" json:"RecvID,omitempty"` + ForceList []string `protobuf:"bytes,11,rep,name=ForceList,proto3" json:"ForceList,omitempty"` + Content string `protobuf:"bytes,12,opt,name=Content,proto3" json:"Content,omitempty"` + Options string `protobuf:"bytes,13,opt,name=Options,proto3" json:"Options,omitempty"` + ClientMsgID string `protobuf:"bytes,14,opt,name=ClientMsgID,proto3" json:"ClientMsgID,omitempty"` + OffLineInfo string `protobuf:"bytes,15,opt,name=OffLineInfo,proto3" json:"OffLineInfo,omitempty"` + Ex string `protobuf:"bytes,16,opt,name=Ex,proto3" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} } +func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) } +func (*UserSendMsgReq) ProtoMessage() {} +func (*UserSendMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{8} +} + +func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b) +} +func (m *UserSendMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserSendMsgReq.Marshal(b, m, deterministic) +} +func (m *UserSendMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserSendMsgReq.Merge(m, src) +} +func (m *UserSendMsgReq) XXX_Size() int { + return xxx_messageInfo_UserSendMsgReq.Size(m) +} +func (m *UserSendMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_UserSendMsgReq.DiscardUnknown(m) +} + +var xxx_messageInfo_UserSendMsgReq proto.InternalMessageInfo + +func (m *UserSendMsgReq) GetReqIdentifier() int32 { + if m != nil { + return m.ReqIdentifier + } + return 0 +} + +func (m *UserSendMsgReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *UserSendMsgReq) GetSendID() string { + if m != nil { + return m.SendID + } + return "" +} + +func (m *UserSendMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *UserSendMsgReq) GetMsgIncr() int32 { + if m != nil { + return m.MsgIncr + } + return 0 +} + +func (m *UserSendMsgReq) GetPlatformID() int32 { + if m != nil { + return m.PlatformID + } + return 0 +} + +func (m *UserSendMsgReq) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *UserSendMsgReq) GetMsgFrom() int32 { + if m != nil { + return m.MsgFrom + } + return 0 +} + +func (m *UserSendMsgReq) GetContentType() int32 { + if m != nil { + return m.ContentType + } + return 0 +} + +func (m *UserSendMsgReq) GetRecvID() string { + if m != nil { + return m.RecvID + } + return "" +} + +func (m *UserSendMsgReq) GetForceList() []string { + if m != nil { + return m.ForceList + } + return nil +} + +func (m *UserSendMsgReq) GetContent() string { + if m != nil { + return m.Content + } + return "" +} + +func (m *UserSendMsgReq) GetOptions() string { + if m != nil { + return m.Options + } + return "" +} + +func (m *UserSendMsgReq) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *UserSendMsgReq) GetOffLineInfo() string { + if m != nil { + return m.OffLineInfo + } + return "" +} + +func (m *UserSendMsgReq) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type UserSendMsgResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode,proto3" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg,proto3" json:"ErrMsg,omitempty"` + ReqIdentifier int32 `protobuf:"varint,3,opt,name=ReqIdentifier,proto3" json:"ReqIdentifier,omitempty"` + MsgIncr int32 `protobuf:"varint,4,opt,name=MsgIncr,proto3" json:"MsgIncr,omitempty"` + ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID,proto3" json:"ServerMsgID,omitempty"` + ClientMsgID string `protobuf:"bytes,6,opt,name=ClientMsgID,proto3" json:"ClientMsgID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } +func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } +func (*UserSendMsgResp) ProtoMessage() {} +func (*UserSendMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_767a49518b351716, []int{9} +} + +func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) +} +func (m *UserSendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserSendMsgResp.Marshal(b, m, deterministic) +} +func (m *UserSendMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserSendMsgResp.Merge(m, src) +} +func (m *UserSendMsgResp) XXX_Size() int { + return xxx_messageInfo_UserSendMsgResp.Size(m) +} +func (m *UserSendMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_UserSendMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_UserSendMsgResp proto.InternalMessageInfo + +func (m *UserSendMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *UserSendMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *UserSendMsgResp) GetReqIdentifier() int32 { + if m != nil { + return m.ReqIdentifier + } + return 0 +} + +func (m *UserSendMsgResp) GetMsgIncr() int32 { + if m != nil { + return m.MsgIncr + } + return 0 +} + +func (m *UserSendMsgResp) GetServerMsgID() string { + if m != nil { + return m.ServerMsgID + } + return "" +} + +func (m *UserSendMsgResp) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func init() { + proto.RegisterType((*WSToMsgSvrChatMsg)(nil), "pbChat.WSToMsgSvrChatMsg") + proto.RegisterType((*MsgSvrToPushSvrChatMsg)(nil), "pbChat.MsgSvrToPushSvrChatMsg") + proto.RegisterType((*PullMessageReq)(nil), "pbChat.PullMessageReq") + proto.RegisterType((*PullMessageResp)(nil), "pbChat.PullMessageResp") + proto.RegisterType((*GetNewSeqReq)(nil), "pbChat.GetNewSeqReq") + proto.RegisterType((*GetNewSeqResp)(nil), "pbChat.GetNewSeqResp") + proto.RegisterType((*GatherFormat)(nil), "pbChat.GatherFormat") + proto.RegisterType((*MsgFormat)(nil), "pbChat.MsgFormat") + proto.RegisterType((*UserSendMsgReq)(nil), "pbChat.UserSendMsgReq") + proto.RegisterType((*UserSendMsgResp)(nil), "pbChat.UserSendMsgResp") +} + +func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_767a49518b351716) } + +var fileDescriptor_767a49518b351716 = []byte{ + // 867 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6a, 0xfb, 0x46, + 0x18, 0x45, 0x96, 0x2d, 0x5b, 0x9f, 0xff, 0x25, 0x43, 0x9a, 0x0e, 0xa1, 0x14, 0x21, 0x5a, 0x30, + 0x5d, 0xa4, 0x90, 0x6e, 0x42, 0x0b, 0x5d, 0x24, 0x76, 0x52, 0x41, 0xd4, 0x04, 0xc9, 0xa5, 0xd0, + 0x9d, 0x62, 0x8f, 0x65, 0x51, 0x5b, 0x92, 0x67, 0x94, 0x34, 0xed, 0xa2, 0x37, 0xe8, 0x19, 0x7a, + 0x81, 0x1e, 0xa2, 0xbb, 0x5e, 0xa2, 0x17, 0xf8, 0xdd, 0xe2, 0xc7, 0xcc, 0x48, 0xd6, 0xc8, 0x76, + 0x6c, 0x08, 0x64, 0x63, 0xfc, 0xde, 0xfc, 0xf1, 0xcc, 0x7b, 0xdf, 0xf7, 0xc6, 0xd0, 0x9f, 0xcc, + 0x83, 0xec, 0x6b, 0xfe, 0x71, 0x9e, 0xd2, 0x24, 0x4b, 0x90, 0x91, 0x3e, 0x5e, 0xcf, 0x83, 0xcc, + 0xfe, 0x5b, 0x87, 0xe3, 0x9f, 0xfd, 0x71, 0xe2, 0xb2, 0xd0, 0x7f, 0xa6, 0x9c, 0x72, 0x59, 0x88, + 0x4e, 0xc1, 0xf0, 0x49, 0x3c, 0x75, 0x86, 0x58, 0xb3, 0xb4, 0x81, 0xe9, 0xe5, 0x88, 0xf3, 0x1e, + 0x99, 0x3c, 0x3b, 0x43, 0x5c, 0x93, 0xbc, 0x44, 0x08, 0x43, 0xf3, 0x3a, 0x89, 0x33, 0x12, 0x67, + 0x58, 0x17, 0x03, 0x05, 0x44, 0x67, 0xd0, 0xe2, 0x6b, 0xc7, 0xd1, 0x92, 0xe0, 0xba, 0xa5, 0x0d, + 0x74, 0x6f, 0x8d, 0xf9, 0x2a, 0x97, 0x85, 0x37, 0x34, 0x59, 0xe2, 0x86, 0xa5, 0x0d, 0x1a, 0x5e, + 0x01, 0x91, 0x05, 0xed, 0x7c, 0x83, 0xf1, 0xef, 0x29, 0xc1, 0x86, 0x18, 0x55, 0x29, 0x3e, 0xc3, + 0x27, 0x8c, 0x45, 0x49, 0x2c, 0x66, 0x34, 0xe5, 0x0c, 0x85, 0xe2, 0x33, 0xee, 0x53, 0x42, 0x83, + 0x2c, 0x4a, 0x62, 0x67, 0x88, 0x5b, 0xe2, 0x5c, 0x2a, 0x85, 0x4e, 0xa0, 0xe1, 0xb2, 0xd0, 0x19, + 0x62, 0x53, 0x8c, 0x49, 0xc0, 0xd9, 0x71, 0xf2, 0x2b, 0x89, 0x31, 0x48, 0x56, 0x00, 0xb1, 0xdb, + 0x6c, 0xb6, 0x88, 0x62, 0xe2, 0xc4, 0xb3, 0x04, 0xb7, 0xf3, 0xdd, 0x4a, 0x8a, 0xdf, 0xe6, 0x3e, + 0xe5, 0x3b, 0x33, 0xdc, 0x91, 0x1a, 0xe4, 0x10, 0x7d, 0x0e, 0xf0, 0xb0, 0x08, 0xb2, 0x59, 0x42, + 0x97, 0xce, 0x10, 0x77, 0xc5, 0x51, 0x15, 0x06, 0x7d, 0x06, 0xe6, 0x4d, 0x42, 0x27, 0xe4, 0x2e, + 0x62, 0x19, 0xee, 0x59, 0xfa, 0xc0, 0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 0x19, 0x33, 0xb6, 0xc4, 0x4f, + 0x0a, 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 + +// ChatClient is the client API for Chat service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ChatClient interface { + GetNewSeq(ctx context.Context, in *GetNewSeqReq, opts ...grpc.CallOption) (*GetNewSeqResp, error) + PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error) + UserSendMsg(ctx context.Context, in *UserSendMsgReq, opts ...grpc.CallOption) (*UserSendMsgResp, error) +} + +type chatClient struct { + cc *grpc.ClientConn +} + +func NewChatClient(cc *grpc.ClientConn) ChatClient { + return &chatClient{cc} +} + +func (c *chatClient) GetNewSeq(ctx context.Context, in *GetNewSeqReq, opts ...grpc.CallOption) (*GetNewSeqResp, error) { + out := new(GetNewSeqResp) + err := c.cc.Invoke(ctx, "/pbChat.Chat/GetNewSeq", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chatClient) PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error) { + out := new(PullMessageResp) + err := c.cc.Invoke(ctx, "/pbChat.Chat/PullMessage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chatClient) UserSendMsg(ctx context.Context, in *UserSendMsgReq, opts ...grpc.CallOption) (*UserSendMsgResp, error) { + out := new(UserSendMsgResp) + err := c.cc.Invoke(ctx, "/pbChat.Chat/UserSendMsg", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ChatServer is the server API for Chat service. +type ChatServer interface { + GetNewSeq(context.Context, *GetNewSeqReq) (*GetNewSeqResp, error) + PullMessage(context.Context, *PullMessageReq) (*PullMessageResp, error) + UserSendMsg(context.Context, *UserSendMsgReq) (*UserSendMsgResp, error) +} + +// UnimplementedChatServer can be embedded to have forward compatible implementations. +type UnimplementedChatServer struct { +} + +func (*UnimplementedChatServer) GetNewSeq(ctx context.Context, req *GetNewSeqReq) (*GetNewSeqResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNewSeq not implemented") +} +func (*UnimplementedChatServer) PullMessage(ctx context.Context, req *PullMessageReq) (*PullMessageResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method PullMessage not implemented") +} +func (*UnimplementedChatServer) UserSendMsg(ctx context.Context, req *UserSendMsgReq) (*UserSendMsgResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserSendMsg not implemented") +} + +func RegisterChatServer(s *grpc.Server, srv ChatServer) { + s.RegisterService(&_Chat_serviceDesc, srv) +} + +func _Chat_GetNewSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNewSeqReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).GetNewSeq(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbChat.Chat/GetNewSeq", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).GetNewSeq(ctx, req.(*GetNewSeqReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Chat_PullMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PullMessageReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).PullMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbChat.Chat/PullMessage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).PullMessage(ctx, req.(*PullMessageReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Chat_UserSendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserSendMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).UserSendMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbChat.Chat/UserSendMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).UserSendMsg(ctx, req.(*UserSendMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Chat_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pbChat.Chat", + HandlerType: (*ChatServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetNewSeq", + Handler: _Chat_GetNewSeq_Handler, + }, + { + MethodName: "PullMessage", + Handler: _Chat_PullMessage_Handler, + }, + { + MethodName: "UserSendMsg", + Handler: _Chat_UserSendMsg_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "chat/chat.proto", +} diff --git a/src/proto/chat/chat.proto b/src/proto/chat/chat.proto new file mode 100644 index 000000000..f1171c12b --- /dev/null +++ b/src/proto/chat/chat.proto @@ -0,0 +1,124 @@ +syntax = "proto3"; +package pbChat; +option go_package = "chat;pbChat"; + +message WSToMsgSvrChatMsg{ + string SendID = 1; + string RecvID = 2; + string Content = 3; + int64 SendTime = 4; + int32 MsgFrom = 5; + int32 ContentType = 6; + int32 SessionType = 7; + string OperationID = 8; + string MsgID = 9; + string Token = 10; + string OfflineInfo =11; + string Options = 12; + int32 PlatformID =13; + repeated string ForceList = 14; +} +message MsgSvrToPushSvrChatMsg { + string SendID = 1; + string RecvID = 2; + string Content = 3; + int64 RecvSeq = 4; + int64 SendTime = 5; + int32 MsgFrom = 6; + int32 ContentType = 7; + int32 SessionType = 8; + string OperationID = 9; + string MsgID = 10; + string OfflineInfo = 11; + string Options =12; + int32 PlatformID =13; + bool IsEmphasize = 14; +} + +message PullMessageReq { + string UserID = 1; + int64 SeqBegin = 2; + int64 SeqEnd = 3; + string OperationID = 4; +} + +message PullMessageResp { + int32 ErrCode = 1; + string ErrMsg = 2; + int64 MaxSeq = 3; + int64 MinSeq = 4; + repeated GatherFormat SingleUserMsg = 5; + repeated GatherFormat GroupUserMsg = 6; +} +message GetNewSeqReq { + string UserID = 1; + string OperationID = 2; +} +message GetNewSeqResp { + int32 ErrCode = 1; + string ErrMsg = 2; + int64 Seq = 3; +} +message GatherFormat{ + // @inject_tag: json:"id" + string ID = 1; + // @inject_tag: json:"list" + repeated MsgFormat List = 2;//detail msg +} +message MsgFormat{ + // @inject_tag: json:"sendID" + string SendID = 1; + // @inject_tag: json:"recvID" + string RecvID = 2; + // @inject_tag: json:"msgFrom" + int32 MsgFrom = 3; + // @inject_tag: json:"contentType" + int32 ContentType = 4; + // @inject_tag: json:"serverMsgID" + string ServerMsgID = 5; + // @inject_tag: json:"content" + string Content = 6; + // @inject_tag: json:"seq" + int64 Seq = 7; + // @inject_tag: json:"sendTime" + int64 SendTime = 8; + // @inject_tag: json:"senderPlatformID" + int32 SenderPlatformID = 9; +} + +message UserSendMsgReq { + + int32 ReqIdentifier = 1; + string Token = 2; + string SendID = 3; + string OperationID = 4; + int32 MsgIncr = 5; + int32 PlatformID = 6; + int32 SessionType = 7; + int32 MsgFrom = 8; + int32 ContentType = 9; + string RecvID = 10; + repeated string ForceList = 11; + string Content = 12; + string Options = 13; + string ClientMsgID = 14; + string OffLineInfo = 15; + string Ex = 16; + + +} + +message UserSendMsgResp { + int32 ErrCode = 1; + string ErrMsg = 2; + int32 ReqIdentifier = 3; + int32 MsgIncr = 4; + string ServerMsgID = 5; + string ClientMsgID = 6; + +} +service Chat { + rpc GetNewSeq(GetNewSeqReq) returns(GetNewSeqResp); + rpc PullMessage(PullMessageReq) returns(PullMessageResp); + rpc UserSendMsg(UserSendMsgReq) returns(UserSendMsgResp); +} diff --git a/src/proto/proto_dir.cfg b/src/proto/proto_dir.cfg new file mode 100644 index 000000000..383f545a2 --- /dev/null +++ b/src/proto/proto_dir.cfg @@ -0,0 +1,10 @@ + +all_proto=( + auth/auth.proto + friend/friend.proto + group/group.proto + user/user.proto + chat/chat.proto + push/push.proto + relay/relay.proto +)