This commit is contained in:
wangchuxiao
2023-02-07 18:43:43 +08:00
parent 795a90a194
commit f4baf847ca
6 changed files with 59 additions and 7 deletions
@@ -1,6 +1,8 @@
package unrelation
import (
commonPb "Open_IM/pkg/proto/sdk_ws"
"context"
"strconv"
"strings"
)
@@ -51,3 +53,17 @@ func (e *ExtendMsgSet) SplitSourceIDAndGetIndex() int32 {
index, _ := strconv.Atoi(l[len(l)-1])
return int32(index)
}
type GetAllExtendMsgSetOpts struct {
ExcludeExtendMsgs bool
}
type ExtendMsgSetInterface interface {
CreateExtendMsgSet(ctx context.Context, set *ExtendMsgSet) error
GetAllExtendMsgSet(ctx context.Context, ID string, opts *GetAllExtendMsgSetOpts) (sets []*ExtendMsgSet, err error)
GetExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, maxMsgUpdateTime int64) (*ExtendMsgSet, error)
InsertExtendMsg(ctx context.Context, sourceID string, sessionType int32, msg *ExtendMsg) error
InsertOrUpdateReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*commonPb.KeyValue) error
DeleteReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*commonPb.KeyValue) error
GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, maxMsgUpdateTime int64) (extendMsg *ExtendMsg, err error)
}