You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/common/db/controller/msg.go

28 lines
1.2 KiB

2 years ago
package controller
2 years ago
import (
"Open_IM/pkg/proto/msg"
2 years ago
pbMsg "Open_IM/pkg/proto/msg"
"context"
)
type MsgInterface interface {
//消息写入队列
MsgToMQ(ctx context.Context, key string, m *msg.MsgDataToMQ) error
2 years ago
BatchInsertChat2DB(ctx context.Context, userID string, msgList []*pbMsg.MsgDataToMQ, currentMaxSeq uint64) error
BatchInsertChat2Cache(ctx context.Context, insertID string, msgList []*pbMsg.MsgDataToMQ) (error, uint64)
2 years ago
2 years ago
DelMsgBySeqList(ctx context.Context, userID string, seqList []uint32) (totalUnExistSeqList []uint32, err error)
2 years ago
// logic delete
DelMsgLogic(ctx context.Context, userID string, seqList []uint32) error
2 years ago
DelMsgBySeqListInOneDoc(ctx context.Context, docID string, seqList []uint32) (unExistSeqList []uint32, err error)
2 years ago
ReplaceMsgToBlankByIndex(docID string, index int) (replaceMaxSeq uint32, err error)
2 years ago
}
type MsgDatabaseInterface interface {
BatchInsertChat2DB(ctx context.Context, userID string, msgList []*pbMsg.MsgDataToMQ, currentMaxSeq uint64) error
BatchInsertChat2Cache(ctx context.Context, insertID string, msgList []*pbMsg.MsgDataToMQ) (error, uint64)
DelMsgBySeqList(ctx context.Context, userID string, seqList []uint32) (totalUnExistSeqList []uint32, err error)
}