conversation

package
v0.0.0-...-7c02c66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

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

func NewServer

func NewServer(opts ...config.Option) *rpcxServer

Types

type CheckJoinedConversationArgs

type CheckJoinedConversationArgs struct {
	SessionId      string
	ConversationId string
}

检测是否加入会话

type CheckJoinedConversationReply

type CheckJoinedConversationReply struct {
	Joined bool
}

type CreateConversationArgs

type CreateConversationArgs struct {
	ConversationType uint64
	SessionList      []string
}

type CreateConversationReply

type CreateConversationReply struct {
	ConversationID string
}

type GetConversationInfoArgs

type GetConversationInfoArgs 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 JoinConversationArgs struct {
	ConversationID string
	SessionList    []string
}

加入会话

type JoinConversationReply

type JoinConversationReply = CreateConversationReply

type KickoutForConversationArgs

type KickoutForConversationArgs struct {
	SessionId      []string
	ConversationId string
}

移出会话

type KickoutForConversationReply

type KickoutForConversationReply struct {
	Failed []string
}

type SetArchiveConversationsArgs

type SetArchiveConversationsArgs struct {
	ConversationId []string
	IsArchive      bool
}

设置归档会话

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 UpdateConversationLastMsgReply

type UpdateConversationLastMsgReply struct {
}

type UpdateSessionLastRecvMsgArgs

type UpdateSessionLastRecvMsgArgs struct {
	ConversationId string
	LastRecvMsgId  string
	Sessions       []string
}

更新session最后接收的消息

type UpdateSessionLastRecvMsgReply

type UpdateSessionLastRecvMsgReply struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL