Documentation ¶
Index ¶
- Constants
- func NewServer(opts ...config.Option) *rpcxServer
- type CheckJoinedConversationArgs
- type CheckJoinedConversationReply
- type CreateConversationArgs
- type CreateConversationReply
- type GetConversationInfoArgs
- type GetConversationInfoFn
- type GetConversationInfoReply
- type GetConversationSessionsArgs
- type GetConversationSessionsFn
- type GetConversationSessionsReply
- type GetJoinedConversationsArgs
- type GetJoinedConversationsReply
- type GetLastOneMsgIdFromDbArgs
- type GetLastOneMsgIdFromDbReply
- type JoinConversationArgs
- type JoinConversationFn
- type JoinConversationReply
- type KickoutForConversationArgs
- type KickoutForConversationReply
- type SetArchiveConversationsArgs
- type SetArchiveConversationsFn
- type SetArchiveConversationsReply
- type SetDeleteConversationArgs
- type SetDeleteConversationFn
- type SetDeleteConversationReply
- type UpdateConversationLastMsgArgs
- type UpdateConversationLastMsgFn
- type UpdateConversationLastMsgReply
- type UpdateSessionLastRecvMsgArgs
- type UpdateSessionLastRecvMsgFn
- type UpdateSessionLastRecvMsgReply
Constants ¶
View Source
const ( SERVER_NAME = "CONVERSATION_SVC" SERVICE_CREATE_CONVERSATION = "CreateConversation" SERVICE_JOIN_CONVERSATION = "JoinConversation" SERVICE_GET_JOINED_CONVERSATIONS = "GetJoinedConversations" SERVICE_CHECK_JOINED_CONVERSATION = "CheckJoinedConversation" SERVICE_KICKOUT_FOR_CONVERSATION = "KickoutForConversation" SERVICE_GET_CONVERSATION_INFO = "GetConversationInfo" SERVICE_DELETE_CONVERSATIONS = "SetDeleteConversation" SERVICE_ARCHIVE_CONVERSATIONS = "SetArchiveConversations" SERVICE_UPDATE_CONVERSATION_LASTMSG = "UpdateConversationLastMsg" SERVICE_GET_CONVERSATION_SSESSIONS = "GetConversationSessions" SERVICE_UPDATE_SESSIONS_LAST_MSG = "UpdateSessionLastRecvMsg" SERVICE_GET_LASTONE_MSGID_FROM_DB = "GetLastOneMsgFromDb" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CheckJoinedConversationArgs ¶
检测是否加入会话
type CheckJoinedConversationReply ¶
type CheckJoinedConversationReply struct {
Joined bool
}
type CreateConversationArgs ¶
type CreateConversationReply ¶
type CreateConversationReply struct {
ConversationID string
}
type GetConversationInfoFn ¶
type GetConversationInfoFn func(ctx context.Context, args GetConversationInfoArgs, reply *GetConversationInfoReply) error
type GetConversationInfoReply ¶
type GetConversationInfoReply struct {
db.Conversation
}
type GetConversationSessionsArgs ¶
type GetConversationSessionsArgs struct {
ConversationId string
}
type GetConversationSessionsFn ¶
type GetConversationSessionsFn func(ctx context.Context, args GetConversationSessionsArgs, reply *GetConversationSessionsReply) error
type GetConversationSessionsReply ¶
type GetConversationSessionsReply struct {
Sessions []string
}
type GetJoinedConversationsArgs ¶
type GetJoinedConversationsArgs struct {
SessionId string
}
获取加入的会话
type GetJoinedConversationsReply ¶
type GetJoinedConversationsReply struct {
Conversations []string
}
type GetLastOneMsgIdFromDbArgs ¶
type GetLastOneMsgIdFromDbArgs struct {
ConversationID string
}
获取会话最后一条消息
type GetLastOneMsgIdFromDbReply ¶
type GetLastOneMsgIdFromDbReply struct {
MsgId string
}
type JoinConversationArgs ¶
加入会话
type JoinConversationFn ¶
type JoinConversationFn func(context.Context, JoinConversationArgs, *JoinConversationReply) error
type JoinConversationReply ¶
type JoinConversationReply = CreateConversationReply
type KickoutForConversationArgs ¶
移出会话
type KickoutForConversationReply ¶
type KickoutForConversationReply struct {
Failed []string
}
type SetArchiveConversationsArgs ¶
设置归档会话
type SetArchiveConversationsFn ¶
type SetArchiveConversationsFn func(ctx context.Context, args SetArchiveConversationsArgs, reply *SetArchiveConversationsReply) error
type SetArchiveConversationsReply ¶
type SetArchiveConversationsReply struct {
Failed []string
}
type SetDeleteConversationArgs ¶
type SetDeleteConversationArgs struct {
ConversationId []string
}
删除会话(解散,通知到所有用户)
type SetDeleteConversationFn ¶
type SetDeleteConversationFn func(ctx context.Context, args SetDeleteConversationArgs, reply *SetDeleteConversationReply) error
type SetDeleteConversationReply ¶
type SetDeleteConversationReply struct {
Failed []string
}
type UpdateConversationLastMsgArgs ¶
type UpdateConversationLastMsgArgs struct { ConversationId string MsgId string LastTime time.Time LastSendSession string }
更新会话LastMsg
type UpdateConversationLastMsgFn ¶
type UpdateConversationLastMsgFn func(ctx context.Context, args UpdateConversationLastMsgArgs, reply *UpdateConversationLastMsgReply) error
type UpdateConversationLastMsgReply ¶
type UpdateConversationLastMsgReply struct { }
type UpdateSessionLastRecvMsgArgs ¶
type UpdateSessionLastRecvMsgArgs struct { ConversationId string LastRecvMsgId string Sessions []string }
更新session最后接收的消息
type UpdateSessionLastRecvMsgFn ¶
type UpdateSessionLastRecvMsgFn func(context.Context, UpdateSessionLastRecvMsgArgs, *UpdateSessionLastRecvMsgReply) error
type UpdateSessionLastRecvMsgReply ¶
type UpdateSessionLastRecvMsgReply struct { }
Click to show internal directories.
Click to hide internal directories.