Documentation ¶
Index ¶
- Constants
- func BaseResult(ok bool, count int32, msg string, errCode int32, data []*any.Any) (res *v10.Result)
- func ErrorBaseResult(errCode int, msg string) (res *v10.Result)
- func StartServer()
- func StopServer()
- type ApplyService
- type CmdFunc
- type CmdInfo
- type ImCorePrivateService
- type ImCoreService
- func (s *ImCoreService) AckMsg(ctx context.Context, req *v10.AckMsgReq) (res *v10.AckMsgReply, err error)
- func (s *ImCoreService) AckMsgX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) AddContact(ctx context.Context, req *v10.AddContactReq) (res *v10.AddContactReply, err error)
- func (s *ImCoreService) AddContactX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) AddFriend(ctx context.Context, req *v10.AddFriendReq) (res *v10.AddFriendReply, err error)
- func (s *ImCoreService) AddFriendX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Broadcast(ctx context.Context, req *v10.BroadcastReq) (res *v10.BroadcastReply, err error)
- func (s *ImCoreService) BroadcastRoom(ctx context.Context, req *v10.BroadcastRoomReq) (res *v10.BroadcastRoomReply, err error)
- func (s *ImCoreService) BroadcastRoomX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) BroadcastX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) CircleOperate(ctx context.Context, req *v10.CircleAllReq) (res *v10.CircleAllReply, err error)
- func (s *ImCoreService) CircleOperateX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Close(ctx context.Context, req *v10.Empty) (empty *v10.Empty, err error)
- func (s *ImCoreService) CloseX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) ContactOperate(ctx context.Context, req *v10.ContactAllReq) (res *v10.ContactAllReply, err error)
- func (s *ImCoreService) ContactOperateX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) DeleteFriend(ctx context.Context, req *v10.DeleteFriendReq) (res *v10.DeleteFriendReply, err error)
- func (s *ImCoreService) DeleteFriendX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) GenerateQrCode(ctx context.Context, req *v10.GenerateQrCodeReq) (res *v10.GenerateQrCodeReply, err error)
- func (s *ImCoreService) GenerateQrCodeX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Get(ctx context.Context, req *v10.GetOffLineConversationSetReq) (res *v10.GetOffLineConversationSetReply, err error)
- func (s *ImCoreService) GetContact(ctx context.Context, req *v10.GetContactReq) (res *v10.GetContactReply, err error)
- func (s *ImCoreService) GetContactX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) GetFriendList(ctx context.Context, req *v10.GetFriendListReq) (res *v10.GetFriendListReply, err error)
- func (s *ImCoreService) GetFriendListX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) GetMsgHistory(ctx context.Context, req *v10.GetMsgHistoryReq) (res *v10.GetMsgHistoryReply, err error)
- func (s *ImCoreService) GetMsgHistoryX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) GetMsgList(ctx context.Context, req *v10.GetMsgListReq) (res *v10.GetMsgListReply, err error)
- func (s *ImCoreService) GetMsgListX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) GetNotReadConversationSet(ctx context.Context, req *v10.GetNotReadConversationSetReq) (res *v10.GetNotReadConversationSetReply, err error)
- func (s *ImCoreService) GetNotReadConversationSetX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) GetOffLineConversationSet(ctx context.Context, req *v10.GetOffLineConversationSetReq) (res *v10.GetOffLineConversationSetReply, err error)
- func (s *ImCoreService) GetOffLineConversationSetX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) GetUserContacts(ctx context.Context, req *v10.GetUserContactsReq) (res *v10.GetUserContactsReply, err error)
- func (s *ImCoreService) GetUserContactsX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) GetX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Handshake(ctx context.Context, req *v10.HandshakeReq) (res *v10.ServiceDiag, err error)
- func (s *ImCoreService) HandshakeX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) ListContacts(ctx context.Context, req *v10.ListContactsReq) (res *v10.ListContactsReply, err error)
- func (s *ImCoreService) ListContactsX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Login(ctx context.Context, request *v10.AuthReq) (res *v10.AuthReply, err error)
- func (s *ImCoreService) LoginV11(ctx context.Context, req *v10.AuthReq) (res *v10.AuthReply, err error)
- func (s *ImCoreService) LoginV11X(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Nothing(ctx context.Context, req *v10.Empty) (res *v10.Result, err error)
- func (s *ImCoreService) NothingX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Ping(ctx context.Context, req *v10.Empty) (empty *v10.Empty, err error)
- func (s *ImCoreService) PingX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) PooledInvoke(op v10.Op, from WsClientSkel, body []byte) (err error)
- func (s *ImCoreService) PushMsg(ctx context.Context, req *v10.PushMsgReq) (res *v10.PushMsgReply, err error)
- func (s *ImCoreService) PushMsgX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) RefreshToken(ctx context.Context, request *v10.AuthReq) (res *v10.AuthReply, err error)
- func (s *ImCoreService) RefreshTokenV11(ctx context.Context, req *v10.AuthReq) (res *v10.AuthReply, err error)
- func (s *ImCoreService) RefreshTokenV11X(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) RefreshUserInfo(ctx context.Context, request *v10.AuthReq) (res *v10.AuthReply, err error)
- func (s *ImCoreService) RegisterV11(ctx context.Context, req *v10.AuthReq) (res *v10.AuthReply, err error)
- func (s *ImCoreService) RegisterV11X(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) RemoveContact(ctx context.Context, req *v10.RemoveContactReq) (res *v10.RemoveContactReply, err error)
- func (s *ImCoreService) RemoveContactX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Rooms(ctx context.Context, req *v10.RoomsReq) (res *v10.RoomsReply, err error)
- func (s *ImCoreService) RoomsX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) SearchGlobal(ctx context.Context, req *v10.SearchGlobalReq) (res *v10.SearchGlobalReply, err error)
- func (s *ImCoreService) SearchGlobalX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) SendMail(ctx context.Context, req *v10.Empty) (res *v10.Empty, err error)
- func (s *ImCoreService) SendMailX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) SendMsg(ctx context.Context, req *v10.SendMsgReq) (res *v10.SendMsgReply, err error)
- func (s *ImCoreService) SendMsgX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) SendSMS(ctx context.Context, req *v10.Empty) (res *v10.Empty, err error)
- func (s *ImCoreService) SendSMSX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) SetUserContacts(ctx context.Context, req *v10.SetUserContactsReq) (res *v10.SetUserContactsReply, err error)
- func (s *ImCoreService) SetUserContactsX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Shutdown()
- func (s *ImCoreService) Subscribe(ctx context.Context, req *v10.SubscribeReq) (res *v10.SubscribeReply, err error)
- func (s *ImCoreService) SubscribeX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) Unsubscribe(ctx context.Context, req *v10.UnsubscribeReq) (res *v10.UnsubscribeReply, err error)
- func (s *ImCoreService) UnsubscribeX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) UpdateContact(ctx context.Context, req *v10.UpdateContactReq) (res *v10.UpdateContactReply, err error)
- func (s *ImCoreService) UpdateContactX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) UpdateFriend(ctx context.Context, req *v10.UpdateFriendReq) (res *v10.UpdateFriendReply, err error)
- func (s *ImCoreService) UpdateFriendX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) UpdateMsg(ctx context.Context, req *v10.UpdateMsgReq) (res *v10.UpdateMsgReply, err error)
- func (s *ImCoreService) UpdateMsgX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) UpdateUserInfo(ctx context.Context, request *v10.AuthReq) (res *v10.AuthReply, err error)
- func (s *ImCoreService) UploadIdCard(ctx context.Context, req *v10.Empty) (res *v10.Empty, err error)
- func (s *ImCoreService) UploadIdCardX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) UploadVerifyAttachments(ctx context.Context, req *v10.Empty) (res *v10.Empty, err error)
- func (s *ImCoreService) UploadVerifyAttachmentsX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) UserOperate(ctx context.Context, req *v10.UserAllReq) (res *v10.UserAllReply, err error)
- func (s *ImCoreService) UserOperateX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) ValidateToken(ctx context.Context, request *v10.AuthReq) (res *v10.AuthReply, err error)
- func (s *ImCoreService) VerifyIdCard(ctx context.Context, req *v10.Empty) (res *v10.Empty, err error)
- func (s *ImCoreService) VerifyIdCardX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- func (s *ImCoreService) VerifyMobileNumber(ctx context.Context, req *v10.Empty) (res *v10.Empty, err error)
- func (s *ImCoreService) VerifyMobileNumberX(ctx context.Context, req proto.Message) (res proto.Message, err error)
- type Request
- type WsClientSkel
- type XmasPM
Constants ¶
const ( CoreProtocolVersion = "1.1" CoreProtocolVersionInt = 0x010100 GatewayVersionInt = 0x010000 )
const (
CANNOT_FOUND_FWDRS = "Something was wrong. NO fwdrs definition can be FOUND."
)
Variables ¶
This section is empty.
Functions ¶
func BaseResult ¶
Types ¶
type ApplyService ¶
type ApplyService struct { }
func (*ApplyService) FetchApplyByUid ¶
func (*ApplyService) FetchApplyByUid(ctx context.Context, req *v10.ApplyRequest) (*v10.Result, error)
type CmdFunc ¶
type CmdFunc func(from WsClientSkel, body []byte)
type CmdInfo ¶
type CmdInfo struct { Op v10.Op OpAck v10.Op Target func(ctx context.Context, req proto.Message) (res proto.Message, err error) InTemplate func() proto.Message OutTemplate func(op v10.Op, seq uint32, errCode v10.Err) proto.Message // by xmas() }
CmdInfo 为 ws 端提供调用转换。 ws 服务端收到报文后,按照 Op 指令的不同直接调用 ImCoreService.PooledInvoke() 从而实现到GRPC调用的转换
type ImCorePrivateService ¶
type ImCorePrivateService struct { }
var PrivateInstance *ImCorePrivateService
func NewImCorePrivateService ¶
func NewImCorePrivateService() *ImCorePrivateService
func (*ImCorePrivateService) ExchangeNotifyingUsers ¶
func (s *ImCorePrivateService) ExchangeNotifyingUsers(ctx context.Context, req *v10.ExchangeNotifyingUsersReq) (res *v10.ExchangeNotifyingUsersReply, err error)
func (*ImCorePrivateService) Shutdown ¶
func (s *ImCorePrivateService) Shutdown()
type ImCoreService ¶
type ImCoreService struct {
// contains filtered or unexported fields
}
ImCoreService 是 vx-core 的主要 GRPC 服务
var (
Instance *ImCoreService
)
func NewImCoreService ¶
func NewImCoreService() *ImCoreService
func (*ImCoreService) AckMsg ¶
func (s *ImCoreService) AckMsg(ctx context.Context, req *v10.AckMsgReq) (res *v10.AckMsgReply, err error)
func (*ImCoreService) AddContact ¶
func (s *ImCoreService) AddContact(ctx context.Context, req *v10.AddContactReq) (res *v10.AddContactReply, err error)
func (*ImCoreService) AddContactX ¶
func (*ImCoreService) AddFriend ¶
func (s *ImCoreService) AddFriend(ctx context.Context, req *v10.AddFriendReq) (res *v10.AddFriendReply, err error)
func (*ImCoreService) AddFriendX ¶
func (*ImCoreService) Broadcast ¶
func (s *ImCoreService) Broadcast(ctx context.Context, req *v10.BroadcastReq) (res *v10.BroadcastReply, err error)
func (*ImCoreService) BroadcastRoom ¶
func (s *ImCoreService) BroadcastRoom(ctx context.Context, req *v10.BroadcastRoomReq) (res *v10.BroadcastRoomReply, err error)
func (*ImCoreService) BroadcastRoomX ¶
func (*ImCoreService) BroadcastX ¶
func (*ImCoreService) CircleOperate ¶
func (s *ImCoreService) CircleOperate(ctx context.Context, req *v10.CircleAllReq) (res *v10.CircleAllReply, err error)
func (*ImCoreService) CircleOperateX ¶
func (*ImCoreService) ContactOperate ¶
func (s *ImCoreService) ContactOperate(ctx context.Context, req *v10.ContactAllReq) (res *v10.ContactAllReply, err error)
func (*ImCoreService) ContactOperateX ¶
func (*ImCoreService) DeleteFriend ¶
func (s *ImCoreService) DeleteFriend(ctx context.Context, req *v10.DeleteFriendReq) (res *v10.DeleteFriendReply, err error)
func (*ImCoreService) DeleteFriendX ¶
func (*ImCoreService) GenerateQrCode ¶
func (s *ImCoreService) GenerateQrCode(ctx context.Context, req *v10.GenerateQrCodeReq) (res *v10.GenerateQrCodeReply, err error)
func (*ImCoreService) GenerateQrCodeX ¶
func (*ImCoreService) Get ¶
func (s *ImCoreService) Get(ctx context.Context, req *v10.GetOffLineConversationSetReq) (res *v10.GetOffLineConversationSetReply, err error)
func (*ImCoreService) GetContact ¶
func (s *ImCoreService) GetContact(ctx context.Context, req *v10.GetContactReq) (res *v10.GetContactReply, err error)
func (*ImCoreService) GetContactX ¶
func (*ImCoreService) GetFriendList ¶
func (s *ImCoreService) GetFriendList(ctx context.Context, req *v10.GetFriendListReq) (res *v10.GetFriendListReply, err error)
func (*ImCoreService) GetFriendListX ¶
func (*ImCoreService) GetMsgHistory ¶
func (s *ImCoreService) GetMsgHistory(ctx context.Context, req *v10.GetMsgHistoryReq) (res *v10.GetMsgHistoryReply, err error)
func (*ImCoreService) GetMsgHistoryX ¶
func (*ImCoreService) GetMsgList ¶
func (s *ImCoreService) GetMsgList(ctx context.Context, req *v10.GetMsgListReq) (res *v10.GetMsgListReply, err error)
func (*ImCoreService) GetMsgListX ¶
func (*ImCoreService) GetNotReadConversationSet ¶
func (s *ImCoreService) GetNotReadConversationSet(ctx context.Context, req *v10.GetNotReadConversationSetReq) (res *v10.GetNotReadConversationSetReply, err error)
func (*ImCoreService) GetNotReadConversationSetX ¶
func (*ImCoreService) GetOffLineConversationSet ¶
func (s *ImCoreService) GetOffLineConversationSet(ctx context.Context, req *v10.GetOffLineConversationSetReq) (res *v10.GetOffLineConversationSetReply, err error)
func (*ImCoreService) GetOffLineConversationSetX ¶
func (*ImCoreService) GetUserContacts ¶
func (s *ImCoreService) GetUserContacts(ctx context.Context, req *v10.GetUserContactsReq) (res *v10.GetUserContactsReply, err error)
func (*ImCoreService) GetUserContactsX ¶
func (*ImCoreService) Handshake ¶
func (s *ImCoreService) Handshake(ctx context.Context, req *v10.HandshakeReq) (res *v10.ServiceDiag, err error)
func (*ImCoreService) HandshakeX ¶
func (*ImCoreService) ListContacts ¶
func (s *ImCoreService) ListContacts(ctx context.Context, req *v10.ListContactsReq) (res *v10.ListContactsReply, err error)
func (*ImCoreService) ListContactsX ¶
func (*ImCoreService) PooledInvoke ¶
func (s *ImCoreService) PooledInvoke(op v10.Op, from WsClientSkel, body []byte) (err error)
func (*ImCoreService) PushMsg ¶
func (s *ImCoreService) PushMsg(ctx context.Context, req *v10.PushMsgReq) (res *v10.PushMsgReply, err error)
//PushMsg push by key or mid rpc PushMsg (PushMsgReq) returns (PushMsgReply); // Broadcast send to every entity rpc Broadcast (BroadcastReq) returns (BroadcastReply); // BroadcastRoom broadcast to one room rpc BroadcastRoom (BroadcastRoomReq) returns (BroadcastRoomReply); // Rooms get all rooms rpc Rooms (RoomsReq) returns (RoomsReply);
func (*ImCoreService) RefreshToken ¶
func (*ImCoreService) RefreshTokenV11 ¶
func (*ImCoreService) RefreshTokenV11X ¶
func (*ImCoreService) RefreshUserInfo ¶
func (*ImCoreService) RegisterV11 ¶
func (*ImCoreService) RegisterV11X ¶
func (*ImCoreService) RemoveContact ¶
func (s *ImCoreService) RemoveContact(ctx context.Context, req *v10.RemoveContactReq) (res *v10.RemoveContactReply, err error)
func (*ImCoreService) RemoveContactX ¶
func (*ImCoreService) Rooms ¶
func (s *ImCoreService) Rooms(ctx context.Context, req *v10.RoomsReq) (res *v10.RoomsReply, err error)
func (*ImCoreService) SearchGlobal ¶
func (s *ImCoreService) SearchGlobal(ctx context.Context, req *v10.SearchGlobalReq) (res *v10.SearchGlobalReply, err error)
func (*ImCoreService) SearchGlobalX ¶
func (*ImCoreService) SendMsg ¶
func (s *ImCoreService) SendMsg(ctx context.Context, req *v10.SendMsgReq) (res *v10.SendMsgReply, err error)
SendMsg send the message of a client/user's device. rpc SendMsg (SendMsgReq) returns (SendMsgReply)
func (*ImCoreService) SetUserContacts ¶
func (s *ImCoreService) SetUserContacts(ctx context.Context, req *v10.SetUserContactsReq) (res *v10.SetUserContactsReply, err error)
func (*ImCoreService) SetUserContactsX ¶
func (*ImCoreService) Shutdown ¶
func (s *ImCoreService) Shutdown()
func (*ImCoreService) Subscribe ¶
func (s *ImCoreService) Subscribe(ctx context.Context, req *v10.SubscribeReq) (res *v10.SubscribeReply, err error)
rpc Subscribe (SubscribeReq) returns (SubscribeReply); rpc Unsubscribe (UnsubscribeReq) returns (UnsubscribeReply);
func (*ImCoreService) SubscribeX ¶
func (*ImCoreService) Unsubscribe ¶
func (s *ImCoreService) Unsubscribe(ctx context.Context, req *v10.UnsubscribeReq) (res *v10.UnsubscribeReply, err error)
func (*ImCoreService) UnsubscribeX ¶
func (*ImCoreService) UpdateContact ¶
func (s *ImCoreService) UpdateContact(ctx context.Context, req *v10.UpdateContactReq) (res *v10.UpdateContactReply, err error)
func (*ImCoreService) UpdateContactX ¶
func (*ImCoreService) UpdateFriend ¶
func (s *ImCoreService) UpdateFriend(ctx context.Context, req *v10.UpdateFriendReq) (res *v10.UpdateFriendReply, err error)
func (*ImCoreService) UpdateFriendX ¶
func (*ImCoreService) UpdateMsg ¶
func (s *ImCoreService) UpdateMsg(ctx context.Context, req *v10.UpdateMsgReq) (res *v10.UpdateMsgReply, err error)
func (*ImCoreService) UpdateMsgX ¶
func (*ImCoreService) UpdateUserInfo ¶
func (*ImCoreService) UploadIdCard ¶
func (*ImCoreService) UploadIdCardX ¶
func (*ImCoreService) UploadVerifyAttachments ¶
func (*ImCoreService) UploadVerifyAttachmentsX ¶
func (*ImCoreService) UserOperate ¶
func (s *ImCoreService) UserOperate(ctx context.Context, req *v10.UserAllReq) (res *v10.UserAllReply, err error)
func (*ImCoreService) UserOperateX ¶
func (*ImCoreService) ValidateToken ¶
func (*ImCoreService) VerifyIdCard ¶
func (*ImCoreService) VerifyIdCardX ¶
func (*ImCoreService) VerifyMobileNumber ¶
func (*ImCoreService) VerifyMobileNumberX ¶
type Request ¶
type Request struct { CmdInfo *CmdInfo From WsClientSkel InParam []byte }
type WsClientSkel ¶
type WsClientSkel interface {
PostBinaryMsg([]byte) // 向WS客户端写回响应报文
}
Source Files ¶
- apply.service.go
- core.mappings.go
- core.service.auth.go
- core.service.basics.go
- core.service.circle.go
- core.service.go
- core.service.msg.go
- core.service.notifier.go
- core.service.priv.go
- core.service.qrcode.go
- core.service.search.go
- core.service.user.go
- core.service.verifier.go
- core.tool.go
- core.xmas.go
- server.go
- to.go