Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

 Conflicts:
	cmd/api/main.go
	go.mod
	internal/push/fcm/push.go
	internal/push/getui/push.go
	internal/push/logic/init.go
	internal/push/logic/push_to_client.go
	internal/push/push_rpc_server.go
	internal/rpc/conversation/conversaion.go
	pkg/common/db/controller/group.go
	pkg/proto/push/push.pb.go
This commit is contained in:
wangchuxiao
2023-02-22 19:52:53 +08:00
134 changed files with 3751 additions and 3309 deletions
+35
View File
@@ -99,3 +99,38 @@ type CallbackDeleteMessageReactionExtResp struct {
ResultReactionExtensionList []*msg.KeyValueResp `json:"resultReactionExtensionList"`
MsgFirstModifyTime int64 `json:"msgFirstModifyTime"`
}
type CallbackGetMessageListReactionExtReq struct {
OperationID string `json:"operationID"`
CallbackCommand `json:"callbackCommand"`
SourceID string `json:"sourceID"`
OpUserID string `json:"opUserID"`
SessionType int32 `json:"sessionType"`
TypeKeyList []string `json:"typeKeyList"`
MessageKeyList []*msg.GetMessageListReactionExtensionsReq_MessageReactionKey `json:"messageKeyList"`
}
type CallbackGetMessageListReactionExtResp struct {
CommonCallbackResp
MessageResultList []*msg.SingleMessageExtensionResult `json:"messageResultList"`
}
type CallbackAddMessageReactionExtReq struct {
OperationID string `json:"operationID"`
CallbackCommand `json:"callbackCommand"`
SourceID string `json:"sourceID"`
OpUserID string `json:"opUserID"`
SessionType int32 `json:"sessionType"`
ReactionExtensionList map[string]*sdkws.KeyValue `json:"reactionExtensionList"`
ClientMsgID string `json:"clientMsgID"`
IsReact bool `json:"isReact"`
IsExternalExtensions bool `json:"isExternalExtensions"`
MsgFirstModifyTime int64 `json:"msgFirstModifyTime"`
}
type CallbackAddMessageReactionExtResp struct {
CommonCallbackResp
ResultReactionExtensionList []*msg.KeyValueResp `json:"resultReactionExtensionList"`
IsReact bool `json:"isReact"`
MsgFirstModifyTime int64 `json:"msgFirstModifyTime"`
}
+3 -3
View File
@@ -212,9 +212,9 @@ type config struct {
}
}
Manager struct {
AppManagerUid []string `yaml:"appManagerUid"`
Secrets []string `yaml:"secrets"`
AppSysNotificationName string `yaml:"appSysNotificationName"`
AppManagerUid []string `yaml:"appManagerUid"`
// AppSysNotificationName string `yaml:"appSysNotificationName"`
Nickname []string `yaml:"nickname"`
}
Kafka struct {
+2 -8
View File
@@ -202,6 +202,8 @@ const (
CallbackBeforeSetGroupMemberInfoCommand = "CallbackBeforeSetGroupMemberInfoCommand"
CallbackBeforeSetMessageReactionExtensionCommand = "callbackBeforeSetMessageReactionExtensionCommand"
CallbackBeforeDeleteMessageReactionExtensionsCommand = "callbackBeforeDeleteMessageReactionExtensionsCommand"
CallbackGetMessageListReactionExtensionsCommand = "callbackGetMessageListReactionExtensionsCommand"
CallbackAddMessageListReactionExtensionsCommand = "callbackAddMessageListReactionExtensionsCommand"
//callback actionCode
ActionAllow = 0
@@ -315,16 +317,8 @@ func GroupIsBanPrivateChat(status int32) bool {
return true
}
const (
TokenKicked = 1001
)
const BigVersion = "v2"
const LogFileName = "OpenIM.log"
const StatisticsTimeInterval = 60
const MaxNotificationNum = 500
const CurrentVersion = "v2.3.4-rc0"
+16 -1
View File
@@ -14,7 +14,6 @@ var (
ErrUserIDNotFound = &ErrInfo{UserIDNotFoundError, "UserIDNotFoundError", ""}
ErrGroupIDNotFound = &ErrInfo{GroupIDNotFoundError, "GroupIDNotFoundError", ""}
ErrGroupIDExisted = &ErrInfo{GroupIDNotFoundError, "GroupIDExisted", ""} // todo group id 已存在
ErrGroupIDExisted = &ErrInfo{GroupIDNotFoundError, "GroupIDExisted", ""} // todo group id 已存在
ErrRecordNotFound = &ErrInfo{RecordNotFoundError, "RecordNotFoundError", ""}
@@ -54,6 +53,13 @@ var (
//
ErrMutedInGroup = &ErrInfo{MutedInGroup, "MutedInGroup", ""}
ErrMutedGroup = &ErrInfo{MutedGroup, "MutedGroup", ""}
ErrConnOverMaxNumLimit = &ErrInfo{ConnOverMaxNumLimit, "ConnOverMaxNumLimit", ""}
ErrConnArgsErr = &ErrInfo{ConnArgsErr, "args err, need token, sendID, platformID", ""}
ErrConnUpdateErr = &ErrInfo{ConnArgsErr, "upgrade http conn err", ""}
ErrConfig = &ErrInfo{ConfigError, "ConfigError", ""}
)
const (
@@ -87,6 +93,8 @@ const (
DataError = 90007 //数据错误
IdentityError = 90008 // 身份错误 非管理员token,且token中userID与请求userID不一致
ConfigError = 90009
)
// 账号错误码
@@ -142,6 +150,13 @@ const (
MessageHasReadDisable = 96001
)
// 长连接网关错误码
const (
ConnOverMaxNumLimit = 970001
ConnArgsErr = 970002
ConnUpdateErr = 970003
)
// temp
var (
+3 -1
View File
@@ -1,5 +1,7 @@
package constant
const (
ShowNumber = 1000
ShowNumber = 1000
StatisticsTimeInterval = 60
MaxNotificationNum = 500
)
+6 -22
View File
@@ -1,10 +1,10 @@
package cache
import (
"Open_IM/pkg/common/db/relation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
"encoding/json"
"github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"time"
@@ -26,6 +26,7 @@ type BlackCache interface {
type BlackCacheRedis struct {
expireTime time.Duration
rcClient *rockscache.Client
black *relation.BlackGorm
}
func NewBlackCacheRedis(rdb redis.UniversalClient, blackDB BlackCache, options rockscache.Options) *BlackCacheRedis {
@@ -40,31 +41,14 @@ func (b *BlackCacheRedis) getBlackIDsKey(ownerUserID string) string {
}
func (b *BlackCacheRedis) GetBlackIDs(ctx context.Context, userID string) (blackIDs []string, err error) {
getBlackIDList := func() (string, error) {
blackIDs, err := b.blackDB.GetBlackIDs(ctx, userID)
if err != nil {
return "", utils.Wrap(err, "")
}
bytes, err := json.Marshal(blackIDs)
if err != nil {
return "", utils.Wrap(err, "")
}
return string(bytes), nil
}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "blackIDList", blackIDs)
}()
blackIDListStr, err := b.rcClient.Fetch(blackListCache+userID, b.expireTime, getBlackIDList)
if err != nil {
return nil, utils.Wrap(err, "")
}
err = json.Unmarshal([]byte(blackIDListStr), &blackIDs)
return blackIDs, utils.Wrap(err, "")
return GetCache(ctx, b.rcClient, b.getBlackIDsKey(userID), b.expireTime, func(ctx context.Context) ([]string, error) {
return b.black.FindBlackUserIDs(ctx, userID)
})
}
func (b *BlackCacheRedis) DelBlackIDs(ctx context.Context, userID string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID)
}()
return b.rcClient.TagAsDeleted(blackListCache + userID)
return b.rcClient.TagAsDeleted(b.getBlackIDsKey(userID))
}
+133 -136
View File
@@ -6,10 +6,8 @@ import (
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
"encoding/json"
"github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"golang.org/x/tools/go/ssa/testdata/src/strconv"
"time"
)
@@ -20,6 +18,7 @@ const (
superGroupRecvMsgNotNotifyUserIDsKey = "SUPER_GROUP_RECV_MSG_NOT_NOTIFY_USER_IDS:"
conversationExpireTime = time.Second * 60 * 60 * 12
)
type FuncDB func() (string, error)
// arg fn will exec when no data in cache
@@ -28,13 +27,13 @@ type ConversationCache interface {
GetUserConversationIDs(ctx context.Context, userID string, fn FuncDB) ([]string, error)
// del user's conversationIDs from cache, call when a user add or reduce a conversation
DelUserConversationIDs(ctx context.Context, userID string) error
DelUsersConversationIDs(ctx context.Context,userIDList []string)error
DelUsersConversationIDs(ctx context.Context, userIDList []string) error
// get one conversation from cache
GetConversation(ctx context.Context, ownerUserID, conversationID string, fn FuncDB) (*relationTb.ConversationModel, error)
// get one conversation from cache
GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string, fn FuncDB)([]*relationTb.ConversationModel, error)
GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string, fn FuncDB) ([]*relationTb.ConversationModel, error)
// get one user's all conversations from cache
GetUserAllConversations(ctx context.Context, ownerUserID string, fn FuncDB ) ([]*relationTb.ConversationModel, error)
GetUserAllConversations(ctx context.Context, ownerUserID string, fn FuncDB) ([]*relationTb.ConversationModel, error)
// del one conversation from cache, call when one user's conversation Info changed
DelConversation(ctx context.Context, ownerUserID, conversationID string) error
DelUserConversations(ctx context.Context, ownerUserID string, conversationIDList []string) error
@@ -51,11 +50,47 @@ type ConversationCache interface {
//DelSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string)
}
type ConversationRedis struct {
rcClient *rockscache.Client
func NewConversationRedis(rdb redis.UniversalClient, opts rockscache.Options) ConversationCache {
return &ConversationRedis{rcClient: rockscache.NewClient(rdb, opts)}
}
func (c *ConversationRedis) GetUserConversationIDs(ctx context.Context, userID string, fn func(ctx context.Context, userID string) ([]string, error)) ([]string, error) {
type ConversationRedis struct {
rcClient *rockscache.Client
expireTime time.Duration
}
func (c *ConversationRedis) GetUserConversationIDs(ctx context.Context, userID string, fn FuncDB) ([]string, error) {
//TODO implement me
panic("implement me")
}
func (c *ConversationRedis) GetConversation(ctx context.Context, ownerUserID, conversationID string, fn FuncDB) (*relationTb.ConversationModel, error) {
//TODO implement me
panic("implement me")
}
func (c *ConversationRedis) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string, fn FuncDB) ([]*relationTb.ConversationModel, error) {
//TODO implement me
panic("implement me")
}
func (c *ConversationRedis) GetUserAllConversations(ctx context.Context, ownerUserID string, fn FuncDB) ([]*relationTb.ConversationModel, error) {
//TODO implement me
panic("implement me")
}
func (c *ConversationRedis) DelUserConversations(ctx context.Context, ownerUserID string, conversationIDList []string) error {
//TODO implement me
panic("implement me")
}
func (c *ConversationRedis) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string, fn func(ctx context.Context, ownerUserID string, conversationID string) (opt int, err error)) (opt int, err error) {
//TODO implement me
panic("implement me")
}
func (c *ConversationRedis) GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string, fn func(ctx context.Context, groupID string) (userIDs []string, err error)) (userIDs []string, err error) {
//TODO implement me
panic("implement me")
}
@@ -63,34 +98,10 @@ func (c *ConversationRedis) DelUsersConversationIDs(ctx context.Context, userIDL
panic("implement me")
}
func (c *ConversationRedis) GetConversation(ctx context.Context, ownerUserID, conversationID string, fn func(ctx context.Context, ownerUserID string, conversationID string) (*relationTb.ConversationModel, error)) (*relationTb.ConversationModel, error) {
panic("implement me")
}
func (c *ConversationRedis) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string, fn FuncDB) ([]*relationTb.ConversationModel, error) {
panic("implement me")
}
func (c *ConversationRedis) GetUserAllConversations(ctx context.Context, ownerUserID string, fn FuncDB) ([]*relationTb.ConversationModel, error) {
panic("implement me")
}
func (c *ConversationRedis) DelUsersConversation(ctx context.Context, ownerUserIDList []string, conversationID string) error {
panic("implement me")
}
func (c *ConversationRedis) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string, fn func(ctx context.Context, ownerUserID string, conversationID string) (opt int, err error)) (opt int, err error) {
panic("implement me")
}
func (c *ConversationRedis) GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string, fn func(ctx context.Context, groupID string) (userIDs []string, err error)) (userIDs []string, err error) {
panic("implement me")
}
func NewConversationRedis(rcClient *rockscache.Client) *ConversationRedis {
return &ConversationRedis{rcClient: rcClient}
}
func NewNewConversationRedis(rdb redis.UniversalClient, conversationDB *relation.ConversationGorm, options rockscache.Options) *ConversationRedis {
return &ConversationRedis{rcClient: rockscache.NewClient(rdb, options)}
}
@@ -111,31 +122,31 @@ func (c *ConversationRedis) getSuperGroupRecvNotNotifyUserIDsKey(groupID string)
return superGroupRecvMsgNotNotifyUserIDsKey + groupID
}
func (c *ConversationRedis) GetUserConversationIDs(ctx context.Context, ownerUserID string, f func(userID string) ([]string, error)) (conversationIDs []string, err error) {
//getConversationIDs := func() (string, error) {
// conversationIDs, err := relation.GetConversationIDsByUserID(ownerUserID)
// if err != nil {
// return "", err
// }
// bytes, err := json.Marshal(conversationIDs)
// if err != nil {
// return "", utils.Wrap(err, "")
// }
// return string(bytes), nil
//}
//defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs)
//}()
//conversationIDsStr, err := c.rcClient.Fetch(c.getConversationIDsKey(ownerUserID), time.Second*30*60, getConversationIDs)
//err = json.Unmarshal([]byte(conversationIDsStr), &conversationIDs)
//if err != nil {
// return nil, utils.Wrap(err, "")
//}
//return conversationIDs, nil
return GetCache(ctx, c.rcClient, c.getConversationIDsKey(ownerUserID), conversationExpireTime, func(ctx context.Context) ([]string, error) {
return f(ownerUserID)
})
}
//func (c *ConversationRedis) GetUserConversationIDs(ctx context.Context, ownerUserID string) (conversationIDs []string, err error) {
// //getConversationIDs := func() (string, error) {
// // conversationIDs, err := relation.GetConversationIDsByUserID(ownerUserID)
// // if err != nil {
// // return "", err
// // }
// // bytes, err := json.Marshal(conversationIDs)
// // if err != nil {
// // return "", utils.Wrap(err, "")
// // }
// // return string(bytes), nil
// //}
// //defer func() {
// // tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs)
// //}()
// //conversationIDsStr, err := c.rcClient.Fetch(c.getConversationIDsKey(ownerUserID), time.Second*30*60, getConversationIDs)
// //err = json.Unmarshal([]byte(conversationIDsStr), &conversationIDs)
// //if err != nil {
// // return nil, utils.Wrap(err, "")
// //}
// //return conversationIDs, nil
// return GetCache(ctx, c.rcClient, c.getConversationIDsKey(ownerUserID), conversationExpireTime, func(ctx context.Context) ([]string, error) {
// panic("implement me")
// })
//}
func (c *ConversationRedis) GetUserConversationIDs1(ctx context.Context, ownerUserID string) (conversationIDs []string, err error) {
//getConversationIDs := func() (string, error) {
@@ -158,7 +169,11 @@ func (c *ConversationRedis) GetUserConversationIDs1(ctx context.Context, ownerUs
// return nil, utils.Wrap(err, "")
//}
//return conversationIDs, nil
return GetCache1[[]string](c.rcClient, c.getConversationIDsKey(ownerUserID), conversationExpireTime, fn)
//return GetCache1[[]string](c.rcClient, c.getConversationIDsKey(ownerUserID), conversationExpireTime, fn)
return GetCache(ctx, c.rcClient, c.getConversationIDsKey(ownerUserID), conversationExpireTime, func(ctx context.Context) ([]string, error) {
panic("")
})
}
//func GetCache1[T any](rcClient *rockscache.Client, key string, expire time.Duration, fn func() (any, error)) (T, error) {
@@ -191,29 +206,11 @@ func (c *ConversationRedis) DelUserConversationIDs(ctx context.Context, ownerUse
return utils.Wrap(c.rcClient.TagAsDeleted(c.getConversationIDsKey(ownerUserID)), "DelUserConversationIDs err")
}
func (c *ConversationRedis) GetConversation(ctx context.Context, ownerUserID, conversationID string) (conversation *relationTb.Conversation, err error) {
getConversation := func() (string, error) {
conversation, err := relation.GetConversation(ownerUserID, conversationID)
if err != nil {
return "", err
}
bytes, err := json.Marshal(conversation)
if err != nil {
return "", utils.Wrap(err, "conversation Marshal failed")
}
return string(bytes), nil
}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationID", conversationID, "conversation", *conversation)
}()
conversationStr, err := c.rcClient.Fetch(c.getConversationKey(ownerUserID, conversationID), c.expireTime, getConversation)
if err != nil {
return nil, err
}
conversation = &relationTb.ConversationModel{}
err = json.Unmarshal([]byte(conversationStr), &conversation)
return conversation, utils.Wrap(err, "Unmarshal failed")
}
//func (c *ConversationRedis) GetConversation(ctx context.Context, ownerUserID, conversationID string) (conversation *relationTb.ConversationModel, err error) {
// return GetCache(ctx, c.rcClient, c.getConversationKey(ownerUserID, conversationID), c.expireTime, func(ctx context.Context) (*relationTb.ConversationModel, error) {
// panic("implement me")
// })
//}
func (c *ConversationRedis) DelConversation(ctx context.Context, ownerUserID, conversationID string) (err error) {
defer func() {
@@ -222,73 +219,73 @@ func (c *ConversationRedis) DelConversation(ctx context.Context, ownerUserID, co
return utils.Wrap(c.rcClient.TagAsDeleted(c.getConversationKey(ownerUserID, conversationID)), "DelConversation err")
}
func (c *ConversationRedis) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string) (conversations []relationTb.ConversationModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs, "conversations", conversations)
}()
for _, conversationID := range conversationIDs {
conversation, err := c.GetConversation(ctx, ownerUserID, conversationID)
if err != nil {
return nil, err
}
conversations = append(conversations, *conversation)
}
return conversations, nil
}
//func (c *ConversationRedis) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string) (conversations []relationTb.ConversationModel, err error) {
// defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs, "conversations", conversations)
// }()
// for _, conversationID := range conversationIDs {
// conversation, err := c.GetConversation(ctx, ownerUserID, conversationID)
// if err != nil {
// return nil, err
// }
// conversations = append(conversations, *conversation)
// }
// return conversations, nil
//}
func (c *ConversationRedis) GetUserAllConversations(ctx context.Context, ownerUserID string) (conversations []relationTb.ConversationModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversations", conversations)
}()
IDs, err := c.GetUserConversationIDs(ctx, ownerUserID)
if err != nil {
return nil, err
}
var conversationIDs []relationTb.ConversationModel
for _, conversationID := range IDs {
conversation, err := c.GetConversation(ctx, ownerUserID, conversationID)
if err != nil {
return nil, err
}
conversationIDs = append(conversationIDs, *conversation)
}
return conversationIDs, nil
}
//func (c *ConversationRedis) GetUserAllConversations(ctx context.Context, ownerUserID string) (conversations []relationTb.ConversationModel, err error) {
// defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversations", conversations)
// }()
// IDs, err := c.GetUserConversationIDs(ctx, ownerUserID)
// if err != nil {
// return nil, err
// }
// var conversationIDs []relationTb.ConversationModel
// for _, conversationID := range IDs {
// conversation, err := c.GetConversation(ctx, ownerUserID, conversationID)
// if err != nil {
// return nil, err
// }
// conversationIDs = append(conversationIDs, *conversation)
// }
// return conversationIDs, nil
//}
func (c *ConversationRedis) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) (opt int, err error) {
getConversation := func() (string, error) {
conversation, err := relation.GetConversation(ownerUserID, conversationID)
if err != nil {
return "", err
}
return strconv.Itoa(int(conversation.RecvMsgOpt)), nil
}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationID", conversationID, "opt", opt)
}()
optStr, err := c.rcClient.Fetch(c.getConversationKey(ownerUserID, conversationID), c.expireTime, getConversation)
if err != nil {
return 0, err
}
return strconv.Atoi(optStr)
}
//func (c *ConversationRedis) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) (opt int, err error) {
// //getConversation := func() (string, error) {
// // conversation, err := relation.GetConversation(ownerUserID, conversationID)
// // if err != nil {
// // return "", err
// // }
// // return strconv.Itoa(int(conversation.RecvMsgOpt)), nil
// //}
// //defer func() {
// // tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationID", conversationID, "opt", opt)
// //}()
// //optStr, err := c.rcClient.Fetch(c.getConversationKey(ownerUserID, conversationID), c.expireTime, getConversation)
// //if err != nil {
// // return 0, err
// //}
// //return strconv.Atoi(optStr)
// // panic("implement me")
// return GetCache(ctx, c.rcClient, c.getConversationKey(ownerUserID, conversationID), c.expireTime, func(ctx context.Context) (int, error) {
// panic("implement me")
// })
//}
func (c *ConversationRedis) DelUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) error {
return utils.Wrap(c.rcClient.TagAsDeleted(c.getConversationKey(ownerUserID, conversationID)), "DelUserRecvMsgOpt failed")
}
func (c *ConversationRedis) GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (userIDs []string, err error) {
return nil, nil
}
func (c *ConversationRedis) DelSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (err error) {
return nil
panic("implement me")
}
func (c *ConversationRedis) GetSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) (hash uint32, err error) {
return
panic("implement me")
}
func (c *ConversationRedis) DelSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) {
return
panic("implement me")
}
+32 -24
View File
@@ -19,34 +19,42 @@ type ExtendMsgSetCache struct {
rcClient *rockscache.Client
}
func (e *ExtendMsgSetCache) GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, firstModifyTime int64) (extendMsg *unrelation.ExtendMsg, err error) {
getExtendMsg := func() (string, error) {
extendMsg, err := db.DB.GetExtendMsg(sourceID, sessionType, clientMsgID, firstModifyTime)
if err != nil {
return "", utils.Wrap(err, "GetExtendMsgList failed")
}
bytes, err := json.Marshal(extendMsg)
if err != nil {
return "", utils.Wrap(err, "Marshal failed")
}
return string(bytes), nil
}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "sourceID", sourceID, "sessionType",
sessionType, "clientMsgID", clientMsgID, "firstModifyTime", firstModifyTime, "extendMsg", extendMsg)
}()
extendMsgStr, err := db.DB.Rc.Fetch(extendMsgCache+clientMsgID, time.Second*30*60, getExtendMsg)
if err != nil {
return nil, utils.Wrap(err, "Fetch failed")
}
extendMsg = &mongoDB.ExtendMsg{}
err = json.Unmarshal([]byte(extendMsgStr), extendMsg)
return extendMsg, utils.Wrap(err, "Unmarshal failed")
func (e *ExtendMsgSetCache) getKey(clientMsgID string) string {
return extendMsgCache + clientMsgID
}
func (e *ExtendMsgSetCache) GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, firstModifyTime int64) (extendMsg *unrelation.ExtendMsgModel, err error) {
//getExtendMsg := func() (string, error) {
// extendMsg, err := db.DB.GetExtendMsg(sourceID, sessionType, clientMsgID, firstModifyTime)
// if err != nil {
// return "", utils.Wrap(err, "GetExtendMsgList failed")
// }
// bytes, err := json.Marshal(extendMsg)
// if err != nil {
// return "", utils.Wrap(err, "Marshal failed")
// }
// return string(bytes), nil
//}
//defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "sourceID", sourceID, "sessionType",
// sessionType, "clientMsgID", clientMsgID, "firstModifyTime", firstModifyTime, "extendMsg", extendMsg)
//}()
//extendMsgStr, err := db.DB.Rc.Fetch(extendMsgCache+clientMsgID, time.Second*30*60, getExtendMsg)
//if err != nil {
// return nil, utils.Wrap(err, "Fetch failed")
//}
//extendMsg = &mongoDB.ExtendMsg{}
//err = json.Unmarshal([]byte(extendMsgStr), extendMsg)
//return extendMsg, utils.Wrap(err, "Unmarshal failed")
return GetCache(ctx, e.rcClient, e.getKey(clientMsgID), e.expireTime, func(ctx context.Context) (*unrelation.ExtendMsgModel, error) {
panic("")
})
}
func (e *ExtendMsgSetCache) DelExtendMsg(ctx context.Context, clientMsgID string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "clientMsgID", clientMsgID)
}()
return utils.Wrap(db.DB.Rc.TagAsDeleted(extendMsgCache+clientMsgID), "DelExtendMsg err")
return utils.Wrap(e.rcClient.TagAsDeleted(e.getKey(clientMsgID)), "DelExtendMsg err")
}
+4 -21
View File
@@ -56,27 +56,10 @@ func (f *FriendCacheRedis) getFriendKey(ownerUserID, friendUserID string) string
return friendKey + ownerUserID + "-" + friendUserID
}
func (f *FriendCacheRedis) GetFriendIDs(ctx context.Context, ownerUserID string, fn func(ctx context.Context, ownerUserID string) (friendIDs []string, err error)) (friendIDs []string, err error) {
getFriendIDs := func() (string, error) {
friendIDs, err := f.friendDB.GetFriendIDs(ctx, ownerUserID)
if err != nil {
return "", err
}
bytes, err := json.Marshal(friendIDs)
if err != nil {
return "", utils.Wrap(err, "")
}
return string(bytes), nil
}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendIDs", friendIDs)
}()
friendIDsStr, err := f.rcClient.Fetch(f.getFriendIDsKey(ownerUserID), f.expireTime, getFriendIDs)
if err != nil {
return nil, err
}
err = json.Unmarshal([]byte(friendIDsStr), &friendIDs)
return friendIDs, utils.Wrap(err, "")
func (f *FriendCacheRedis) GetFriendIDs(ctx context.Context, ownerUserID string) (friendIDs []string, err error) {
return GetCache(ctx, f.rcClient, f.getFriendIDsKey(ownerUserID), f.expireTime, func(ctx context.Context) ([]string, error) {
return f.friendDB.FindFriendUserIDs(ctx, ownerUserID)
})
}
func (f *FriendCacheRedis) DelFriendIDs(ctx context.Context, ownerUserID string) (err error) {
+22 -3
View File
@@ -2,7 +2,7 @@ package cache
import (
relationTb "Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/db/unrelation"
unrelation2 "Open_IM/pkg/common/db/table/unrelation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
@@ -51,17 +51,36 @@ type GroupCache interface {
DelGroupMemberNum(ctx context.Context, groupID string) (err error)
}
type GroupCacheRedisInterface interface {
GetGroupsInfo(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error)
GetGroupInfo(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error)
BatchDelJoinedSuperGroupIDs(ctx context.Context, userIDs []string) (err error)
DelJoinedSuperGroupIDs(ctx context.Context, userID string) (err error)
GetJoinedSuperGroupIDs(ctx context.Context, userID string) (joinedSuperGroupIDs []string, err error)
GetGroupMembersHash(ctx context.Context, groupID string) (hashCodeUint64 uint64, err error)
GetGroupMemberHash1(ctx context.Context, groupIDs []string) (map[string]*relationTb.GroupSimpleUserID, error)
DelGroupMembersHash(ctx context.Context, groupID string) (err error)
GetGroupMemberIDs(ctx context.Context, groupID string) (groupMemberIDs []string, err error)
DelGroupMemberIDs(ctx context.Context, groupID string) (err error)
DelJoinedGroupID(ctx context.Context, userID string) (err error)
GetGroupMemberInfo(ctx context.Context, groupID, userID string) (groupMember *relationTb.GroupMemberModel, err error)
DelGroupMemberInfo(ctx context.Context, groupID, userID string) (err error)
DelGroupMemberNum(ctx context.Context, groupID string) (err error)
DelGroupInfo(ctx context.Context, groupID string) (err error)
DelGroupsInfo(ctx context.Context, groupIDs []string) error
}
type GroupCacheRedis struct {
group relationTb.GroupModelInterface
groupMember relationTb.GroupMemberModelInterface
groupRequest relationTb.GroupRequestModelInterface
mongoDB *unrelation.SuperGroupMongoDriver
mongoDB unrelation2.SuperGroupModelInterface
expireTime time.Duration
redisClient *RedisClient
rcClient *rockscache.Client
}
func NewGroupCacheRedis(rdb redis.UniversalClient, groupDB relationTb.GroupModelInterface, groupMemberDB relationTb.GroupMemberModelInterface, groupRequestDB relationTb.GroupRequestModelInterface, mongoClient *unrelation.SuperGroupMongoDriver, opts rockscache.Options) *GroupCacheRedis {
func NewGroupCacheRedis(rdb redis.UniversalClient, groupDB relationTb.GroupModelInterface, groupMemberDB relationTb.GroupMemberModelInterface, groupRequestDB relationTb.GroupRequestModelInterface, mongoClient unrelation2.SuperGroupModelInterface, opts rockscache.Options) GroupCacheRedisInterface {
return &GroupCacheRedis{rcClient: rockscache.NewClient(rdb, opts), expireTime: groupExpireTime,
group: groupDB, groupMember: groupMemberDB, groupRequest: groupRequestDB, redisClient: NewRedisClient(rdb),
mongoDB: mongoClient,
+30 -7
View File
@@ -35,6 +35,8 @@ const (
sendMsgFailedFlag = "SEND_MSG_FAILED_FLAG:"
userBadgeUnreadCountSum = "USER_BADGE_UNREAD_COUNT_SUM:"
exTypeKeyLocker = "EX_LOCK:"
uidPidToken = "UID_PID_TOKEN_STATUS:"
)
type Cache interface {
@@ -52,7 +54,9 @@ type Cache interface {
SetGroupMinSeq(ctx context.Context, groupID string, minSeq int64) error
AddTokenFlag(ctx context.Context, userID string, platformID int, token string, flag int) error
GetTokenMapByUidPid(ctx context.Context, userID, platformID string) (map[string]int, error)
GetTokensWithoutError(ctx context.Context, userID, platformID string) (map[string]int, error)
SetTokenMapByUidPid(ctx context.Context, userID string, platformID int, m map[string]int) error
DeleteTokenByUidPid(ctx context.Context, userID string, platformID int, fields []string) error
GetMessageListBySeq(ctx context.Context, userID string, seqList []int64) (seqMsg []*sdkws.MsgData, failedSeqList []int64, err error)
@@ -139,6 +143,10 @@ func NewRedisClient(rdb redis.UniversalClient) *RedisClient {
return &RedisClient{rdb: rdb}
}
func (r *RedisClient) GetClient() redis.UniversalClient {
return r.rdb
}
// Perform seq auto-increment operation of user messages
func (r *RedisClient) IncrUserSeq(ctx context.Context, uid string) (int64, error) {
key := userIncrSeq + uid
@@ -205,11 +213,12 @@ func (r *RedisClient) SetGroupMinSeq(ctx context.Context, groupID string, minSeq
}
// Store userid and platform class to redis
func (r *RedisClient) AddTokenFlag(ctx context.Context, userID string, platformID int, token string, flag int) error {
key := uidPidToken + userID + ":" + constant.PlatformIDToName(platformID)
func (r *RedisClient) AddTokenFlag(ctx context.Context, userID string, platform string, token string, flag int) error {
key := uidPidToken + userID + ":" + platform
return r.rdb.HSet(context.Background(), key, token, flag).Err()
}
//key:userID+platform-> <token, flag>
func (r *RedisClient) GetTokenMapByUidPid(ctx context.Context, userID, platformID string) (map[string]int, error) {
key := uidPidToken + userID + ":" + platformID
m, err := r.rdb.HGetAll(context.Background(), key).Result()
@@ -219,8 +228,22 @@ func (r *RedisClient) GetTokenMapByUidPid(ctx context.Context, userID, platformI
}
return mm, err
}
func (r *RedisClient) SetTokenMapByUidPid(ctx context.Context, userID string, platformID int, m map[string]int) error {
key := uidPidToken + userID + ":" + constant.PlatformIDToName(platformID)
func (r *RedisClient) GetTokensWithoutError(ctx context.Context, userID, platform string) (map[string]int, error) {
key := uidPidToken + userID + ":" + platform
m, err := r.rdb.HGetAll(context.Background(), key).Result()
if err != nil && err == redis.Nil {
return nil, nil
}
mm := make(map[string]int)
for k, v := range m {
mm[k] = utils.StringToInt(v)
}
return mm, utils.Wrap(err, "")
}
func (r *RedisClient) SetTokenMapByUidPid(ctx context.Context, userID string, platform string, m map[string]int) error {
key := uidPidToken + userID + ":" + platform
mm := make(map[string]interface{})
for k, v := range m {
mm[k] = v
@@ -228,8 +251,8 @@ func (r *RedisClient) SetTokenMapByUidPid(ctx context.Context, userID string, pl
return r.rdb.HSet(context.Background(), key, mm).Err()
}
func (r *RedisClient) DeleteTokenByUidPid(ctx context.Context, userID string, platformID int, fields []string) error {
key := uidPidToken + userID + ":" + constant.PlatformIDToName(platformID)
func (r *RedisClient) DeleteTokenByUidPid(ctx context.Context, userID string, platform string, fields []string) error {
key := uidPidToken + userID + ":" + platform
return r.rdb.HDel(context.Background(), key, fields...).Err()
}
+30 -32
View File
@@ -10,38 +10,36 @@ import (
const scanCount = 3000
func (rc *RcClient) DelKeys() {
for _, key := range []string{"GROUP_CACHE:", "FRIEND_RELATION_CACHE", "BLACK_LIST_CACHE:", "USER_INFO_CACHE:", "GROUP_INFO_CACHE", groupOwnerIDCache, joinedGroupListCache,
groupMemberInfoCache, groupAllMemberInfoCache, "ALL_FRIEND_INFO_CACHE:"} {
fName := utils.GetSelfFuncName()
var cursor uint64
var n int
for {
var keys []string
var err error
keys, cursor, err = rc.rdb.Scan(context.Background(), cursor, key+"*", scanCount).Result()
if err != nil {
panic(err.Error())
}
n += len(keys)
// for each for redis cluster
for _, key := range keys {
if err = rc.rdb.Del(context.Background(), key).Err(); err != nil {
log.NewError("", fName, key, err.Error())
err = rc.rdb.Del(context.Background(), key).Err()
if err != nil {
panic(err.Error())
}
}
}
if cursor == 0 {
break
}
}
}
}
//func (rc *RcClient) DelKeys() {
// for _, key := range []string{"GROUP_CACHE:", "FRIEND_RELATION_CACHE", "BLACK_LIST_CACHE:", "USER_INFO_CACHE:", "GROUP_INFO_CACHE", groupOwnerIDCache, joinedGroupListCache,
// groupMemberInfoCache, groupAllMemberInfoCache, "ALL_FRIEND_INFO_CACHE:"} {
// fName := utils.GetSelfFuncName()
// var cursor uint64
// var n int
// for {
// var keys []string
// var err error
// keys, cursor, err = rc.rdb.Scan(context.Background(), cursor, key+"*", scanCount).Result()
// if err != nil {
// panic(err.Error())
// }
// n += len(keys)
// // for each for redis cluster
// for _, key := range keys {
// if err = rc.rdb.Del(context.Background(), key).Err(); err != nil {
// log.NewError("", fName, key, err.Error())
// err = rc.rdb.Del(context.Background(), key).Err()
// if err != nil {
// panic(err.Error())
// }
// }
// }
// if cursor == 0 {
// break
// }
// }
// }
//}
func GetCache[T any](ctx context.Context, rcClient *rockscache.Client, key string, expire time.Duration, fn func(ctx context.Context) (T, error)) (T, error) {
var t T
+9 -25
View File
@@ -5,14 +5,9 @@ import (
"Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/utils"
"context"
"github.com/go-redis/redis/v8"
"github.com/golang-jwt/jwt/v4"
)
const (
uidPidToken = "UID_PID_TOKEN_STATUS:"
)
type Token interface {
//结果为空 不返回错误
GetTokensWithoutError(ctx context.Context, userID, platform string) (map[string]int, error)
@@ -21,9 +16,9 @@ type Token interface {
}
type TokenRedis struct {
RedisClient *RedisClient
AccessSecret string
AccessExpire int64
redisClient *RedisClient
accessSecret string
accessExpire int64
}
func NewTokenRedis(redisClient *RedisClient, accessSecret string, accessExpire int64) *TokenRedis {
@@ -32,21 +27,12 @@ func NewTokenRedis(redisClient *RedisClient, accessSecret string, accessExpire i
// 结果为空 不返回错误
func (t *TokenRedis) GetTokensWithoutError(ctx context.Context, userID, platform string) (map[string]int, error) {
key := uidPidToken + userID + ":" + platform
m, err := t.RedisClient.GetClient().HGetAll(context.Background(), key).Result()
if err != nil && err == redis.Nil {
return nil, nil
}
mm := make(map[string]int)
for k, v := range m {
mm[k] = utils.StringToInt(v)
}
return mm, utils.Wrap(err, "")
return t.redisClient.GetTokensWithoutError(ctx, userID, platform)
}
// 创建token
func (t *TokenRedis) CreateToken(ctx context.Context, userID string, platform string) (string, error) {
tokens, err := t.GetTokensWithoutError(ctx, userID, platform)
tokens, err := t.redisClient.GetTokensWithoutError(ctx, userID, platform)
if err != nil {
return "", err
}
@@ -58,18 +44,16 @@ func (t *TokenRedis) CreateToken(ctx context.Context, userID string, platform st
}
}
if len(deleteTokenKey) != 0 {
key := uidPidToken + userID + ":" + platform
err := t.RedisClient.GetClient().HDel(context.Background(), key, deleteTokenKey...).Err()
err := t.redisClient.DeleteTokenByUidPid(ctx, userID, platform, deleteTokenKey)
if err != nil {
return "", err
}
}
claims := tokenverify.BuildClaims(userID, platform, t.AccessExpire)
claims := tokenverify.BuildClaims(userID, platform, t.accessExpire)
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
tokenString, err := token.SignedString([]byte(t.AccessSecret))
tokenString, err := token.SignedString([]byte(t.accessSecret))
if err != nil {
return "", utils.Wrap(err, "")
}
key := uidPidToken + userID + ":" + platform
return "", utils.Wrap(t.RedisClient.GetClient().HSet(context.Background(), key, tokenString, constant.NormalToken).Err(), "")
return tokenString, t.redisClient.AddTokenFlag(ctx, userID, platform, tokenString, constant.NormalToken)
}
+7 -7
View File
@@ -73,13 +73,13 @@ func (u *UserCacheRedis) GetUserInfo(ctx context.Context, userID string) (userIn
func (u *UserCacheRedis) GetUsersInfo(ctx context.Context, userIDs []string) ([]*relationTb.UserModel, error) {
var users []*relationTb.UserModel
for _, userID := range userIDs {
user, err := GetUserInfoFromCache(ctx, userID)
if err != nil {
return nil, err
}
users = append(users, user)
}
//for _, userID := range userIDs {
// user, err := GetUserInfoFromCache(ctx, userID)
// if err != nil {
// return nil, err
// }
// users = append(users, user)
//}
return users, nil
}
-1
View File
@@ -9,7 +9,6 @@ import (
type AuthInterface interface {
//结果为空 不返回错误
GetTokensWithoutError(ctx context.Context, userID, platform string) (map[string]int, error)
//创建token
CreateToken(ctx context.Context, userID string, platform string) (string, error)
}
+16 -59
View File
@@ -1,14 +1,14 @@
package controller
import (
relation2 "Open_IM/pkg/common/db/relation"
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/utils"
"context"
"errors"
"gorm.io/gorm"
)
type BlackInterface interface {
type BlackDatabase interface {
// Create 增加黑名单
Create(ctx context.Context, blacks []*relation.BlackModel) (err error)
// Delete 删除黑名单
@@ -19,75 +19,32 @@ type BlackInterface interface {
CheckIn(ctx context.Context, userID1, userID2 string) (inUser1Blacks bool, inUser2Blacks bool, err error)
}
type BlackController struct {
database BlackDatabaseInterface
type blackDatabase struct {
black relation.BlackModelInterface
}
func NewBlackController(db *gorm.DB) *BlackController {
return &BlackController{database: NewBlackDatabase(db)}
func NewBlackDatabase(black relation.BlackModelInterface) BlackDatabase {
return &blackDatabase{black}
}
// Create 增加黑名单
func (b *BlackController) Create(ctx context.Context, blacks []*relation.BlackModel) (err error) {
return b.database.Create(ctx, blacks)
func (b *blackDatabase) Create(ctx context.Context, blacks []*relation.BlackModel) (err error) {
return b.black.Create(ctx, blacks)
}
// Delete 删除黑名单
func (b *BlackController) Delete(ctx context.Context, blacks []*relation.BlackModel) (err error) {
return b.database.Delete(ctx, blacks)
func (b *blackDatabase) Delete(ctx context.Context, blacks []*relation.BlackModel) (err error) {
return b.black.Delete(ctx, blacks)
}
// FindOwnerBlacks 获取黑名单列表
func (b *BlackController) FindOwnerBlacks(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (blackList []*relation.BlackModel, total int64, err error) {
return b.database.FindOwnerBlacks(ctx, ownerUserID, pageNumber, showNumber)
func (b *blackDatabase) FindOwnerBlacks(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (blacks []*relation.BlackModel, total int64, err error) {
return b.black.FindOwnerBlacks(ctx, ownerUserID, pageNumber, showNumber)
}
// CheckIn 检查user2是否在user1的黑名单列表中(inUser1Blacks==true) 检查user1是否在user2的黑名单列表中(inUser2Blacks==true)
func (b *BlackController) CheckIn(ctx context.Context, userID1, userID2 string) (inUser1Blacks bool, inUser2Blacks bool, err error) {
return b.database.CheckIn(ctx, userID1, userID2)
}
type BlackDatabaseInterface interface {
// Create 增加黑名单
Create(ctx context.Context, blacks []*relation.BlackModel) (err error)
// Delete 删除黑名单
Delete(ctx context.Context, blacks []*relation.BlackModel) (err error)
// FindOwnerBlacks 获取黑名单列表
FindOwnerBlacks(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (blacks []*relation.BlackModel, total int64, err error)
// CheckIn 检查user2是否在user1的黑名单列表中(inUser1Blacks==true) 检查user1是否在user2的黑名单列表中(inUser2Blacks==true)
CheckIn(ctx context.Context, userID1, userID2 string) (inUser1Blacks bool, inUser2Blacks bool, err error)
}
type BlackDatabase struct {
sqlDB *relation2.BlackGorm
}
func NewBlackDatabase(db *gorm.DB) *BlackDatabase {
sqlDB := relation2.NewBlackGorm(db)
database := &BlackDatabase{
sqlDB: sqlDB,
}
return database
}
// Create 增加黑名单
func (b *BlackDatabase) Create(ctx context.Context, blacks []*relation.BlackModel) (err error) {
return b.sqlDB.Create(ctx, blacks)
}
// Delete 删除黑名单
func (b *BlackDatabase) Delete(ctx context.Context, blacks []*relation.BlackModel) (err error) {
return b.sqlDB.Delete(ctx, blacks)
}
// FindOwnerBlacks 获取黑名单列表
func (b *BlackDatabase) FindOwnerBlacks(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (blacks []*relation.BlackModel, total int64, err error) {
return b.sqlDB.FindOwnerBlacks(ctx, ownerUserID, pageNumber, showNumber)
}
// CheckIn 检查user2是否在user1的黑名单列表中(inUser1Blacks==true) 检查user1是否在user2的黑名单列表中(inUser2Blacks==true)
func (b *BlackDatabase) CheckIn(ctx context.Context, userID1, userID2 string) (inUser1Blacks bool, inUser2Blacks bool, err error) {
_, err = b.sqlDB.Take(ctx, userID1, userID2)
func (b *blackDatabase) CheckIn(ctx context.Context, userID1, userID2 string) (inUser1Blacks bool, inUser2Blacks bool, err error) {
_, err = b.black.Take(ctx, userID1, userID2)
if err != nil {
if errors.Unwrap(err) != gorm.ErrRecordNotFound {
return
@@ -98,9 +55,9 @@ func (b *BlackDatabase) CheckIn(ctx context.Context, userID1, userID2 string) (i
}
inUser2Blacks = true
_, err = b.sqlDB.Take(ctx, userID2, userID1)
_, err = b.black.Take(ctx, userID2, userID1)
if err != nil {
if errors.Unwrap(err) != gorm.ErrRecordNotFound {
if utils.Unwrap(err) != gorm.ErrRecordNotFound {
return
}
inUser2Blacks = false
+5 -5
View File
@@ -9,7 +9,7 @@ import (
type ChatLogInterface interface {
CreateChatLog(msg pbMsg.MsgDataToMQ) error
GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relation.ChatLog, error)
GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relationTb.ChatLogModel, error)
}
func NewChatLogController(db *gorm.DB) ChatLogInterface {
@@ -24,17 +24,17 @@ func (c *ChatLogController) CreateChatLog(msg pbMsg.MsgDataToMQ) error {
return c.database.CreateChatLog(msg)
}
func (c *ChatLogController) GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relation.ChatLog, error) {
func (c *ChatLogController) GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relationTb.ChatLogModel, error) {
return c.database.GetChatLog(chatLog, pageNumber, showNumber, contentTypeList)
}
type ChatLogDataBaseInterface interface {
CreateChatLog(msg pbMsg.MsgDataToMQ) error
GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relation.ChatLog, error)
GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relationTb.ChatLogModel, error)
}
type ChatLogDataBase struct {
chatLogDB *relationTb.ChatLogModelInterface
chatLogDB relationTb.ChatLogModelInterface
}
func NewChatLogDataBase(db *gorm.DB) ChatLogDataBaseInterface {
@@ -45,6 +45,6 @@ func (c *ChatLogDataBase) CreateChatLog(msg pbMsg.MsgDataToMQ) error {
return c.chatLogDB.Create(msg)
}
func (c *ChatLogDataBase) GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relation.ChatLog, error) {
func (c *ChatLogDataBase) GetChatLog(chatLog *relationTb.ChatLogModel, pageNumber, showNumber int32, contentTypeList []int32) (int64, []relationTb.ChatLogModel, error) {
return c.chatLogDB.GetChatLog(chatLog, pageNumber, showNumber, contentTypeList)
}
+41 -90
View File
@@ -1,6 +1,7 @@
package controller
import (
"Open_IM/internal/tx"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/cache"
"Open_IM/pkg/common/db/relation"
@@ -8,68 +9,8 @@ import (
"Open_IM/pkg/utils"
"context"
"encoding/json"
"gorm.io/gorm"
)
type ConversationInterface interface {
//GetUserIDExistConversation 获取拥有该会话的的用户ID列表
GetUserIDExistConversation(ctx context.Context, userIDList []string, conversationID string) ([]string, error)
//UpdateUserConversationFiled 更新用户该会话的属性信息
UpdateUsersConversationFiled(ctx context.Context, userIDList []string, conversationID string, args map[string]interface{}) error
//CreateConversation 创建一批新的会话
CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error
//SyncPeerUserPrivateConversation 同步对端私聊会话内部保证事务操作
SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error
//FindConversations 根据会话ID获取某个用户的多个会话
FindConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*relationTb.ConversationModel, error)
//GetUserAllConversation 获取一个用户在服务器上所有的会话
GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error)
//SetUserConversations 设置用户多个会话属性,如果会话不存在则创建,否则更新,内部保证原子性
SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error
//SetUsersConversationFiledTx 设置多个用户会话关于某个字段的更新操作,如果会话不存在则创建,否则更新,内部保证事务操作
SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error
}
type ConversationController struct {
database ConversationDataBaseInterface
}
func (c *ConversationController) SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error {
return c.database.SetUsersConversationFiledTx(ctx, userIDList, conversation, filedMap)
}
func NewConversationController(database ConversationDataBaseInterface) *ConversationController {
return &ConversationController{database: database}
}
func (c *ConversationController) GetUserIDExistConversation(ctx context.Context, userIDList []string, conversationID string) ([]string, error) {
return c.database.GetUserIDExistConversation(ctx, userIDList, conversationID)
}
func (c ConversationController) UpdateUsersConversationFiled(ctx context.Context, UserIDList []string, conversationID string, args map[string]interface{}) error {
return c.database.UpdateUsersConversationFiled(ctx, UserIDList, conversationID, args)
}
func (c ConversationController) CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error {
return c.database.CreateConversation(ctx, conversations)
}
func (c ConversationController) SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error {
return c.database.SyncPeerUserPrivateConversationTx(ctx, conversation)
}
func (c ConversationController) FindConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*relationTb.ConversationModel, error) {
return c.database.FindConversations(ctx, ownerUserID, conversationIDs)
}
func (c ConversationController) GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) {
return c.database.GetUserAllConversation(ctx, ownerUserID)
}
func (c ConversationController) SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error {
return c.database.SetUserConversations(ctx, ownerUserID, conversations)
}
var _ ConversationInterface = (*ConversationController)(nil)
type ConversationDataBaseInterface interface {
//GetUserIDExistConversation 获取拥有该会话的的用户ID列表
GetUserIDExistConversation(ctx context.Context, userIDList []string, conversationID string) ([]string, error)
@@ -89,22 +30,29 @@ type ConversationDataBaseInterface interface {
SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error
}
var _ ConversationDataBaseInterface = (*ConversationDataBase)(nil)
func NewConversationDatabase(conversation relation.Conversation, cache cache.ConversationCache, tx tx.Tx) ConversationDataBaseInterface {
return &ConversationDataBase{
conversationDB: conversation,
cache: cache,
tx: tx,
}
}
type ConversationDataBase struct {
conversationDB relation.Conversation
cache cache.ConversationCache
db *gorm.DB
tx tx.Tx
}
func (c ConversationDataBase) SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error {
return c.db.Transaction(func(tx *gorm.DB) error {
haveUserID, err := c.conversationDB.FindUserID(ctx, userIDList, conversation.ConversationID, tx)
func (c *ConversationDataBase) SetUsersConversationFiledTx(ctx context.Context, userIDList []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error {
return c.tx.Transaction(func(tx any) error {
conversationTx := c.conversationDB.NewTx(tx)
haveUserID, err := conversationTx.FindUserID(ctx, userIDList, conversation.ConversationID)
if err != nil {
return err
}
if len(haveUserID) > 0 {
err = c.conversationDB.UpdateByMap(ctx, haveUserID, conversation.ConversationID, filedMap, tx)
err = conversationTx.UpdateByMap(ctx, haveUserID, conversation.ConversationID, filedMap)
if err != nil {
return err
}
@@ -119,7 +67,7 @@ func (c ConversationDataBase) SetUsersConversationFiledTx(ctx context.Context, u
temp.OwnerUserID = v
cList = append(cList, temp)
}
err = c.conversationDB.Create(ctx, cList)
err = conversationTx.Create(ctx, cList)
if err != nil {
return err
}
@@ -137,37 +85,39 @@ func (c ConversationDataBase) SetUsersConversationFiledTx(ctx context.Context, u
})
}
func NewConversationDataBase(db relation.Conversation, cache cache.ConversationCache) *ConversationDataBase {
return &ConversationDataBase{conversationDB: db, cache: cache}
}
func (c ConversationDataBase) GetUserIDExistConversation(ctx context.Context, userIDList []string, conversationID string) ([]string, error) {
func (c *ConversationDataBase) GetUserIDExistConversation(ctx context.Context, userIDList []string, conversationID string) ([]string, error) {
panic("implement me")
}
func (c ConversationDataBase) UpdateUsersConversationFiled(ctx context.Context, UserIDList []string, conversationID string, args map[string]interface{}) error {
func (c *ConversationDataBase) UpdateUsersConversationFiled(ctx context.Context, UserIDList []string, conversationID string, args map[string]interface{}) error {
panic("implement me")
}
func (c ConversationDataBase) CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error {
panic("implement me")
func (c *ConversationDataBase) CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error {
return c.tx.Transaction(func(tx any) error {
if err := c.conversationDB.NewTx(tx).Create(ctx, conversations); err != nil {
return err
}
// clear cache
return nil
})
}
func (c ConversationDataBase) SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error {
return c.db.Transaction(func(tx *gorm.DB) error {
func (c *ConversationDataBase) SyncPeerUserPrivateConversationTx(ctx context.Context, conversation *relationTb.ConversationModel) error {
return c.tx.Transaction(func(tx any) error {
userIDList := []string{conversation.OwnerUserID, conversation.UserID}
haveUserID, err := c.conversationDB.FindUserID(ctx, userIDList, conversation.ConversationID, tx)
conversationTx := c.conversationDB.NewTx(tx)
haveUserID, err := conversationTx.FindUserID(ctx, userIDList, conversation.ConversationID)
if err != nil {
return err
}
filedMap := map[string]interface{}{"is_private_chat": conversation.IsPrivateChat}
if len(haveUserID) > 0 {
err = c.conversationDB.UpdateByMap(ctx, haveUserID, conversation.ConversationID, filedMap, tx)
err = conversationTx.UpdateByMap(ctx, haveUserID, conversation.ConversationID, filedMap)
if err != nil {
return err
}
}
NotUserID := utils.DifferenceString(haveUserID, userIDList)
var cList []*relationTb.ConversationModel
for _, v := range NotUserID {
@@ -204,7 +154,7 @@ func (c ConversationDataBase) SyncPeerUserPrivateConversationTx(ctx context.Cont
})
}
func (c ConversationDataBase) FindConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*relationTb.ConversationModel, error) {
func (c *ConversationDataBase) FindConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*relationTb.ConversationModel, error) {
getConversation := func() (string, error) {
conversationList, err := c.conversationDB.Find(ctx, ownerUserID, conversationIDs)
if err != nil {
@@ -219,7 +169,7 @@ func (c ConversationDataBase) FindConversations(ctx context.Context, ownerUserID
return c.cache.GetConversations(ctx, ownerUserID, conversationIDs, getConversation)
}
func (c ConversationDataBase) GetConversation(ctx context.Context, ownerUserID string, conversationID string) (*relationTb.ConversationModel, error) {
func (c *ConversationDataBase) GetConversation(ctx context.Context, ownerUserID string, conversationID string) (*relationTb.ConversationModel, error) {
getConversation := func() (string, error) {
conversationList, err := c.conversationDB.Take(ctx, ownerUserID, conversationID)
if err != nil {
@@ -234,7 +184,7 @@ func (c ConversationDataBase) GetConversation(ctx context.Context, ownerUserID s
return c.cache.GetConversation(ctx, ownerUserID, conversationID, getConversation)
}
func (c ConversationDataBase) GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) {
func (c *ConversationDataBase) GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) {
getConversationIDList := func() (string, error) {
conversationIDList, err := c.conversationDB.FindUserIDAllConversationID(ctx, ownerUserID)
if err != nil {
@@ -252,27 +202,28 @@ func (c ConversationDataBase) GetUserAllConversation(ctx context.Context, ownerU
}
var conversations []*relationTb.ConversationModel
for _, conversationID := range conversationIDList {
conversation, tErr := c.GetConversation(ctx, ownerUserID, conversationID)
if tErr != nil {
return nil, utils.Wrap(tErr, "GetConversation failed")
conversation, err := c.GetConversation(ctx, ownerUserID, conversationID)
if err != nil {
return nil, utils.Wrap(err, "GetConversation failed")
}
conversations = append(conversations, conversation)
}
return conversations, nil
}
func (c ConversationDataBase) SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error {
return c.db.Transaction(func(tx *gorm.DB) error {
func (c *ConversationDataBase) SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error {
return c.tx.Transaction(func(tx any) error {
var conversationIDList []string
for _, conversation := range conversations {
conversationIDList = append(conversationIDList, conversation.ConversationID)
}
haveConversations, err := c.conversationDB.Find(ctx, ownerUserID, conversationIDList, tx)
conversationTx := c.conversationDB.NewTx(tx)
haveConversations, err := conversationTx.Find(ctx, ownerUserID, conversationIDList)
if err != nil {
return err
}
if len(haveConversations) > 0 {
err = c.conversationDB.Update(ctx, conversations, tx)
err = conversationTx.Update(ctx, conversations)
if err != nil {
return err
}
+3 -3
View File
@@ -88,12 +88,12 @@ func (e *ExtendMsgDatabase) InsertExtendMsg(ctx context.Context, sourceID string
}
func (e *ExtendMsgDatabase) InsertOrUpdateReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*sdkws.KeyValue) error {
return e.InsertOrUpdateReactionExtendMsgSet(ctx, sourceID, sessionType, clientMsgID, msgFirstModifyTime, reactionExtensionList)
return e.model.InsertOrUpdateReactionExtendMsgSet(ctx, sourceID, sessionType, clientMsgID, msgFirstModifyTime, reactionExtensionList)
}
func (e *ExtendMsgDatabase) DeleteReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*sdkws.KeyValue) error {
return e.DeleteReactionExtendMsgSet(ctx, sourceID, sessionType, clientMsgID, msgFirstModifyTime, reactionExtensionList)
return e.model.DeleteReactionExtendMsgSet(ctx, sourceID, sessionType, clientMsgID, msgFirstModifyTime, reactionExtensionList)
}
func (e *ExtendMsgDatabase) GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, maxMsgUpdateTime int64) (extendMsg *unRelationTb.ExtendMsgModel, err error) {
return e.GetExtendMsg(ctx, sourceID, sessionType, clientMsgID, maxMsgUpdateTime)
return e.model.TakeExtendMsg(ctx, sourceID, sessionType, clientMsgID, maxMsgUpdateTime)
}
+36 -130
View File
@@ -1,8 +1,8 @@
package controller
import (
"Open_IM/internal/tx"
"Open_IM/pkg/common/constant"
relation1 "Open_IM/pkg/common/db/relation"
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/utils"
"context"
@@ -10,102 +10,7 @@ import (
"gorm.io/gorm"
)
type FriendInterface interface {
// 检查user2是否在user1的好友列表中(inUser1Friends==true) 检查user1是否在user2的好友列表中(inUser2Friends==true)
CheckIn(ctx context.Context, user1, user2 string) (inUser1Friends bool, inUser2Friends bool, err error)
// 增加或者更新好友申请 如果之前有记录则更新,没有记录则新增
AddFriendRequest(ctx context.Context, fromUserID, toUserID string, reqMsg string, ex string) (err error)
// (1)先判断是否在好友表 (在不在都不返回错误) (2)对于不在好友列表的 插入即可
BecomeFriends(ctx context.Context, ownerUserID string, friendUserIDs []string, addSource int32, OperatorUserID string) (err error)
// 拒绝好友申请 (1)检查是否有申请记录且为未处理状态 (没有记录返回错误) (2)修改申请记录 已拒绝
RefuseFriendRequest(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error)
// 同意好友申请 (1)检查是否有申请记录且为未处理状态 (没有记录返回错误) (2)检查是否好友(不返回错误) (3) 不是好友则建立双向好友关系 (4)修改申请记录 已同意
AgreeFriendRequest(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error)
// 删除好友 外部判断是否好友关系
Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error)
// 更新好友备注 零值也支持
UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error)
// 获取ownerUserID的好友列表 无结果不返回错误
PageOwnerFriends(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error)
// friendUserID在哪些人的好友列表中
PageInWhoseFriends(ctx context.Context, friendUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error)
// 获取我发出去的好友申请 无结果不返回错误
PageFriendRequestFromMe(ctx context.Context, userID string, pageNumber, showNumber int32) (friends []*relation.FriendRequestModel, total int64, err error)
// 获取我收到的的好友申请 无结果不返回错误
PageFriendRequestToMe(ctx context.Context, userID string, pageNumber, showNumber int32) (friends []*relation.FriendRequestModel, total int64, err error)
// 获取某人指定好友的信息 如果有一个不存在也返回错误
FindFriendsWithError(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*relation.FriendModel, err error)
}
type FriendController struct {
database FriendDatabaseInterface
}
func NewFriendController(db *gorm.DB) *FriendController {
return &FriendController{database: NewFriendDatabase(db)}
}
// 检查user2是否在user1的好友列表中(inUser1Friends==true) 检查user1是否在user2的好友列表中(inUser2Friends==true)
func (f *FriendController) CheckIn(ctx context.Context, user1, user2 string) (inUser1Friends bool, inUser2Friends bool, err error) {
return f.database.CheckIn(ctx, user1, user2)
}
// AddFriendRequest 增加或者更新好友申请
func (f *FriendController) AddFriendRequest(ctx context.Context, fromUserID, toUserID string, reqMsg string, ex string) (err error) {
return f.database.AddFriendRequest(ctx, fromUserID, toUserID, reqMsg, ex)
}
// BecomeFriend 先判断是否在好友表,如果在则不插入
func (f *FriendController) BecomeFriends(ctx context.Context, ownerUserID string, friendUserIDs []string, addSource int32, OperatorUserID string) (err error) {
return f.database.BecomeFriends(ctx, ownerUserID, friendUserIDs, addSource, OperatorUserID)
}
// RefuseFriendRequest 拒绝好友申请
func (f *FriendController) RefuseFriendRequest(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error) {
return f.database.RefuseFriendRequest(ctx, friendRequest)
}
// AgreeFriendRequest 同意好友申请
func (f *FriendController) AgreeFriendRequest(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error) {
return f.database.AgreeFriendRequest(ctx, friendRequest)
}
// Delete 删除好友
func (f *FriendController) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error) {
return f.database.Delete(ctx, ownerUserID, friendUserIDs)
}
// UpdateRemark 更新好友备注
func (f *FriendController) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error) {
return f.database.UpdateRemark(ctx, ownerUserID, friendUserID, remark)
}
// FindOwnerFriends 获取ownerUserID的好友列表
func (f *FriendController) PageOwnerFriends(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error) {
return f.database.PageOwnerFriends(ctx, ownerUserID, pageNumber, showNumber)
}
// FindInWhoseFriends friendUserID在哪些人的好友列表中
func (f *FriendController) PageInWhoseFriends(ctx context.Context, friendUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error) {
return f.database.PageInWhoseFriends(ctx, friendUserID, pageNumber, showNumber)
}
// FindFriendRequestFromMe 获取我发出去的好友申请
func (f *FriendController) PageFriendRequestFromMe(ctx context.Context, userID string, pageNumber, showNumber int32) (friends []*relation.FriendRequestModel, total int64, err error) {
return f.database.PageFriendRequestFromMe(ctx, userID, pageNumber, showNumber)
}
// FindFriendRequestToMe 获取我收到的的好友申请
func (f *FriendController) PageFriendRequestToMe(ctx context.Context, userID string, pageNumber, showNumber int32) (friends []*relation.FriendRequestModel, total int64, err error) {
return f.database.PageFriendRequestToMe(ctx, userID, pageNumber, showNumber)
}
// FindFriends 获取某人指定好友的信息
func (f *FriendController) FindFriendsWithError(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*relation.FriendModel, err error) {
return f.database.FindFriendsWithError(ctx, ownerUserID, friendUserIDs)
}
type FriendDatabaseInterface interface {
type FriendDatabase interface {
// 检查user2是否在user1的好友列表中(inUser1Friends==true) 检查user1是否在user2的好友列表中(inUser2Friends==true)
CheckIn(ctx context.Context, user1, user2 string) (inUser1Friends bool, inUser2Friends bool, err error)
// 增加或者更新好友申请
@@ -132,17 +37,18 @@ type FriendDatabaseInterface interface {
FindFriendsWithError(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*relation.FriendModel, err error)
}
type FriendDatabase struct {
friend *relation1.FriendGorm
friendRequest *relation1.FriendRequestGorm
type friendDatabase struct {
friend relation.FriendModelInterface
friendRequest relation.FriendRequestModelInterface
tx tx.Tx
}
func NewFriendDatabase(db *gorm.DB) *FriendDatabase {
return &FriendDatabase{friend: relation1.NewFriendGorm(db), friendRequest: relation1.NewFriendRequestGorm(db)}
func NewFriendDatabase(friend relation.FriendModelInterface, friendRequest relation.FriendRequestModelInterface, tx tx.Tx) FriendDatabase {
return &friendDatabase{friend: friend, friendRequest: friendRequest, tx: tx}
}
// ok 检查user2是否在user1的好友列表中(inUser1Friends==true) 检查user1是否在user2的好友列表中(inUser2Friends==true)
func (f *FriendDatabase) CheckIn(ctx context.Context, userID1, userID2 string) (inUser1Friends bool, inUser2Friends bool, err error) {
func (f *friendDatabase) CheckIn(ctx context.Context, userID1, userID2 string) (inUser1Friends bool, inUser2Friends bool, err error) {
friends, err := f.friend.FindUserState(ctx, userID1, userID2)
if err != nil {
return false, false, err
@@ -159,9 +65,9 @@ func (f *FriendDatabase) CheckIn(ctx context.Context, userID1, userID2 string) (
}
// 增加或者更新好友申请 如果之前有记录则更新,没有记录则新增
func (f *FriendDatabase) AddFriendRequest(ctx context.Context, fromUserID, toUserID string, reqMsg string, ex string) (err error) {
return f.friendRequest.DB.Transaction(func(tx *gorm.DB) error {
_, err := f.friendRequest.Take(ctx, fromUserID, toUserID, tx)
func (f *friendDatabase) AddFriendRequest(ctx context.Context, fromUserID, toUserID string, reqMsg string, ex string) (err error) {
return f.tx.Transaction(func(tx any) error {
_, err := f.friendRequest.NewTx(tx).Take(ctx, fromUserID, toUserID)
//有db错误
if err != nil && errors.Unwrap(err) != gorm.ErrRecordNotFound {
return err
@@ -173,13 +79,13 @@ func (f *FriendDatabase) AddFriendRequest(ctx context.Context, fromUserID, toUse
m["handle_msg"] = ""
m["req_msg"] = reqMsg
m["ex"] = ex
if err := f.friendRequest.UpdateByMap(ctx, fromUserID, toUserID, m, tx); err != nil {
if err := f.friendRequest.NewTx(tx).UpdateByMap(ctx, fromUserID, toUserID, m); err != nil {
return err
}
return nil
}
//gorm.ErrRecordNotFound 错误,则新增
if err := f.friendRequest.Create(ctx, []*relation.FriendRequestModel{&relation.FriendRequestModel{FromUserID: fromUserID, ToUserID: toUserID, ReqMsg: reqMsg, Ex: ex}}, tx); err != nil {
if err := f.friendRequest.NewTx(tx).Create(ctx, []*relation.FriendRequestModel{&relation.FriendRequestModel{FromUserID: fromUserID, ToUserID: toUserID, ReqMsg: reqMsg, Ex: ex}}); err != nil {
return err
}
return nil
@@ -187,10 +93,10 @@ func (f *FriendDatabase) AddFriendRequest(ctx context.Context, fromUserID, toUse
}
// (1)先判断是否在好友表 (在不在都不返回错误) (2)对于不在好友列表的 插入即可
func (f *FriendDatabase) BecomeFriends(ctx context.Context, ownerUserID string, friendUserIDs []string, addSource int32, OperatorUserID string) (err error) {
return f.friend.DB.Transaction(func(tx *gorm.DB) error {
func (f *friendDatabase) BecomeFriends(ctx context.Context, ownerUserID string, friendUserIDs []string, addSource int32, OperatorUserID string) (err error) {
return f.tx.Transaction(func(tx any) error {
//先find 找出重复的 去掉重复的
fs1, err := f.friend.FindFriends(ctx, ownerUserID, friendUserIDs, tx)
fs1, err := f.friend.NewTx(tx).FindFriends(ctx, ownerUserID, friendUserIDs)
if err != nil {
return err
}
@@ -201,12 +107,12 @@ func (f *FriendDatabase) BecomeFriends(ctx context.Context, ownerUserID string,
return e.FriendUserID
})
err = f.friend.Create(ctx, fs11, tx)
err = f.friend.NewTx(tx).Create(ctx, fs11)
if err != nil {
return err
}
fs2, err := f.friend.FindReversalFriends(ctx, ownerUserID, friendUserIDs, tx)
fs2, err := f.friend.NewTx(tx).FindReversalFriends(ctx, ownerUserID, friendUserIDs)
if err != nil {
return err
}
@@ -216,7 +122,7 @@ func (f *FriendDatabase) BecomeFriends(ctx context.Context, ownerUserID string,
fs22 := utils.DistinctAny(fs2, func(e *relation.FriendModel) string {
return e.OwnerUserID
})
err = f.friend.Create(ctx, fs22, tx)
err = f.friend.NewTx(tx).Create(ctx, fs22)
if err != nil {
return err
}
@@ -225,7 +131,7 @@ func (f *FriendDatabase) BecomeFriends(ctx context.Context, ownerUserID string,
}
// 拒绝好友申请 (1)检查是否有申请记录且为未处理状态 (没有记录返回错误) (2)修改申请记录 已拒绝
func (f *FriendDatabase) RefuseFriendRequest(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error) {
func (f *friendDatabase) RefuseFriendRequest(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error) {
_, err = f.friendRequest.Take(ctx, friendRequest.FromUserID, friendRequest.ToUserID)
if err != nil {
return err
@@ -239,15 +145,15 @@ func (f *FriendDatabase) RefuseFriendRequest(ctx context.Context, friendRequest
}
// 同意好友申请 (1)检查是否有申请记录且为未处理状态 (没有记录返回错误) (2)检查是否好友(不返回错误) (3) 不是好友则建立双向好友关系 (4)修改申请记录 已同意
func (f *FriendDatabase) AgreeFriendRequest(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error) {
return f.friend.DB.Transaction(func(tx *gorm.DB) error {
_, err = f.friendRequest.Take(ctx, friendRequest.FromUserID, friendRequest.ToUserID)
func (f *friendDatabase) AgreeFriendRequest(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error) {
return f.tx.Transaction(func(tx any) error {
_, err = f.friendRequest.NewTx(tx).Take(ctx, friendRequest.FromUserID, friendRequest.ToUserID)
if err != nil {
return err
}
friendRequest.HandlerUserID = friendRequest.FromUserID
friendRequest.HandleResult = constant.FriendResponseAgree
err = f.friendRequest.Update(ctx, []*relation.FriendRequestModel{friendRequest}, tx)
err = f.friendRequest.NewTx(tx).Update(ctx, []*relation.FriendRequestModel{friendRequest})
if err != nil {
return err
}
@@ -257,7 +163,7 @@ func (f *FriendDatabase) AgreeFriendRequest(ctx context.Context, friendRequest *
addSource := int32(constant.BecomeFriendByApply)
OperatorUserID := friendRequest.FromUserID
//先find 找出重复的 去掉重复的
fs1, err := f.friend.FindFriends(ctx, ownerUserID, friendUserIDs, tx)
fs1, err := f.friend.NewTx(tx).FindFriends(ctx, ownerUserID, friendUserIDs)
if err != nil {
return err
}
@@ -268,12 +174,12 @@ func (f *FriendDatabase) AgreeFriendRequest(ctx context.Context, friendRequest *
return e.FriendUserID
})
err = f.friend.Create(ctx, fs11, tx)
err = f.friend.NewTx(tx).Create(ctx, fs11)
if err != nil {
return err
}
fs2, err := f.friend.FindReversalFriends(ctx, ownerUserID, friendUserIDs, tx)
fs2, err := f.friend.NewTx(tx).FindReversalFriends(ctx, ownerUserID, friendUserIDs)
if err != nil {
return err
}
@@ -283,7 +189,7 @@ func (f *FriendDatabase) AgreeFriendRequest(ctx context.Context, friendRequest *
fs22 := utils.DistinctAny(fs2, func(e *relation.FriendModel) string {
return e.OwnerUserID
})
err = f.friend.Create(ctx, fs22, tx)
err = f.friend.NewTx(tx).Create(ctx, fs22)
if err != nil {
return err
}
@@ -292,37 +198,37 @@ func (f *FriendDatabase) AgreeFriendRequest(ctx context.Context, friendRequest *
}
// 删除好友 外部判断是否好友关系
func (f *FriendDatabase) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error) {
func (f *friendDatabase) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error) {
return f.friend.Delete(ctx, ownerUserID, friendUserIDs)
}
// 更新好友备注 零值也支持
func (f *FriendDatabase) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error) {
func (f *friendDatabase) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error) {
return f.friend.UpdateRemark(ctx, ownerUserID, friendUserID, remark)
}
// 获取ownerUserID的好友列表 无结果不返回错误
func (f *FriendDatabase) PageOwnerFriends(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error) {
func (f *friendDatabase) PageOwnerFriends(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error) {
return f.friend.FindOwnerFriends(ctx, ownerUserID, pageNumber, showNumber)
}
// friendUserID在哪些人的好友列表中
func (f *FriendDatabase) PageInWhoseFriends(ctx context.Context, friendUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error) {
func (f *friendDatabase) PageInWhoseFriends(ctx context.Context, friendUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error) {
return f.friend.FindInWhoseFriends(ctx, friendUserID, pageNumber, showNumber)
}
// 获取我发出去的好友申请 无结果不返回错误
func (f *FriendDatabase) PageFriendRequestFromMe(ctx context.Context, userID string, pageNumber, showNumber int32) (friends []*relation.FriendRequestModel, total int64, err error) {
func (f *friendDatabase) PageFriendRequestFromMe(ctx context.Context, userID string, pageNumber, showNumber int32) (friends []*relation.FriendRequestModel, total int64, err error) {
return f.friendRequest.FindFromUserID(ctx, userID, pageNumber, showNumber)
}
// 获取我收到的的好友申请 无结果不返回错误
func (f *FriendDatabase) PageFriendRequestToMe(ctx context.Context, userID string, pageNumber, showNumber int32) (friends []*relation.FriendRequestModel, total int64, err error) {
func (f *friendDatabase) PageFriendRequestToMe(ctx context.Context, userID string, pageNumber, showNumber int32) (friends []*relation.FriendRequestModel, total int64, err error) {
return f.friendRequest.FindToUserID(ctx, userID, pageNumber, showNumber)
}
// 获取某人指定好友的信息 如果有好友不存在,也返回错误
func (f *FriendDatabase) FindFriendsWithError(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*relation.FriendModel, err error) {
func (f *friendDatabase) FindFriendsWithError(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*relation.FriendModel, err error) {
friends, err = f.friend.FindFriends(ctx, ownerUserID, friendUserIDs)
if err != nil {
return
+88 -305
View File
@@ -1,25 +1,21 @@
package controller
import (
"Open_IM/internal/tx"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/cache"
"Open_IM/pkg/common/db/relation"
relationTb "Open_IM/pkg/common/db/table/relation"
unRelationTb "Open_IM/pkg/common/db/table/unrelation"
"Open_IM/pkg/common/db/unrelation"
"Open_IM/pkg/utils"
"context"
"fmt"
"github.com/dtm-labs/rockscache"
_ "github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"go.mongodb.org/mongo-driver/mongo"
"gorm.io/gorm"
)
//type GroupInterface GroupDataBaseInterface
type GroupInterface interface {
type GroupDatabase interface {
// Group
CreateGroup(ctx context.Context, groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel) error
TakeGroup(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error)
FindGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error)
@@ -45,217 +41,7 @@ type GroupInterface interface {
CreateGroupRequest(ctx context.Context, requests []*relationTb.GroupRequestModel) error
TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relationTb.GroupRequestModel, error)
PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupRequestModel, error)
// SuperGroup
FindSuperGroup(ctx context.Context, groupIDs []string) ([]*unRelationTb.SuperGroupModel, error)
FindJoinSuperGroup(ctx context.Context, userID string) (superGroup *unRelationTb.UserToSuperGroupModel, err error)
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error
DeleteSuperGroup(ctx context.Context, groupID string) error
DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
CreateSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
}
var _ GroupInterface = (*GroupController)(nil)
func NewGroupInterface(database GroupDataBaseInterface) GroupInterface {
return &GroupController{database: database}
}
type GroupController struct {
database GroupDataBaseInterface
}
func (g *GroupController) FindGroupMemberUserID(ctx context.Context, groupID string) ([]string, error) {
return g.database.FindGroupMemberUserID(ctx, groupID)
}
func (g *GroupController) CreateGroup(ctx context.Context, groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel) error {
return g.database.CreateGroup(ctx, groups, groupMembers)
}
func (g *GroupController) TakeGroup(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error) {
return g.database.TakeGroup(ctx, groupID)
}
func (g *GroupController) FindGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error) {
return g.database.FindGroup(ctx, groupIDs)
}
func (g *GroupController) SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupModel, error) {
return g.database.SearchGroup(ctx, keyword, pageNumber, showNumber)
}
func (g *GroupController) UpdateGroup(ctx context.Context, groupID string, data map[string]any) error {
return g.database.UpdateGroup(ctx, groupID, data)
}
func (g *GroupController) DismissGroup(ctx context.Context, groupID string) error {
return g.database.DismissGroup(ctx, groupID)
}
func (g *GroupController) GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error) {
return g.database.GetGroupIDsByGroupType(ctx, groupType)
}
func (g *GroupController) TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relationTb.GroupMemberModel, err error) {
return g.database.TakeGroupMember(ctx, groupID, userID)
}
func (g *GroupController) TakeGroupOwner(ctx context.Context, groupID string) (*relationTb.GroupMemberModel, error) {
return g.database.TakeGroupOwner(ctx, groupID)
}
func (g *GroupController) FindGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) ([]*relationTb.GroupMemberModel, error) {
return g.database.FindGroupMember(ctx, groupIDs, userIDs, roleLevels)
}
func (g *GroupController) PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error) {
return g.database.PageGroupMember(ctx, groupIDs, userIDs, roleLevels, pageNumber, showNumber)
}
func (g *GroupController) SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error) {
return g.database.SearchGroupMember(ctx, keyword, groupIDs, userIDs, roleLevels, pageNumber, showNumber)
}
func (g *GroupController) HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relationTb.GroupMemberModel) error {
return g.database.HandlerGroupRequest(ctx, groupID, userID, handledMsg, handleResult, member)
}
func (g *GroupController) DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error {
return g.database.DeleteGroupMember(ctx, groupID, userIDs)
}
func (g *GroupController) MapGroupMemberUserID(ctx context.Context, groupIDs []string) (map[string]*relationTb.GroupSimpleUserID, error) {
return g.database.MapGroupMemberUserID(ctx, groupIDs)
}
func (g *GroupController) MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error) {
return g.database.MapGroupMemberNum(ctx, groupIDs)
}
func (g *GroupController) TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string, roleLevel int32) error {
return g.database.TransferGroupOwner(ctx, groupID, oldOwnerUserID, newOwnerUserID, roleLevel)
}
func (g *GroupController) UpdateGroupMembers(ctx context.Context, data []*relationTb.BatchUpdateGroupMember) error {
return g.database.UpdateGroupMembers(ctx, data)
}
func (g *GroupController) UpdateGroupMember(ctx context.Context, groupID string, userID string, data map[string]any) error {
return g.database.UpdateGroupMember(ctx, groupID, userID, data)
}
func (g *GroupController) CreateGroupRequest(ctx context.Context, requests []*relationTb.GroupRequestModel) error {
return g.database.CreateGroupRequest(ctx, requests)
}
func (g *GroupController) TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relationTb.GroupRequestModel, error) {
return g.database.TakeGroupRequest(ctx, groupID, userID)
}
func (g *GroupController) PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupRequestModel, error) {
return g.database.PageGroupRequestUser(ctx, userID, pageNumber, showNumber)
}
func (g *GroupController) FindSuperGroup(ctx context.Context, groupIDs []string) ([]*unRelationTb.SuperGroupModel, error) {
return g.database.FindSuperGroup(ctx, groupIDs)
}
func (g *GroupController) FindJoinSuperGroup(ctx context.Context, userID string) (*unRelationTb.UserToSuperGroupModel, error) {
return g.database.FindJoinSuperGroup(ctx, userID)
}
func (g *GroupController) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
return g.database.CreateSuperGroup(ctx, groupID, initMemberIDList)
}
func (g *GroupController) DeleteSuperGroup(ctx context.Context, groupID string) error {
return g.database.DeleteSuperGroup(ctx, groupID)
}
func (g *GroupController) DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
return g.database.DeleteSuperGroupMember(ctx, groupID, userIDs)
}
func (g *GroupController) CreateSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
return g.database.CreateSuperGroupMember(ctx, groupID, userIDs)
}
type Group interface {
CreateGroup(ctx context.Context, groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel) error
TakeGroup(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error)
FindGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error)
SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupModel, error)
UpdateGroup(ctx context.Context, groupID string, data map[string]any) error
DismissGroup(ctx context.Context, groupID string) error // 解散群,并删除群成员
GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error)
}
type GroupMember interface {
TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relationTb.GroupMemberModel, err error)
TakeGroupOwner(ctx context.Context, groupID string) (*relationTb.GroupMemberModel, error)
FindGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) ([]*relationTb.GroupMemberModel, error)
FindGroupMemberUserID(ctx context.Context, groupID string) ([]string, error)
PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error)
SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error)
HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relationTb.GroupMemberModel) error
DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error
MapGroupMemberUserID(ctx context.Context, groupIDs []string) (map[string]*relationTb.GroupSimpleUserID, error)
MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error)
TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string, roleLevel int32) error // 转让群
UpdateGroupMember(ctx context.Context, groupID string, userID string, data map[string]any) error
UpdateGroupMembers(ctx context.Context, data []*relationTb.BatchUpdateGroupMember) error
}
type GroupRequest interface {
CreateGroupRequest(ctx context.Context, requests []*relationTb.GroupRequestModel) error
TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relationTb.GroupRequestModel, error)
PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupRequestModel, error)
}
type SuperGroup interface {
FindSuperGroup(ctx context.Context, groupIDs []string) ([]*unrelationTb.SuperGroupModel, error)
FindJoinSuperGroup(ctx context.Context, userID string) (*unrelationTb.UserToSuperGroupModel, error)
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error
DeleteSuperGroup(ctx context.Context, groupID string) error
DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
CreateSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
}
type GroupDataBase1 interface {
Group
GroupMember
GroupRequest
SuperGroup
}
type GroupDataBaseInterface interface {
CreateGroup(ctx context.Context, groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel) error
TakeGroup(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error)
FindGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error)
SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupModel, error)
UpdateGroup(ctx context.Context, groupID string, data map[string]any) error
DismissGroup(ctx context.Context, groupID string) error // 解散群,并删除群成员
GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error)
// GroupMember
TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relationTb.GroupMemberModel, err error)
TakeGroupOwner(ctx context.Context, groupID string) (*relationTb.GroupMemberModel, error)
FindGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) ([]*relationTb.GroupMemberModel, error)
FindGroupMemberUserID(ctx context.Context, groupID string) ([]string, error)
PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error)
SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error)
HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relationTb.GroupMemberModel) error
DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error
MapGroupMemberUserID(ctx context.Context, groupIDs []string) (map[string]*relationTb.GroupSimpleUserID, error)
MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error)
TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string, roleLevel int32) error // 转让群
UpdateGroupMember(ctx context.Context, groupID string, userID string, data map[string]any) error
UpdateGroupMembers(ctx context.Context, data []*relationTb.BatchUpdateGroupMember) error
// GroupRequest
CreateGroupRequest(ctx context.Context, requests []*relationTb.GroupRequestModel) error
TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relationTb.GroupRequestModel, error)
PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupRequestModel, error)
// SuperGroup
// SuperGroupModelInterface
FindSuperGroup(ctx context.Context, groupIDs []string) ([]*unRelationTb.SuperGroupModel, error)
FindJoinSuperGroup(ctx context.Context, userID string) (*unRelationTb.UserToSuperGroupModel, error)
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error
@@ -264,42 +50,47 @@ type GroupDataBaseInterface interface {
CreateSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
}
func NewGroupDatabase(db *gorm.DB, rdb redis.UniversalClient, mgoClient *mongo.Client) GroupDataBaseInterface {
groupDB := relation.NewGroupDB(db)
groupMemberDB := relation.NewGroupMemberDB(db)
groupRequestDB := relation.NewGroupRequest(db)
newDB := *db
SuperGroupMongoDriver := unrelation.NewSuperGroupMongoDriver(mgoClient)
database := &GroupDataBase{
groupDB: groupDB,
groupMemberDB: groupMemberDB,
groupRequestDB: groupRequestDB,
db: &newDB,
cache: cache.NewGroupCacheRedis(rdb, groupDB, groupMemberDB, groupRequestDB, SuperGroupMongoDriver, rockscache.Options{
func NewGroupDatabase(
group relationTb.GroupModelInterface,
member relationTb.GroupMemberModelInterface,
request relationTb.GroupRequestModelInterface,
tx tx.Tx,
ctxTx tx.CtxTx,
super unRelationTb.SuperGroupModelInterface,
client redis.UniversalClient,
) GroupDatabase {
database := &groupDatabase{
groupDB: group,
groupMemberDB: member,
groupRequestDB: request,
tx: tx,
ctxTx: ctxTx,
cache: cache.NewGroupCacheRedis(client, group, member, request, super, rockscache.Options{
RandomExpireAdjustment: 0.2,
DisableCacheRead: false,
DisableCacheDelete: false,
StrongConsistency: true,
}),
mongoDB: SuperGroupMongoDriver,
mongoDB: super,
}
return database
}
var _ GroupDataBaseInterface = (*GroupDataBase)(nil)
type GroupDataBase struct {
type groupDatabase struct {
groupDB relationTb.GroupModelInterface
groupMemberDB relationTb.GroupMemberModelInterface
groupRequestDB relationTb.GroupRequestModelInterface
db *gorm.DB
//cache cache.GroupCache
cache *cache.GroupCacheRedis
mongoDB *unrelation.SuperGroupMongoDriver
tx tx.Tx
ctxTx tx.CtxTx
cache cache.GroupCacheRedisInterface
mongoDB unRelationTb.SuperGroupModelInterface
}
func (g *GroupDataBase) delGroupMemberCache(ctx context.Context, groupID string, userIDs []string) error {
func (g *groupDatabase) GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error) {
return g.groupDB.GetGroupIDsByGroupType(ctx, groupType)
}
func (g *groupDatabase) delGroupMemberCache(ctx context.Context, groupID string, userIDs []string) error {
for _, userID := range userIDs {
if err := g.cache.DelJoinedGroupID(ctx, userID); err != nil {
return err
@@ -320,49 +111,41 @@ func (g *GroupDataBase) delGroupMemberCache(ctx context.Context, groupID string,
return nil
}
func (g *GroupDataBase) FindGroupMemberUserID(ctx context.Context, groupID string) ([]string, error) {
func (g *groupDatabase) FindGroupMemberUserID(ctx context.Context, groupID string) ([]string, error) {
return g.cache.GetGroupMemberIDs(ctx, groupID)
}
func (g *GroupDataBase) CreateGroup(ctx context.Context, groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel) error {
return g.db.Transaction(func(tx *gorm.DB) error {
func (g *groupDatabase) CreateGroup(ctx context.Context, groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel) error {
return g.tx.Transaction(func(tx any) error {
if len(groups) > 0 {
if err := g.groupDB.Create(ctx, groups, tx); err != nil {
if err := g.groupDB.NewTx(tx).Create(ctx, groups); err != nil {
return err
}
}
if len(groupMembers) > 0 {
if err := g.groupMemberDB.Create(ctx, groupMembers, tx); err != nil {
if err := g.groupMemberDB.NewTx(tx).Create(ctx, groupMembers); err != nil {
return err
}
//if err := g.cache.DelJoinedGroupIDs(ctx, utils.Slice(groupMembers, func(e *relationTb.GroupMemberModel) string {
// return e.UserID
//})); err != nil {
// return err
//}
}
return nil
})
}
func (g *GroupDataBase) TakeGroup(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error) {
//return g.cache.GetGroupInfo(ctx, groupID)
return cache.GetCache(ctx, g.rcClient, g.getGroupInfoKey(groupID), g.expireTime, func(ctx context.Context) (*relationTb.GroupModel, error) {
return g.group.Take(ctx, groupID)
})
func (g *groupDatabase) TakeGroup(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error) {
return g.cache.GetGroupInfo(ctx, groupID)
}
func (g *GroupDataBase) FindGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error) {
func (g *groupDatabase) FindGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error) {
return g.cache.GetGroupsInfo(ctx, groupIDs)
}
func (g *GroupDataBase) SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupModel, error) {
func (g *groupDatabase) SearchGroup(ctx context.Context, keyword string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupModel, error) {
return g.groupDB.Search(ctx, keyword, pageNumber, showNumber)
}
func (g *GroupDataBase) UpdateGroup(ctx context.Context, groupID string, data map[string]any) error {
return g.db.Transaction(func(tx *gorm.DB) error {
if err := g.groupDB.UpdateMap(ctx, groupID, data, tx); err != nil {
func (g *groupDatabase) UpdateGroup(ctx context.Context, groupID string, data map[string]any) error {
return g.tx.Transaction(func(tx any) error {
if err := g.groupDB.NewTx(tx).UpdateMap(ctx, groupID, data); err != nil {
return err
}
if err := g.cache.DelGroupInfo(ctx, groupID); err != nil {
@@ -372,12 +155,12 @@ func (g *GroupDataBase) UpdateGroup(ctx context.Context, groupID string, data ma
})
}
func (g *GroupDataBase) DismissGroup(ctx context.Context, groupID string) error {
return g.db.Transaction(func(tx *gorm.DB) error {
if err := g.groupDB.UpdateStatus(ctx, groupID, constant.GroupStatusDismissed, tx); err != nil {
func (g *groupDatabase) DismissGroup(ctx context.Context, groupID string) error {
return g.tx.Transaction(func(tx any) error {
if err := g.groupDB.NewTx(tx).UpdateStatus(ctx, groupID, constant.GroupStatusDismissed); err != nil {
return err
}
if err := g.groupMemberDB.DeleteGroup(ctx, []string{groupID}, tx); err != nil {
if err := g.groupMemberDB.NewTx(tx).DeleteGroup(ctx, []string{groupID}); err != nil {
return err
}
userIDs, err := g.cache.GetGroupMemberIDs(ctx, groupID)
@@ -391,33 +174,33 @@ func (g *GroupDataBase) DismissGroup(ctx context.Context, groupID string) error
})
}
func (g *GroupDataBase) TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relationTb.GroupMemberModel, err error) {
func (g *groupDatabase) TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relationTb.GroupMemberModel, err error) {
return g.cache.GetGroupMemberInfo(ctx, groupID, userID)
}
func (g *GroupDataBase) TakeGroupOwner(ctx context.Context, groupID string) (*relationTb.GroupMemberModel, error) {
func (g *groupDatabase) TakeGroupOwner(ctx context.Context, groupID string) (*relationTb.GroupMemberModel, error) {
return g.groupMemberDB.TakeOwner(ctx, groupID) // todo cache group owner
}
func (g *GroupDataBase) FindGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) ([]*relationTb.GroupMemberModel, error) {
func (g *groupDatabase) FindGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) ([]*relationTb.GroupMemberModel, error) {
return g.groupMemberDB.Find(ctx, groupIDs, userIDs, roleLevels) // todo cache group find
}
func (g *GroupDataBase) PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error) {
func (g *groupDatabase) PageGroupMember(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error) {
return g.groupMemberDB.SearchMember(ctx, "", groupIDs, userIDs, roleLevels, pageNumber, showNumber)
}
func (g *GroupDataBase) SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error) {
func (g *groupDatabase) SearchGroupMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (uint32, []*relationTb.GroupMemberModel, error) {
return g.groupMemberDB.SearchMember(ctx, keyword, groupIDs, userIDs, roleLevels, pageNumber, showNumber)
}
func (g *GroupDataBase) HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relationTb.GroupMemberModel) error {
return g.db.Transaction(func(tx *gorm.DB) error {
if err := g.groupRequestDB.UpdateHandler(ctx, groupID, userID, handledMsg, handleResult, tx); err != nil {
func (g *groupDatabase) HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relationTb.GroupMemberModel) error {
return g.tx.Transaction(func(tx any) error {
if err := g.groupRequestDB.NewTx(tx).UpdateHandler(ctx, groupID, userID, handledMsg, handleResult); err != nil {
return err
}
if member != nil {
if err := g.groupMemberDB.Create(ctx, []*relationTb.GroupMemberModel{member}, tx); err != nil {
if err := g.groupMemberDB.NewTx(tx).Create(ctx, []*relationTb.GroupMemberModel{member}); err != nil {
return err
}
if err := g.delGroupMemberCache(ctx, groupID, []string{userID}); err != nil {
@@ -428,9 +211,9 @@ func (g *GroupDataBase) HandlerGroupRequest(ctx context.Context, groupID string,
})
}
func (g *GroupDataBase) DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error {
return g.db.Transaction(func(tx *gorm.DB) error {
if err := g.groupMemberDB.Delete(ctx, groupID, userIDs, tx); err != nil {
func (g *groupDatabase) DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error {
return g.tx.Transaction(func(tx any) error {
if err := g.groupMemberDB.NewTx(tx).Delete(ctx, groupID, userIDs); err != nil {
return err
}
if err := g.delGroupMemberCache(ctx, groupID, userIDs); err != nil {
@@ -440,24 +223,24 @@ func (g *GroupDataBase) DeleteGroupMember(ctx context.Context, groupID string, u
})
}
func (g *GroupDataBase) MapGroupMemberUserID(ctx context.Context, groupIDs []string) (map[string]*relationTb.GroupSimpleUserID, error) {
func (g *groupDatabase) MapGroupMemberUserID(ctx context.Context, groupIDs []string) (map[string]*relationTb.GroupSimpleUserID, error) {
return g.cache.GetGroupMemberHash1(ctx, groupIDs)
}
func (g *GroupDataBase) MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error) {
func (g *groupDatabase) MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error) {
return g.groupMemberDB.MapGroupMemberNum(ctx, groupIDs)
}
func (g *GroupDataBase) TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string, roleLevel int32) error {
return g.db.Transaction(func(tx *gorm.DB) error {
rowsAffected, err := g.groupMemberDB.UpdateRoleLevel(ctx, groupID, oldOwnerUserID, roleLevel, tx)
func (g *groupDatabase) TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string, roleLevel int32) error {
return g.tx.Transaction(func(tx any) error {
rowsAffected, err := g.groupMemberDB.NewTx(tx).UpdateRoleLevel(ctx, groupID, oldOwnerUserID, roleLevel)
if err != nil {
return err
}
if rowsAffected != 1 {
return utils.Wrap(fmt.Errorf("oldOwnerUserID %s rowsAffected = %d", oldOwnerUserID, rowsAffected), "")
}
rowsAffected, err = g.groupMemberDB.UpdateRoleLevel(ctx, groupID, newOwnerUserID, constant.GroupOwner, tx)
rowsAffected, err = g.groupMemberDB.NewTx(tx).UpdateRoleLevel(ctx, groupID, newOwnerUserID, constant.GroupOwner)
if err != nil {
return err
}
@@ -471,9 +254,9 @@ func (g *GroupDataBase) TransferGroupOwner(ctx context.Context, groupID string,
})
}
func (g *GroupDataBase) UpdateGroupMember(ctx context.Context, groupID string, userID string, data map[string]any) error {
return g.db.Transaction(func(tx *gorm.DB) error {
if err := g.groupMemberDB.Update(ctx, groupID, userID, data, tx); err != nil {
func (g *groupDatabase) UpdateGroupMember(ctx context.Context, groupID string, userID string, data map[string]any) error {
return g.tx.Transaction(func(tx any) error {
if err := g.groupMemberDB.NewTx(tx).Update(ctx, groupID, userID, data); err != nil {
return err
}
if err := g.cache.DelGroupMemberInfo(ctx, groupID, userID); err != nil {
@@ -483,10 +266,10 @@ func (g *GroupDataBase) UpdateGroupMember(ctx context.Context, groupID string, u
})
}
func (g *GroupDataBase) UpdateGroupMembers(ctx context.Context, data []*relationTb.BatchUpdateGroupMember) error {
return g.db.Transaction(func(tx *gorm.DB) error {
func (g *groupDatabase) UpdateGroupMembers(ctx context.Context, data []*relationTb.BatchUpdateGroupMember) error {
return g.tx.Transaction(func(tx any) error {
for _, item := range data {
if err := g.groupMemberDB.Update(ctx, item.GroupID, item.UserID, item.Map, tx); err != nil {
if err := g.groupMemberDB.NewTx(tx).Update(ctx, item.GroupID, item.UserID, item.Map); err != nil {
return err
}
if err := g.cache.DelGroupMemberInfo(ctx, item.GroupID, item.UserID); err != nil {
@@ -497,46 +280,46 @@ func (g *GroupDataBase) UpdateGroupMembers(ctx context.Context, data []*relation
})
}
func (g *GroupDataBase) CreateGroupRequest(ctx context.Context, requests []*relationTb.GroupRequestModel) error {
func (g *groupDatabase) CreateGroupRequest(ctx context.Context, requests []*relationTb.GroupRequestModel) error {
return g.groupRequestDB.Create(ctx, requests)
}
func (g *GroupDataBase) TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relationTb.GroupRequestModel, error) {
func (g *groupDatabase) TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relationTb.GroupRequestModel, error) {
return g.groupRequestDB.Take(ctx, groupID, userID)
}
func (g *GroupDataBase) PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupRequestModel, error) {
func (g *groupDatabase) PageGroupRequestUser(ctx context.Context, userID string, pageNumber, showNumber int32) (uint32, []*relationTb.GroupRequestModel, error) {
return g.groupRequestDB.Page(ctx, userID, pageNumber, showNumber)
}
func (g *GroupDataBase) FindSuperGroup(ctx context.Context, groupIDs []string) ([]*table.SuperGroupModel, error) {
func (g *groupDatabase) FindSuperGroup(ctx context.Context, groupIDs []string) ([]*unRelationTb.SuperGroupModel, error) {
return g.mongoDB.FindSuperGroup(ctx, groupIDs)
}
func (g *GroupDataBase) FindJoinSuperGroup(ctx context.Context, userID string) (*table.UserToSuperGroupModel, error) {
func (g *groupDatabase) FindJoinSuperGroup(ctx context.Context, userID string) (*unRelationTb.UserToSuperGroupModel, error) {
return g.mongoDB.GetSuperGroupByUserID(ctx, userID)
}
func (g *GroupDataBase) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
return unrelation.MongoTransaction(ctx, g.mongoDB.MgoClient, func(tx mongo.SessionContext) error {
return g.mongoDB.CreateSuperGroup(ctx, groupID, initMemberIDList, tx)
func (g *groupDatabase) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
return g.ctxTx.Transaction(ctx, func(ctx context.Context) error {
return g.mongoDB.CreateSuperGroup(ctx, groupID, initMemberIDList)
})
}
func (g *GroupDataBase) DeleteSuperGroup(ctx context.Context, groupID string) error {
return unrelation.MongoTransaction(ctx, g.mongoDB.MgoClient, func(tx mongo.SessionContext) error {
return g.mongoDB.DeleteSuperGroup(ctx, groupID, tx)
func (g *groupDatabase) DeleteSuperGroup(ctx context.Context, groupID string) error {
return g.ctxTx.Transaction(ctx, func(ctx context.Context) error {
return g.mongoDB.DeleteSuperGroup(ctx, groupID)
})
}
func (g *GroupDataBase) DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
return unrelation.MongoTransaction(ctx, g.mongoDB.MgoClient, func(tx mongo.SessionContext) error {
return g.mongoDB.RemoverUserFromSuperGroup(ctx, groupID, userIDs, tx)
func (g *groupDatabase) DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
return g.ctxTx.Transaction(ctx, func(ctx context.Context) error {
return g.mongoDB.RemoverUserFromSuperGroup(ctx, groupID, userIDs)
})
}
func (g *GroupDataBase) CreateSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
return unrelation.MongoTransaction(ctx, g.mongoDB.MgoClient, func(tx mongo.SessionContext) error {
return g.mongoDB.AddUserToSuperGroup(ctx, groupID, userIDs, tx)
func (g *groupDatabase) CreateSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
return g.ctxTx.Transaction(ctx, func(ctx context.Context) error {
return g.mongoDB.AddUserToSuperGroup(ctx, groupID, userIDs)
})
}
+6 -4
View File
@@ -33,7 +33,7 @@ type MsgInterface interface {
DelMsgBySeqs(ctx context.Context, userID string, seqs []int64) (totalUnExistSeqs []int64, err error)
// 通过seqList获取db中写扩散消息
GetMsgBySeqs(ctx context.Context, userID string, seqs []int64) (seqMsg []*sdkws.MsgData, err error)
// 通过seqList获取大群在db里面的消息
// 通过seqList获取大群在db里面的消息 没找到返回错误
GetSuperGroupMsgBySeqs(ctx context.Context, groupID string, seqs []int64) (seqMsg []*sdkws.MsgData, err error)
// 删除用户所有消息/cache/db然后重置seq
CleanUpUserMsg(ctx context.Context, userID string) error
@@ -49,6 +49,8 @@ type MsgInterface interface {
SetGroupUserMinSeq(ctx context.Context, groupID, userID string, minSeq int64) (err error)
// 设置用户最小seq 直接调用cache
SetUserMinSeq(ctx context.Context, userID string, minSeq int64) (err error)
MsgToMQ(ctx context.Context, key string, data *pbMsg.MsgDataToMQ) (err error)
}
func NewMsgController(mgo *mongo.Client, rdb redis.UniversalClient) MsgInterface {
@@ -337,7 +339,7 @@ func (db *MsgDatabase) GetMsgAndIndexBySeqsInOneDoc(ctx context.Context, docID s
if err != nil {
return nil, nil, nil, err
}
if utils.Contain(msgPb.Seq, seqs) {
if utils.Contain(msgPb.Seq, seqs...) {
indexes = append(indexes, i)
seqMsgs = append(seqMsgs, msgPb)
hasSeqList = append(hasSeqList, msgPb.Seq)
@@ -348,7 +350,7 @@ func (db *MsgDatabase) GetMsgAndIndexBySeqsInOneDoc(ctx context.Context, docID s
}
}
for _, i := range seqs {
if utils.Contain(i, hasSeqList) {
if utils.Contain(i, hasSeqList...) {
continue
}
unExistSeqs = append(unExistSeqs, i)
@@ -398,7 +400,7 @@ func (db *MsgDatabase) getMsgBySeqs(ctx context.Context, sourceID string, seqs [
//log.NewError(operationID, "Unmarshal err", seqUid, value, uid, seqList, err.Error())
return nil, err
}
if utils.Contain(msgPb.Seq, value) {
if utils.Contain(msgPb.Seq, value...) {
seqMsg = append(seqMsg, msgPb)
hasSeqs = append(hasSeqs, msgPb.Seq)
singleCount++
+59 -89
View File
@@ -2,105 +2,60 @@ package controller
import (
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/relation"
relationTb "Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/utils"
"context"
"gorm.io/gorm"
)
type UserInterface interface {
type UserDatabase interface {
//获取指定用户的信息 如有userID未找到 也返回错误
FindWithError(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error)
FindWithError(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error)
//获取指定用户的信息 如有userID未找到 不返回错误
Find(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error)
Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error)
//插入多条 外部保证userID 不重复 且在db中不存在
Create(ctx context.Context, users []*relationTb.UserModel) (err error)
Create(ctx context.Context, users []*relation.UserModel) (err error)
//更新(非零值) 外部保证userID存在
Update(ctx context.Context, users []*relationTb.UserModel) (err error)
Update(ctx context.Context, users []*relation.UserModel) (err error)
//更新(零值) 外部保证userID存在
UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error)
//如果没找到,不返回错误
Page(ctx context.Context, pageNumber, showNumber int32) (users []*relationTb.UserModel, count int64, err error)
Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation.UserModel, count int64, err error)
//只要有一个存在就为true
IsExist(ctx context.Context, userIDs []string) (exist bool, err error)
//获取所有用户ID
GetAllUserID(ctx context.Context) ([]string, error)
//函数内部先查询db中是否存在,存在则什么都不做;不存在则插入
InitOnce(ctx context.Context, users []*relation.UserModel) (err error)
}
type UserController struct {
database UserDatabaseInterface
type userDatabase struct {
userDB relation.UserModelInterface
}
// 获取指定用户的信息 如有userID未找到 也返回错误
func (u *UserController) FindWithError(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error) {
return u.database.FindWithError(ctx, userIDs)
func NewUserDatabase(userDB relation.UserModelInterface) UserDatabase {
return &userDatabase{userDB: userDB}
}
func (u *UserController) Find(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error) {
return u.database.Find(ctx, userIDs)
}
func (u *UserController) Create(ctx context.Context, users []*relationTb.UserModel) error {
return u.database.Create(ctx, users)
}
func (u *UserController) Update(ctx context.Context, users []*relationTb.UserModel) (err error) {
return u.database.Update(ctx, users)
}
func (u *UserController) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) {
return u.database.UpdateByMap(ctx, userID, args)
}
func (u *UserController) Page(ctx context.Context, pageNumber, showNumber int32) (users []*relationTb.UserModel, count int64, err error) {
return u.database.Page(ctx, pageNumber, showNumber)
}
func (u *UserController) IsExist(ctx context.Context, userIDs []string) (exist bool, err error) {
return u.database.IsExist(ctx, userIDs)
}
func (u *UserController) GetAllUserID(ctx context.Context) ([]string, error) {
return u.database.GetAllUserID(ctx)
}
func NewUserController(db *gorm.DB) *UserController {
controller := &UserController{database: newUserDatabase(db)}
return controller
}
type UserDatabaseInterface interface {
//获取指定用户的信息 如有userID未找到 也返回错误
FindWithError(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error)
//获取指定用户的信息 如有userID未找到 不返回错误
Find(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error)
//插入多条 外部保证userID 不重复 且在db中不存在
Create(ctx context.Context, users []*relationTb.UserModel) (err error)
//更新(非零值) 外部保证userID存在
Update(ctx context.Context, users []*relationTb.UserModel) (err error)
//更新(零值) 外部保证userID存在
UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error)
//如果没找到,不返回错误
Page(ctx context.Context, pageNumber, showNumber int32) (users []*relationTb.UserModel, count int64, err error)
//只要有一个存在就为true
IsExist(ctx context.Context, userIDs []string) (exist bool, err error)
//获取所有用户ID
GetAllUserID(ctx context.Context) ([]string, error)
}
type UserDatabase struct {
user *relation.UserGorm
}
func newUserDatabase(db *gorm.DB) *UserDatabase {
sqlDB := relation.NewUserGorm(db)
database := &UserDatabase{
user: sqlDB,
func (u *userDatabase) InitOnce(ctx context.Context, users []*relation.UserModel) (err error) {
userIDs := utils.Slice(users, func(e *relation.UserModel) string {
return e.UserID
})
result, err := u.userDB.Find(ctx, userIDs)
if err != nil {
return err
}
return database
miss := utils.SliceAnySub(users, result, func(e *relation.UserModel) string { return e.UserID })
if len(miss) > 0 {
u.userDB.Create(ctx, miss)
}
return nil
}
// 获取指定用户的信息 如有userID未找到 也返回错误
func (u *UserDatabase) FindWithError(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error) {
users, err = u.user.Find(ctx, userIDs)
func (u *userDatabase) FindWithError(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) {
users, err = u.userDB.Find(ctx, userIDs)
if err != nil {
return
}
@@ -111,34 +66,34 @@ func (u *UserDatabase) FindWithError(ctx context.Context, userIDs []string) (use
}
// 获取指定用户的信息 如有userID未找到 不返回错误
func (u *UserDatabase) Find(ctx context.Context, userIDs []string) (users []*relationTb.UserModel, err error) {
users, err = u.user.Find(ctx, userIDs)
func (u *userDatabase) Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) {
users, err = u.userDB.Find(ctx, userIDs)
return
}
// 插入多条 外部保证userID 不重复 且在db中不存在
func (u *UserDatabase) Create(ctx context.Context, users []*relationTb.UserModel) (err error) {
return u.user.Create(ctx, users)
func (u *userDatabase) Create(ctx context.Context, users []*relation.UserModel) (err error) {
return u.userDB.Create(ctx, users)
}
// 更新(非零值) 外部保证userID存在
func (u *UserDatabase) Update(ctx context.Context, users []*relationTb.UserModel) (err error) {
return u.user.Update(ctx, users)
func (u *userDatabase) Update(ctx context.Context, users []*relation.UserModel) (err error) {
return u.userDB.Update(ctx, users)
}
// 更新(零值) 外部保证userID存在
func (u *UserDatabase) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) {
return u.user.UpdateByMap(ctx, userID, args)
func (u *userDatabase) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) {
return u.userDB.UpdateByMap(ctx, userID, args)
}
// 获取,如果没找到,不返回错误
func (u *UserDatabase) Page(ctx context.Context, showNumber, pageNumber int32) (users []*relationTb.UserModel, count int64, err error) {
return u.user.Page(ctx, showNumber, pageNumber)
func (u *userDatabase) Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation.UserModel, count int64, err error) {
return u.userDB.Page(ctx, pageNumber, showNumber)
}
// userIDs是否存在 只要有一个存在就为true
func (u *UserDatabase) IsExist(ctx context.Context, userIDs []string) (exist bool, err error) {
users, err := u.user.Find(ctx, userIDs)
func (u *userDatabase) IsExist(ctx context.Context, userIDs []string) (exist bool, err error) {
users, err := u.userDB.Find(ctx, userIDs)
if err != nil {
return false, err
}
@@ -148,6 +103,21 @@ func (u *UserDatabase) IsExist(ctx context.Context, userIDs []string) (exist boo
return false, nil
}
func (u *UserDatabase) GetAllUserID(ctx context.Context) ([]string, error) {
return u.user.GetAllUserID(ctx)
func (u *userDatabase) GetAllUserID(ctx context.Context) (userIDs []string, err error) {
pageNumber := int32(0)
for {
tmp, total, err := u.userDB.PageUserID(ctx, pageNumber, constant.ShowNumber)
if err != nil {
return nil, err
}
if len(tmp) == 0 {
if total == int64(len(userIDs)) {
return userIDs, nil
}
return nil, constant.ErrData.Wrap("The total number of results and expectations are different, but result is nil")
}
userIDs = append(userIDs, tmp...)
pageNumber++
}
return userIDs, nil
}
@@ -12,10 +12,8 @@ type BlackGorm struct {
DB *gorm.DB
}
func NewBlackGorm(db *gorm.DB) *BlackGorm {
var black BlackGorm
black.DB = db
return &black
func NewBlackGorm(db *gorm.DB) relation.BlackModelInterface {
return &BlackGorm{db}
}
func (b *BlackGorm) Create(ctx context.Context, blacks []*relation.BlackModel) (err error) {
@@ -76,3 +74,10 @@ func (b *BlackGorm) FindOwnerBlacks(ctx context.Context, ownerUserID string, pag
err = utils.Wrap(b.DB.Model(&relation.BlackModel{}).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&blacks).Error, "")
return
}
func (b *BlackGorm) FindBlackUserIDs(ctx context.Context, ownerUserID string) (blackUserIDs []string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "blackUserIDs", blackUserIDs)
}()
return blackUserIDs, utils.Wrap(b.DB.Model(&relation.BlackModel{}).Where("owner_user_id = ?", blackUserIDs).Pluck("block_user_id", &blackUserIDs).Error, "")
}
+71 -99
View File
@@ -1,123 +1,95 @@
package relation
import (
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
"gorm.io/gorm"
)
var ConversationDB *gorm.DB
//type Conversation struct {
// OwnerUserID string `gorm:"column:owner_user_id;primary_key;type:char(128)" json:"OwnerUserID"`
// ConversationID string `gorm:"column:conversation_id;primary_key;type:char(128)" json:"conversationID"`
// ConversationType int32 `gorm:"column:conversation_type" json:"conversationType"`
// UserID string `gorm:"column:user_id;type:char(64)" json:"userID"`
// GroupID string `gorm:"column:group_id;type:char(128)" json:"groupID"`
// RecvMsgOpt int32 `gorm:"column:recv_msg_opt" json:"recvMsgOpt"`
// UnreadCount int32 `gorm:"column:unread_count" json:"unreadCount"`
// DraftTextTime int64 `gorm:"column:draft_text_time" json:"draftTextTime"`
// IsPinned bool `gorm:"column:is_pinned" json:"isPinned"`
// IsPrivateChat bool `gorm:"column:is_private_chat" json:"isPrivateChat"`
// BurnDuration int32 `gorm:"column:burn_duration;default:30" json:"burnDuration"`
// GroupAtType int32 `gorm:"column:group_at_type" json:"groupAtType"`
// IsNotInGroup bool `gorm:"column:is_not_in_group" json:"isNotInGroup"`
// UpdateUnreadCountTime int64 `gorm:"column:update_unread_count_time" json:"updateUnreadCountTime"`
// AttachedInfo string `gorm:"column:attached_info;type:varchar(1024)" json:"attachedInfo"`
// Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"`
//}
func (Conversation) TableName() string {
return "conversations"
type Conversation interface {
Create(ctx context.Context, conversations []*relation.ConversationModel) (err error)
Delete(ctx context.Context, groupIDs []string) (err error)
UpdateByMap(ctx context.Context, userIDList []string, conversationID string, args map[string]interface{}) (err error)
Update(ctx context.Context, conversations []*relation.ConversationModel) (err error)
Find(ctx context.Context, ownerUserID string, conversationIDs []string) (conversations []*relation.ConversationModel, err error)
FindUserID(ctx context.Context, userIDList []string, conversationID string) ([]string, error)
FindUserIDAllConversationID(ctx context.Context, userID string) ([]string, error)
Take(ctx context.Context, userID, conversationID string) (conversation *relation.ConversationModel, err error)
FindConversationID(ctx context.Context, userID string, conversationIDList []string) (existConversationID []string, err error)
NewTx(tx any) Conversation
}
type ConversationGorm struct {
DB *gorm.DB
}
func SetConversation(conversation Conversation) (bool, error) {
var isUpdate bool
newConversation := conversation
if ConversationDB.Model(&Conversation{}).Find(&newConversation).RowsAffected == 0 {
return isUpdate, ConversationDB.Model(&Conversation{}).Create(&conversation).Error
// if exist, then update record
} else {
//force update
isUpdate = true
return isUpdate, ConversationDB.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Updates(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt, "is_pinned": conversation.IsPinned, "is_private_chat": conversation.IsPrivateChat,
"group_at_type": conversation.GroupAtType, "is_not_in_group": conversation.IsNotInGroup}).Error
}
}
func SetOneConversation(conversation Conversation) error {
return ConversationDB.Model(&Conversation{}).Create(&conversation).Error
func NewConversationGorm(DB *gorm.DB) Conversation {
return &ConversationGorm{DB: DB}
}
func PeerUserSetConversation(conversation Conversation) error {
newConversation := conversation
if ConversationDB.Model(&Conversation{}).Find(&newConversation).RowsAffected == 0 {
return ConversationDB.Model(&Conversation{}).Create(&conversation).Error
// if exist, then update record
}
//force update
return ConversationDB.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Updates(map[string]interface{}{"is_private_chat": conversation.IsPrivateChat}).Error
func (c *ConversationGorm) NewTx(tx any) Conversation {
return &ConversationGorm{DB: tx.(*gorm.DB)}
}
func SetRecvMsgOpt(conversation Conversation) (bool, error) {
var isUpdate bool
newConversation := conversation
if ConversationDB.Model(&Conversation{}).Find(&newConversation).RowsAffected == 0 {
return isUpdate, ConversationDB.Model(&Conversation{}).Create(&conversation).Error
// if exist, then update record
} else {
//force update
isUpdate = true
return isUpdate, ConversationDB.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Updates(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt}).Error
}
func (c *ConversationGorm) Create(ctx context.Context, conversations []*relation.ConversationModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "conversations", conversations)
}()
return utils.Wrap(c.DB.Create(&conversations).Error, "")
}
func GetUserAllConversations(ownerUserID string) ([]Conversation, error) {
var conversations []Conversation
err := ConversationDB.Where("owner_user_id=?", ownerUserID).Find(&conversations).Error
return conversations, err
}
func GetMultipleUserConversationByConversationID(ownerUserIDList []string, conversationID string) ([]Conversation, error) {
var conversations []Conversation
err := ConversationDB.Where("owner_user_id IN ? and conversation_id=?", ownerUserIDList, conversationID).Find(&conversations).Error
return conversations, err
}
func GetExistConversationUserIDList(ownerUserIDList []string, conversationID string) ([]string, error) {
var resultArr []string
err := ConversationDB.Table("conversations").Where(" owner_user_id IN (?) and conversation_id=?", ownerUserIDList, conversationID).Pluck("owner_user_id", &resultArr).Error
if err != nil {
return nil, err
}
return resultArr, nil
func (c *ConversationGorm) Delete(ctx context.Context, groupIDs []string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs)
}()
return utils.Wrap(c.DB.Where("group_id in (?)", groupIDs).Delete(&relation.ConversationModel{}).Error, "")
}
func GetConversation(OwnerUserID, conversationID string) (Conversation, error) {
var conversation Conversation
err := ConversationDB.Table("conversations").Where("owner_user_id=? and conversation_id=?", OwnerUserID, conversationID).Take(&conversation).Error
return conversation, err
func (c *ConversationGorm) UpdateByMap(ctx context.Context, userIDList []string, conversationID string, args map[string]interface{}) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userIDList", userIDList, "conversationID", conversationID)
}()
return utils.Wrap(c.DB.Model(&relation.ConversationModel{}).Where("owner_user_id IN (?) and conversation_id=?", userIDList, conversationID).Updates(args).Error, "")
}
func GetConversations(OwnerUserID string, conversationIDs []string) ([]Conversation, error) {
var conversations []Conversation
err := ConversationDB.Model(&Conversation{}).Where("conversation_id IN (?) and owner_user_id=?", conversationIDs, OwnerUserID).Find(&conversations).Error
func (c *ConversationGorm) Update(ctx context.Context, conversations []*relation.ConversationModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "conversations", conversations)
}()
return utils.Wrap(c.DB.Updates(&conversations).Error, "")
}
func (c *ConversationGorm) Find(ctx context.Context, ownerUserID string, conversationIDs []string) (conversations []*relation.ConversationModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "groups", conversations)
}()
err = utils.Wrap(c.DB.Where("owner_user_id=? and conversation_id IN (?)", ownerUserID, conversationIDs).Find(&conversations).Error, "")
return conversations, err
}
func GetConversationsByConversationIDMultipleOwner(OwnerUserIDList []string, conversationID string) ([]Conversation, error) {
var conversations []Conversation
err := ConversationDB.Model(&Conversation{}).Where("owner_user_id IN (?) and conversation_id=?", OwnerUserIDList, conversationID).Find(&conversations).Error
return conversations, err
func (c *ConversationGorm) Take(ctx context.Context, userID, conversationID string) (conversation *relation.ConversationModel, err error) {
cc := &relation.ConversationModel{}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "conversation", *conversation)
}()
return cc, utils.Wrap(c.DB.Where("conversation_id = ? And owner_user_id = ?", conversationID, userID).Take(cc).Error, "")
}
func UpdateColumnsConversations(ownerUserIDList []string, conversationID string, args map[string]interface{}) error {
return ConversationDB.Model(&Conversation{}).Where("owner_user_id IN (?) and conversation_id=?", ownerUserIDList, conversationID).Updates(args).Error
func (c *ConversationGorm) FindUserID(ctx context.Context, userIDList []string, conversationID string) (existUserID []string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userIDList, "existUserID", existUserID)
}()
return existUserID, utils.Wrap(c.DB.Where(" owner_user_id IN (?) and conversation_id=?", userIDList, conversationID).Pluck("owner_user_id", &existUserID).Error, "")
}
func GetConversationIDListByUserID(userID string) ([]string, error) {
var IDList []string
err := ConversationDB.Model(&Conversation{}).Where("owner_user_id=?", userID).Pluck("conversation_id", &IDList).Error
return IDList, err
func (c *ConversationGorm) FindConversationID(ctx context.Context, userID string, conversationIDList []string) (existConversationID []string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "existConversationIDList", existConversationID)
}()
return existConversationID, utils.Wrap(c.DB.Where(" conversation_id IN (?) and owner_user_id=?", conversationIDList, userID).Pluck("conversation_id", &existConversationID).Error, "")
}
func (c *ConversationGorm) FindUserIDAllConversationID(ctx context.Context, userID string) (conversationIDList []string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "conversationIDList", conversationIDList)
}()
return conversationIDList, utils.Wrap(c.DB.Model(&relation.ConversationModel{}).Where("owner_user_id=?", userID).Pluck("conversation_id", &conversationIDList).Error, "")
}
@@ -1,100 +0,0 @@
package relation
import (
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
"gorm.io/gorm"
)
type Conversation interface {
TableName() string
Create(ctx context.Context, conversations []*relation.ConversationModel, tx ...any) (err error)
Delete(ctx context.Context, groupIDs []string) (err error)
UpdateByMap(ctx context.Context, userIDList []string, conversationID string, args map[string]interface{}, tx ...any) (err error)
Update(ctx context.Context, conversations []*relation.ConversationModel, tx ...any) (err error)
Find(ctx context.Context, ownerUserID string, conversationIDs []string, tx ...any) (conversations []*relation.ConversationModel, err error)
FindUserID(ctx context.Context, userIDList []string, conversationID string, tx ...any) ([]string, error)
FindUserIDAllConversationID(ctx context.Context, userID string, tx ...any) ([]string, error)
Take(ctx context.Context, userID, conversationID string, tx ...any) (conversation *relation.ConversationModel, err error)
FindConversationID(ctx context.Context, userID string, conversationIDList []string, tx ...any) (existConversationID []string, err error)
}
type ConversationGorm struct {
DB *gorm.DB
}
func (c *ConversationGorm) TableName() string {
panic("implement me")
}
func NewConversationGorm(DB *gorm.DB) Conversation {
return &ConversationGorm{DB: DB}
}
func (c *ConversationGorm) Create(ctx context.Context, conversations []*relation.ConversationModel, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "conversations", conversations)
}()
return utils.Wrap(getDBConn(c.DB, tx).Create(&conversations).Error, "")
}
func (c *ConversationGorm) Delete(ctx context.Context, groupIDs []string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs)
}()
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Delete(&relation.ConversationModel{}).Error, "")
}
func (c *ConversationGorm) UpdateByMap(ctx context.Context, userIDList []string, conversationID string, args map[string]interface{}, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userIDList", userIDList, "conversationID", conversationID)
}()
return utils.Wrap(getDBConn(c.DB, tx).Model(&relation.ConversationModel{}).Where("owner_user_id IN (?) and conversation_id=?", userIDList, conversationID).Updates(args).Error, "")
}
func (c *ConversationGorm) Update(ctx context.Context, conversations []*relation.ConversationModel, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "conversations", conversations)
}()
return utils.Wrap(getDBConn(c.DB, tx).Updates(&conversations).Error, "")
}
func (c *ConversationGorm) Find(ctx context.Context, ownerUserID string, conversationIDs []string, tx ...any) (conversations []*relation.ConversationModel, err error) {
var newConversations []relation.ConversationModel
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "groups", conversations)
}()
err = utils.Wrap(getDBConn(c.DB, tx).Where("owner_user_id=? and conversation_id IN (?)", ownerUserID, conversationIDs).Find(&newConversations).Error, "")
for _, v := range newConversations {
v1 := v
conversations = append(conversations, &v1)
}
return conversations, err
}
func (c *ConversationGorm) Take(ctx context.Context, userID, conversationID string, tx ...any) (conversation *relation.ConversationModel, err error) {
cc := &relation.ConversationModel{}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "conversation", *conversation)
}()
return cc, utils.Wrap(getDBConn(c.DB, tx).Where("conversation_id = ? And owner_user_id = ?", conversationID, userID).Take(cc).Error, "")
}
func (c *ConversationGorm) FindUserID(ctx context.Context, userIDList []string, conversationID string, tx ...any) (existUserID []string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userIDList, "existUserID", existUserID)
}()
return existUserID, utils.Wrap(getDBConn(c.DB, tx).Where(" owner_user_id IN (?) and conversation_id=?", userIDList, conversationID).Pluck("owner_user_id", &existUserID).Error, "")
}
func (c *ConversationGorm) FindConversationID(ctx context.Context, userID string, conversationIDList []string, tx ...any) (existConversationID []string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "existConversationIDList", existConversationID)
}()
return existConversationID, utils.Wrap(getDBConn(c.DB, tx).Where(" conversation_id IN (?) and owner_user_id=?", conversationIDList, userID).Pluck("conversation_id", &existConversationID).Error, "")
}
func (c *ConversationGorm) FindUserIDAllConversationID(ctx context.Context, userID string, tx ...any) (conversationIDList []string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "conversationIDList", conversationIDList)
}()
return conversationIDList, utils.Wrap(getDBConn(c.DB, tx).Model(&relation.ConversationModel{}).Where("owner_user_id=?", userID).Pluck("conversation_id", &conversationIDList).Error, "")
}
-42
View File
@@ -1,42 +0,0 @@
package relation
import (
"gorm.io/gorm"
)
var RegisterDB *gorm.DB
type Register struct {
Account string `gorm:"column:account;primary_key;type:char(255)" json:"account"`
Password string `gorm:"column:password;type:varchar(255)" json:"password"`
Ex string `gorm:"column:ex;size:1024" json:"ex"`
UserID string `gorm:"column:user_id;type:varchar(255)" json:"userID"`
AreaCode string `gorm:"column:area_code;type:varchar(255)"`
InvitationCode string `gorm:"column:invitation_code;type:varchar(255)"`
RegisterIP string `gorm:"column:register_ip;type:varchar(255)"`
}
func GetRegister(account, areaCode, userID string) (*Register, error) {
var r Register
return &r, RegisterDB.Table("registers").Where("user_id = ? and user_id != ? or account = ? or account =? and area_code=?",
userID, "", account, account, areaCode).Take(&r).Error
}
func SetPassword(account, password, ex, userID, areaCode, ip string) error {
r := Register{
Account: account,
Password: password,
Ex: ex,
UserID: userID,
RegisterIP: ip,
AreaCode: areaCode,
}
return RegisterDB.Table("registers").Create(&r).Error
}
func ResetPassword(account, password string) error {
r := Register{
Password: password,
}
return RegisterDB.Table("registers").Where("account = ?", account).Updates(&r).Error
}
+130 -81
View File
@@ -1,83 +1,132 @@
package relation
//import (
// "fmt"
// "time"
//)
//
//func InsertToFriend(toInsertFollow *Friend) error {
// toInsertFollow.CreateTime = time.Now()
// err := FriendDB.Table("friends").Create(toInsertFollow).Error
// if err != nil {
// return err
// }
// return nil
//}
//
//func GetFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, error) {
// var friend Friend
// err := FriendDB.Table("friends").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Take(&friend).Error
// if err != nil {
// return nil, err
// }
// return &friend, err
//}
//
//func GetFriendListByUserID(OwnerUserID string) ([]Friend, error) {
// var friends []Friend
// var x Friend
// x.OwnerUserID = OwnerUserID
// err := FriendDB.Table("friends").Where("owner_user_id=?", OwnerUserID).Find(&friends).Error
// if err != nil {
// return nil, err
// }
// return friends, nil
//}
//
//func GetFriendIDListByUserID(OwnerUserID string) ([]string, error) {
// var friendIDList []string
// err := FriendDB.Table("friends").Where("owner_user_id=?", OwnerUserID).Pluck("friend_user_id", &friendIDList).Error
// if err != nil {
// return nil, err
// }
// return friendIDList, nil
//}
//
//func UpdateFriendComment(OwnerUserID, FriendUserID, Remark string) error {
// return FriendDB.Exec("update friends set remark=? where owner_user_id=? and friend_user_id=?", Remark, OwnerUserID, FriendUserID).Error
//}
//
//func DeleteSingleFriendInfo(OwnerUserID, FriendUserID string) error {
// return FriendDB.Table("friends").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Delete(Friend{}).Error
//}
//
//type FriendUser struct {
// Friend
// Nickname string `gorm:"column:name;size:255"`
//}
//
//func GetUserFriendsCMS(ownerUserID, friendUserName string, pageNumber, showNumber int32) (friendUserList []*FriendUser, count int64, err error) {
// DB := FriendDB.Table("friends").
// Select("friends.*, users.name").
// Where("friends.owner_user_id=?", ownerUserID).Limit(int(showNumber)).
// Joins("left join users on friends.friend_user_id = users.user_id").
// Offset(int(showNumber * (pageNumber - 1)))
// if friendUserName != "" {
// DB = DB.Where("users.name like ?", fmt.Sprintf("%%%s%%", friendUserName))
// }
// if err = DB.Count(&count).Error; err != nil {
// return
// }
// err = DB.Find(&friendUserList).Error
// return
//}
//
//func GetFriendByIDCMS(ownerUserID, friendUserID string) (friendUser *FriendUser, err error) {
// friendUser = &FriendUser{}
// err = FriendDB.Table("friends").
// Select("friends.*, users.name").
// Where("friends.owner_user_id=? and friends.friend_user_id=?", ownerUserID, friendUserID).
// Joins("left join users on friends.friend_user_id = users.user_id").
// Take(friendUser).Error
// return friendUser, err
//}
import (
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
"gorm.io/gorm"
)
type FriendGorm struct {
DB *gorm.DB
}
func NewFriendGorm(db *gorm.DB) relation.FriendModelInterface {
return &FriendGorm{DB: db}
}
func (f *FriendGorm) NewTx(tx any) relation.FriendModelInterface {
return &FriendGorm{DB: tx.(*gorm.DB)}
}
// 插入多条记录
func (f *FriendGorm) Create(ctx context.Context, friends []*relation.FriendModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friends", friends)
}()
return utils.Wrap(f.DB.Create(&friends).Error, "")
}
// 删除ownerUserID指定的好友
func (f *FriendGorm) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserIDs", friendUserIDs)
}()
err = utils.Wrap(f.DB.Where("owner_user_id = ? AND friend_user_id in ( ?)", ownerUserID, friendUserIDs).Delete(&relation.FriendModel{}).Error, "")
return err
}
// 更新ownerUserID单个好友信息 更新零值
func (f *FriendGorm) UpdateByMap(ctx context.Context, ownerUserID string, friendUserID string, args map[string]interface{}) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "args", args)
}()
return utils.Wrap(f.DB.Model(&relation.FriendModel{}).Where("owner_user_id = ? AND friend_user_id = ? ", ownerUserID, friendUserID).Updates(args).Error, "")
}
// 更新好友信息的非零值
func (f *FriendGorm) Update(ctx context.Context, friends []*relation.FriendModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friends", friends)
}()
return utils.Wrap(f.DB.Updates(&friends).Error, "")
}
// 更新好友备注(也支持零值
func (f *FriendGorm) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "remark", remark)
}()
if remark != "" {
return utils.Wrap(f.DB.Model(&relation.FriendModel{}).Where("owner_user_id = ? and friend_user_id = ?", ownerUserID, friendUserID).Update("remark", remark).Error, "")
}
m := make(map[string]interface{}, 1)
m["remark"] = ""
return utils.Wrap(f.DB.Model(&relation.FriendModel{}).Where("owner_user_id = ?", ownerUserID).Updates(m).Error, "")
}
// 获取单个好友信息,如没找到 返回错误
func (f *FriendGorm) Take(ctx context.Context, ownerUserID, friendUserID string) (friend *relation.FriendModel, err error) {
friend = &relation.FriendModel{}
defer tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "friend", *friend)
return friend, utils.Wrap(f.DB.Where("owner_user_id = ? and friend_user_id", ownerUserID, friendUserID).Take(friend).Error, "")
}
// 查找好友关系,如果是双向关系,则都返回
func (f *FriendGorm) FindUserState(ctx context.Context, userID1, userID2 string) (friends []*relation.FriendModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID1", userID1, "userID2", userID2, "friends", friends)
}()
return friends, utils.Wrap(f.DB.Where("(owner_user_id = ? and friend_user_id = ?) or (owner_user_id = ? and friend_user_id = ?)", userID1, userID2, userID2, userID1).Find(&friends).Error, "")
}
// 获取 owner指定的好友列表 如果有friendUserIDs不存在,也不返回错误
func (f *FriendGorm) FindFriends(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*relation.FriendModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserIDs", friendUserIDs, "friends", friends)
}()
return friends, utils.Wrap(f.DB.Where("owner_user_id = ? AND friend_user_id in (?)", ownerUserID, friendUserIDs).Find(&friends).Error, "")
}
// 获取哪些人添加了friendUserID 如果有ownerUserIDs不存在,也不返回错误
func (f *FriendGorm) FindReversalFriends(ctx context.Context, friendUserID string, ownerUserIDs []string) (friends []*relation.FriendModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friendUserID", friendUserID, "ownerUserIDs", ownerUserIDs, "friends", friends)
}()
return friends, utils.Wrap(f.DB.Where("friend_user_id = ? AND owner_user_id in (?)", friendUserID, ownerUserIDs).Find(&friends).Error, "")
}
// 获取ownerUserID好友列表 支持翻页
func (f *FriendGorm) FindOwnerFriends(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "pageNumber", pageNumber, "showNumber", showNumber, "friends", friends, "total", total)
}()
err = f.DB.Model(&relation.FriendModel{}).Where("owner_user_id = ? ", ownerUserID).Count(&total).Error
if err != nil {
return nil, 0, utils.Wrap(err, "")
}
err = utils.Wrap(f.DB.Where("owner_user_id = ? ", ownerUserID).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&friends).Error, "")
return
}
// 获取哪些人添加了friendUserID 支持翻页
func (f *FriendGorm) FindInWhoseFriends(ctx context.Context, friendUserID string, pageNumber, showNumber int32) (friends []*relation.FriendModel, total int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friendUserID", friendUserID, "pageNumber", pageNumber, "showNumber", showNumber, "friends", friends, "total", total)
}()
err = f.DB.Model(&relation.FriendModel{}).Where("friend_user_id = ? ", friendUserID).Count(&total).Error
if err != nil {
return nil, 0, utils.Wrap(err, "")
}
err = utils.Wrap(f.DB.Where("friend_user_id = ? ", friendUserID).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&friends).Error, "")
return
}
func (f *FriendGorm) FindFriendUserIDs(ctx context.Context, ownerUserID string) (friendUserIDs []string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserIDs", friendUserIDs)
}()
return friendUserIDs, utils.Wrap(f.DB.Model(&relation.FriendModel{}).Where("owner_user_id = ? ", ownerUserID).Pluck("friend_user_id", &friendUserIDs).Error, "")
}
-135
View File
@@ -1,135 +0,0 @@
package relation
import (
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
"gorm.io/gorm"
)
type FriendDB interface {
Create(ctx context.Context, friends []*relation.FriendModel) (err error)
Delete(ctx context.Context, ownerUserID string, friendUserIDs string) (err error)
UpdateByMap(ctx context.Context, ownerUserID string, args map[string]interface{}) (err error)
Update(ctx context.Context, friends []*relation.FriendModel) (err error)
UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error)
FindOwnerUserID(ctx context.Context, ownerUserID string) (friends []*relation.FriendModel, err error)
}
type FriendGorm struct {
DB *gorm.DB `gorm:"-"`
}
func NewFriendGorm(DB *gorm.DB) *FriendGorm {
return &FriendGorm{DB: DB}
}
type FriendUser struct {
FriendGorm
Nickname string `gorm:"column:name;size:255"`
}
// 插入多条记录
func (f *FriendGorm) Create(ctx context.Context, friends []*relation.FriendModel, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friends", friends)
}()
return utils.Wrap(getDBConn(f.DB, tx).Create(&friends).Error, "")
}
// 删除ownerUserID指定的好友
func (f *FriendGorm) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserIDs", friendUserIDs)
}()
err = utils.Wrap(getDBConn(f.DB, tx).Where("owner_user_id = ? AND friend_user_id in ( ?)", ownerUserID, friendUserIDs).Delete(&relation.FriendModel{}).Error, "")
return err
}
// 更新ownerUserID单个好友信息 更新零值
func (f *FriendGorm) UpdateByMap(ctx context.Context, ownerUserID string, friendUserID string, args map[string]interface{}, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "args", args)
}()
return utils.Wrap(getDBConn(f.DB, tx).Model(&relation.FriendModel{}).Where("owner_user_id = ? AND friend_user_id = ? ", ownerUserID, friendUserID).Updates(args).Error, "")
}
// 更新好友信息的非零值
func (f *FriendGorm) Update(ctx context.Context, friends []*relation.FriendModel, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friends", friends)
}()
return utils.Wrap(getDBConn(f.DB, tx).Updates(&friends).Error, "")
}
// 更新好友备注(也支持零值
func (f *FriendGorm) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "remark", remark)
}()
if remark != "" {
return utils.Wrap(getDBConn(f.DB, tx).Model(&relation.FriendModel{}).Where("owner_user_id = ? and friend_user_id = ?", ownerUserID, friendUserID).Update("remark", remark).Error, "")
}
m := make(map[string]interface{}, 1)
m["remark"] = ""
return utils.Wrap(getDBConn(f.DB, tx).Model(&relation.FriendModel{}).Where("owner_user_id = ?", ownerUserID).Updates(m).Error, "")
}
// 获取单个好友信息,如没找到 返回错误
func (f *FriendGorm) Take(ctx context.Context, ownerUserID, friendUserID string, tx ...any) (friend *relation.FriendModel, err error) {
friend = &relation.FriendModel{}
defer tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserID", friendUserID, "friend", *friend)
return friend, utils.Wrap(getDBConn(f.DB, tx).Where("owner_user_id = ? and friend_user_id", ownerUserID, friendUserID).Take(friend).Error, "")
}
// 查找好友关系,如果是双向关系,则都返回
func (f *FriendGorm) FindUserState(ctx context.Context, userID1, userID2 string, tx ...any) (friends []*relation.FriendModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID1", userID1, "userID2", userID2, "friends", friends)
}()
return friends, utils.Wrap(getDBConn(f.DB, tx).Where("(owner_user_id = ? and friend_user_id = ?) or (owner_user_id = ? and friend_user_id = ?)", userID1, userID2, userID2, userID1).Find(&friends).Error, "")
}
// 获取 owner指定的好友列表 如果有friendUserIDs不存在,也不返回错误
func (f *FriendGorm) FindFriends(ctx context.Context, ownerUserID string, friendUserIDs []string, tx ...any) (friends []*relation.FriendModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "friendUserIDs", friendUserIDs, "friends", friends)
}()
return friends, utils.Wrap(getDBConn(f.DB, tx).Where("owner_user_id = ? AND friend_user_id in (?)", ownerUserID, friendUserIDs).Find(&friends).Error, "")
}
// 获取哪些人添加了friendUserID 如果有ownerUserIDs不存在,也不返回错误
func (f *FriendGorm) FindReversalFriends(ctx context.Context, friendUserID string, ownerUserIDs []string, tx ...any) (friends []*relation.FriendModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friendUserID", friendUserID, "ownerUserIDs", ownerUserIDs, "friends", friends)
}()
return friends, utils.Wrap(getDBConn(f.DB, tx).Where("friend_user_id = ? AND owner_user_id in (?)", friendUserID, ownerUserIDs).Find(&friends).Error, "")
}
// 获取ownerUserID好友列表 支持翻页
func (f *FriendGorm) FindOwnerFriends(ctx context.Context, ownerUserID string, pageNumber, showNumber int32, tx ...any) (friends []*relation.FriendModel, total int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "pageNumber", pageNumber, "showNumber", showNumber, "friends", friends, "total", total)
}()
err = getDBConn(f.DB, tx).Model(&relation.FriendModel{}).Where("owner_user_id = ? ", ownerUserID).Count(&total).Error
if err != nil {
return nil, 0, utils.Wrap(err, "")
}
err = utils.Wrap(getDBConn(f.DB, tx).Where("owner_user_id = ? ", ownerUserID).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&friends).Error, "")
return
}
// 获取哪些人添加了friendUserID 支持翻页
func (f *FriendGorm) FindInWhoseFriends(ctx context.Context, friendUserID string, pageNumber, showNumber int32, tx ...any) (friends []*relation.FriendModel, total int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friendUserID", friendUserID, "pageNumber", pageNumber, "showNumber", showNumber, "friends", friends, "total", total)
}()
err = getDBConn(f.DB, tx).Model(&relation.FriendModel{}).Where("friend_user_id = ? ", friendUserID).Count(&total).Error
if err != nil {
return nil, 0, utils.Wrap(err, "")
}
err = utils.Wrap(getDBConn(f.DB, tx).Where("friend_user_id = ? ", friendUserID).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&friends).Error, "")
return
}
+25 -25
View File
@@ -8,92 +8,92 @@ import (
"gorm.io/gorm"
)
//var FriendRequestDB *gorm.DB
func NewFriendRequestGorm(db *gorm.DB) *FriendRequestGorm {
var fr FriendRequestGorm
fr.DB = db
return &fr
func NewFriendRequestGorm(db *gorm.DB) relation.FriendRequestModelInterface {
return &FriendRequestGorm{db}
}
type FriendRequestGorm struct {
DB *gorm.DB `gorm:"-"`
DB *gorm.DB
}
func (f *FriendRequestGorm) NewTx(tx any) relation.FriendRequestModelInterface {
return &FriendRequestGorm{DB: tx.(*gorm.DB)}
}
// 插入多条记录
func (f *FriendRequestGorm) Create(ctx context.Context, friendRequests []*relation.FriendRequestModel, tx ...*gorm.DB) (err error) {
func (f *FriendRequestGorm) Create(ctx context.Context, friendRequests []*relation.FriendRequestModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friendRequests", friendRequests)
}()
return utils.Wrap(getDBConn(f.DB, tx).Create(&friendRequests).Error, "")
return utils.Wrap(f.DB.Create(&friendRequests).Error, "")
}
// 删除记录
func (f *FriendRequestGorm) Delete(ctx context.Context, fromUserID, toUserID string, tx ...*gorm.DB) (err error) {
func (f *FriendRequestGorm) Delete(ctx context.Context, fromUserID, toUserID string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "fromUserID", fromUserID, "toUserID", toUserID)
}()
return utils.Wrap(getDBConn(f.DB, tx).Where("from_user_id = ? AND to_user_id = ?", fromUserID, toUserID).Delete(&relation.FriendRequestModel{}).Error, "")
return utils.Wrap(f.DB.Where("from_user_id = ? AND to_user_id = ?", fromUserID, toUserID).Delete(&relation.FriendRequestModel{}).Error, "")
}
// 更新零值
func (f *FriendRequestGorm) UpdateByMap(ctx context.Context, formUserID string, toUserID string, args map[string]interface{}, tx ...*gorm.DB) (err error) {
func (f *FriendRequestGorm) UpdateByMap(ctx context.Context, formUserID string, toUserID string, args map[string]interface{}) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "formUserID", formUserID, "toUserID", toUserID, "args", args)
}()
return utils.Wrap(getDBConn(f.DB, tx).Model(&relation.FriendRequestModel{}).Where("from_user_id = ? AND to_user_id ", formUserID, toUserID).Updates(args).Error, "")
return utils.Wrap(f.DB.Model(&relation.FriendRequestModel{}).Where("from_user_id = ? AND to_user_id ", formUserID, toUserID).Updates(args).Error, "")
}
// 更新多条记录 (非零值)
func (f *FriendRequestGorm) Update(ctx context.Context, friendRequests []*relation.FriendRequestModel, tx ...*gorm.DB) (err error) {
func (f *FriendRequestGorm) Update(ctx context.Context, friendRequests []*relation.FriendRequestModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "friendRequests", friendRequests)
}()
return utils.Wrap(getDBConn(f.DB, tx).Updates(&friendRequests).Error, "")
return utils.Wrap(f.DB.Updates(&friendRequests).Error, "")
}
// 获取来指定用户的好友申请 未找到 不返回错误
func (f *FriendRequestGorm) Find(ctx context.Context, fromUserID, toUserID string, tx ...*gorm.DB) (friendRequest *relation.FriendRequestModel, err error) {
func (f *FriendRequestGorm) Find(ctx context.Context, fromUserID, toUserID string) (friendRequest *relation.FriendRequestModel, err error) {
friendRequest = &relation.FriendRequestModel{}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "fromUserID", fromUserID, "toUserID", toUserID, "friendRequest", *friendRequest)
}()
utils.Wrap(getDBConn(f.DB, tx).Where("from_user_id = ? and to_user_id", fromUserID, toUserID).Find(friendRequest).Error, "")
utils.Wrap(f.DB.Where("from_user_id = ? and to_user_id", fromUserID, toUserID).Find(friendRequest).Error, "")
return
}
func (f *FriendRequestGorm) Take(ctx context.Context, fromUserID, toUserID string, tx ...*gorm.DB) (friendRequest *relation.FriendRequestModel, err error) {
func (f *FriendRequestGorm) Take(ctx context.Context, fromUserID, toUserID string) (friendRequest *relation.FriendRequestModel, err error) {
friendRequest = &relation.FriendRequestModel{}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "fromUserID", fromUserID, "toUserID", toUserID, "friendRequest", *friendRequest)
}()
utils.Wrap(getDBConn(f.DB, tx).Where("from_user_id = ? and to_user_id", fromUserID, toUserID).Take(friendRequest).Error, "")
utils.Wrap(f.DB.Where("from_user_id = ? and to_user_id", fromUserID, toUserID).Take(friendRequest).Error, "")
return
}
// 获取toUserID收到的好友申请列表
func (f *FriendRequestGorm) FindToUserID(ctx context.Context, toUserID string, pageNumber, showNumber int32, tx ...*gorm.DB) (friendRequests []*relation.FriendRequestModel, total int64, err error) {
func (f *FriendRequestGorm) FindToUserID(ctx context.Context, toUserID string, pageNumber, showNumber int32) (friendRequests []*relation.FriendRequestModel, total int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "toUserID", toUserID, "friendRequests", friendRequests)
}()
err = getDBConn(f.DB, tx).Model(&relation.FriendRequestModel{}).Where("to_user_id = ? ", toUserID).Count(&total).Error
err = f.DB.Model(&relation.FriendRequestModel{}).Where("to_user_id = ? ", toUserID).Count(&total).Error
if err != nil {
return nil, 0, utils.Wrap(err, "")
}
err = utils.Wrap(getDBConn(f.DB, tx).Where("to_user_id = ? ", toUserID).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&friendRequests).Error, "")
err = utils.Wrap(f.DB.Where("to_user_id = ? ", toUserID).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&friendRequests).Error, "")
return
}
// 获取fromUserID发出去的好友申请列表
func (f *FriendRequestGorm) FindFromUserID(ctx context.Context, fromUserID string, pageNumber, showNumber int32, tx ...*gorm.DB) (friendRequests []*relation.FriendRequestModel, total int64, err error) {
func (f *FriendRequestGorm) FindFromUserID(ctx context.Context, fromUserID string, pageNumber, showNumber int32) (friendRequests []*relation.FriendRequestModel, total int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "fromUserID", fromUserID, "friendRequests", friendRequests)
}()
err = getDBConn(f.DB, tx).Model(&relation.FriendRequestModel{}).Where("from_user_id = ? ", fromUserID).Count(&total).Error
err = f.DB.Model(&relation.FriendRequestModel{}).Where("from_user_id = ? ", fromUserID).Count(&total).Error
if err != nil {
return nil, 0, utils.Wrap(err, "")
}
err = utils.Wrap(getDBConn(f.DB, tx).Where("from_user_id = ? ", fromUserID).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&friendRequests).Error, "")
err = utils.Wrap(f.DB.Where("from_user_id = ? ", fromUserID).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&friendRequests).Error, "")
return
}
+28 -24
View File
@@ -19,49 +19,53 @@ func NewGroupMemberDB(db *gorm.DB) relation.GroupMemberModelInterface {
return &GroupMemberGorm{DB: db}
}
func (g *GroupMemberGorm) Create(ctx context.Context, groupMemberList []*relation.GroupMemberModel, tx ...any) (err error) {
func (g *GroupMemberGorm) NewTx(tx any) relation.GroupMemberModelInterface {
return &GroupMemberGorm{DB: tx.(*gorm.DB)}
}
func (g *GroupMemberGorm) Create(ctx context.Context, groupMemberList []*relation.GroupMemberModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupMemberList", groupMemberList)
}()
return utils.Wrap(getDBConn(g.DB, tx).Create(&groupMemberList).Error, "")
return utils.Wrap(g.DB.Create(&groupMemberList).Error, "")
}
func (g *GroupMemberGorm) Delete(ctx context.Context, groupID string, userIDs []string, tx ...any) (err error) {
func (g *GroupMemberGorm) Delete(ctx context.Context, groupID string, userIDs []string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userIDs", userIDs)
}()
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and user_id in (?)", groupID, userIDs).Delete(&relation.GroupMemberModel{}).Error, "")
return utils.Wrap(g.DB.Where("group_id = ? and user_id in (?)", groupID, userIDs).Delete(&relation.GroupMemberModel{}).Error, "")
}
func (g *GroupMemberGorm) DeleteGroup(ctx context.Context, groupIDs []string, tx ...any) (err error) {
func (g *GroupMemberGorm) DeleteGroup(ctx context.Context, groupIDs []string) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs)
}()
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Delete(&relation.GroupMemberModel{}).Error, "")
return utils.Wrap(g.DB.Where("group_id in (?)", groupIDs).Delete(&relation.GroupMemberModel{}).Error, "")
}
func (g *GroupMemberGorm) Update(ctx context.Context, groupID string, userID string, data map[string]any, tx ...any) (err error) {
func (g *GroupMemberGorm) Update(ctx context.Context, groupID string, userID string, data map[string]any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "data", data)
}()
return utils.Wrap(getDBConn(g.DB, tx).Model(&relation.GroupMemberModel{}).Where("group_id = ? and user_id = ?", groupID, userID).Updates(data).Error, "")
return utils.Wrap(g.DB.Model(&relation.GroupMemberModel{}).Where("group_id = ? and user_id = ?", groupID, userID).Updates(data).Error, "")
}
func (g *GroupMemberGorm) UpdateRoleLevel(ctx context.Context, groupID string, userID string, roleLevel int32, tx ...any) (rowsAffected int64, err error) {
func (g *GroupMemberGorm) UpdateRoleLevel(ctx context.Context, groupID string, userID string, roleLevel int32) (rowsAffected int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "roleLevel", roleLevel)
}()
db := getDBConn(g.DB, tx).Model(&relation.GroupMemberModel{}).Where("group_id = ? and user_id = ?", groupID, userID).Updates(map[string]any{
db := g.DB.Model(&relation.GroupMemberModel{}).Where("group_id = ? and user_id = ?", groupID, userID).Updates(map[string]any{
"role_level": roleLevel,
})
return db.RowsAffected, utils.Wrap(db.Error, "")
}
func (g *GroupMemberGorm) Find(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, tx ...any) (groupList []*relation.GroupMemberModel, err error) {
func (g *GroupMemberGorm) Find(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) (groupList []*relation.GroupMemberModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "userIDs", userIDs, "groupList", groupList)
}()
db := getDBConn(g.DB, tx)
db := g.DB
if len(groupIDs) > 0 {
db = db.Where("group_id in (?)", groupIDs)
}
@@ -74,41 +78,41 @@ func (g *GroupMemberGorm) Find(ctx context.Context, groupIDs []string, userIDs [
return groupList, utils.Wrap(db.Find(&groupList).Error, "")
}
func (g *GroupMemberGorm) Take(ctx context.Context, groupID string, userID string, tx ...any) (groupMember *relation.GroupMemberModel, err error) {
func (g *GroupMemberGorm) Take(ctx context.Context, groupID string, userID string) (groupMember *relation.GroupMemberModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "groupMember", *groupMember)
}()
groupMember = &relation.GroupMemberModel{}
return groupMember, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and user_id = ?", groupID, userID).Take(groupMember).Error, "")
return groupMember, utils.Wrap(g.DB.Where("group_id = ? and user_id = ?", groupID, userID).Take(groupMember).Error, "")
}
func (g *GroupMemberGorm) TakeOwner(ctx context.Context, groupID string, tx ...any) (groupMember *relation.GroupMemberModel, err error) {
func (g *GroupMemberGorm) TakeOwner(ctx context.Context, groupID string) (groupMember *relation.GroupMemberModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "groupMember", *groupMember)
}()
groupMember = &relation.GroupMemberModel{}
return groupMember, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and role_level = ?", groupID, constant.GroupOwner).Take(groupMember).Error, "")
return groupMember, utils.Wrap(g.DB.Where("group_id = ? and role_level = ?", groupID, constant.GroupOwner).Take(groupMember).Error, "")
}
func (g *GroupMemberGorm) SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32, tx ...any) (total uint32, groupList []*relation.GroupMemberModel, err error) {
func (g *GroupMemberGorm) SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (total uint32, groupList []*relation.GroupMemberModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "keyword", keyword, "groupIDs", groupIDs, "userIDs", userIDs, "roleLevels", roleLevels, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groupList", groupList)
}()
db := getDBConn(g.DB, tx)
db := g.DB
gormIn(&db, "group_id", groupIDs)
gormIn(&db, "user_id", userIDs)
gormIn(&db, "role_level", roleLevels)
return gormSearch[relation.GroupMemberModel](db, []string{"nickname"}, keyword, pageNumber, showNumber)
}
func (g *GroupMemberGorm) MapGroupMemberNum(ctx context.Context, groupIDs []string, tx ...any) (count map[string]uint32, err error) {
func (g *GroupMemberGorm) MapGroupMemberNum(ctx context.Context, groupIDs []string) (count map[string]uint32, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "count", count)
}()
return mapCount(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs), "group_id")
return mapCount(g.DB.Where("group_id in (?)", groupIDs), "group_id")
}
func (g *GroupMemberGorm) FindJoinUserID(ctx context.Context, groupIDs []string, tx ...any) (groupUsers map[string][]string, err error) {
func (g *GroupMemberGorm) FindJoinUserID(ctx context.Context, groupIDs []string) (groupUsers map[string][]string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "groupUsers", groupUsers)
}()
@@ -116,7 +120,7 @@ func (g *GroupMemberGorm) FindJoinUserID(ctx context.Context, groupIDs []string,
GroupID string `gorm:"group_id"`
UserID string `gorm:"user_id"`
}
if err := getDBConn(g.DB, tx).Model(&relation.GroupMemberModel{}).Where("group_id in (?)", groupIDs).Find(&items).Error; err != nil {
if err := g.DB.Model(&relation.GroupMemberModel{}).Where("group_id in (?)", groupIDs).Find(&items).Error; err != nil {
return nil, utils.Wrap(err, "")
}
groupUsers = make(map[string][]string)
@@ -126,9 +130,9 @@ func (g *GroupMemberGorm) FindJoinUserID(ctx context.Context, groupIDs []string,
return groupUsers, nil
}
func (g *GroupMemberGorm) FindMemberUserID(ctx context.Context, groupID string, tx ...any) (userIDs []string, err error) {
func (g *GroupMemberGorm) FindMemberUserID(ctx context.Context, groupID string) (userIDs []string, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userIDs", userIDs)
}()
return userIDs, utils.Wrap(getDBConn(g.DB, tx).Model(&relation.GroupMemberModel{}).Where("group_id = ?", groupID).Pluck("user_id", &userIDs).Error, "")
return userIDs, utils.Wrap(g.DB.Model(&relation.GroupMemberModel{}).Where("group_id = ?", groupID).Pluck("user_id", &userIDs).Error, "")
}
+20 -23
View File
@@ -18,59 +18,56 @@ func NewGroupDB(db *gorm.DB) relation.GroupModelInterface {
return &GroupGorm{DB: db}
}
func (g *GroupGorm) Create(ctx context.Context, groups []*relation.GroupModel, tx ...any) (err error) {
func (g *GroupGorm) NewTx(tx any) relation.GroupModelInterface {
return &GroupGorm{DB: tx.(*gorm.DB)}
}
func (g *GroupGorm) Create(ctx context.Context, groups []*relation.GroupModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groups", groups)
}()
return utils.Wrap(getDBConn(g.DB, tx).Create(&groups).Error, "")
return utils.Wrap(g.DB.Create(&groups).Error, "")
}
//func (g *GroupGorm) Delete(ctx context.Context, groupIDs []string, tx ...any) (err error) {
// defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs)
// }()
// return utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Delete(&relation.GroupModel{}).Error, "")
//}
func (g *GroupGorm) UpdateMap(ctx context.Context, groupID string, args map[string]interface{}, tx ...any) (err error) {
func (g *GroupGorm) UpdateMap(ctx context.Context, groupID string, args map[string]interface{}) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "args", args)
}()
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Model(&relation.GroupModel{}).Updates(args).Error, "")
return utils.Wrap(g.DB.Where("group_id = ?", groupID).Model(&relation.GroupModel{}).Updates(args).Error, "")
}
func (g *GroupGorm) UpdateStatus(ctx context.Context, groupID string, status int32, tx ...any) (err error) {
func (g *GroupGorm) UpdateStatus(ctx context.Context, groupID string, status int32) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "status", status)
}()
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Model(&relation.GroupModel{}).Updates(map[string]any{"status": status}).Error, "")
return utils.Wrap(g.DB.Where("group_id = ?", groupID).Model(&relation.GroupModel{}).Updates(map[string]any{"status": status}).Error, "")
}
func (g *GroupGorm) Find(ctx context.Context, groupIDs []string, tx ...any) (groups []*relation.GroupModel, err error) {
func (g *GroupGorm) Find(ctx context.Context, groupIDs []string) (groups []*relation.GroupModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "groups", groups)
}()
return groups, utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Find(&groups).Error, "")
return groups, utils.Wrap(g.DB.Where("group_id in (?)", groupIDs).Find(&groups).Error, "")
}
func (g *GroupGorm) Take(ctx context.Context, groupID string, tx ...any) (group *relation.GroupModel, err error) {
func (g *GroupGorm) Take(ctx context.Context, groupID string) (group *relation.GroupModel, err error) {
group = &relation.GroupModel{}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "group", group)
}()
return group, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Take(group).Error, "")
return group, utils.Wrap(g.DB.Where("group_id = ?", groupID).Take(group).Error, "")
}
func (g *GroupGorm) Search(ctx context.Context, keyword string, pageNumber, showNumber int32, tx ...any) (total uint32, groups []*relation.GroupModel, err error) {
func (g *GroupGorm) Search(ctx context.Context, keyword string, pageNumber, showNumber int32) (total uint32, groups []*relation.GroupModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "keyword", keyword, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groups", groups)
}()
return gormSearch[relation.GroupModel](getDBConn(g.DB, tx), []string{"name"}, keyword, pageNumber, showNumber)
return gormSearch[relation.GroupModel](g.DB, []string{"name"}, keyword, pageNumber, showNumber)
}
func (g *GroupGorm) GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error) {
if err := g.DB.Model(&relation.GroupModel{}).Where("group_type = ? ", groupType).Pluck("group_id", &groupIDs).Error; err != nil {
return nil, utils.Wrap(err, "")
}
return groupIDs, nil
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupType", groupType, "groupIDs", groupIDs)
}()
return groupIDs, utils.Wrap(g.DB.Model(&relation.GroupModel{}).Where("group_type = ? ", groupType).Pluck("group_id", &groupIDs).Error, "")
}
+14 -42
View File
@@ -8,78 +8,50 @@ import (
"gorm.io/gorm"
)
var _ relation.GroupRequestModelInterface = (*GroupRequestGorm)(nil)
type GroupRequestGorm struct {
DB *gorm.DB
}
func (g *GroupRequestGorm) NewTx(tx any) relation.GroupRequestModelInterface {
return &GroupRequestGorm{
DB: tx.(*gorm.DB),
}
}
func NewGroupRequest(db *gorm.DB) relation.GroupRequestModelInterface {
return &GroupRequestGorm{
DB: db,
}
}
func (g *GroupRequestGorm) Create(ctx context.Context, groupRequests []*relation.GroupRequestModel, tx ...any) (err error) {
func (g *GroupRequestGorm) Create(ctx context.Context, groupRequests []*relation.GroupRequestModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupRequests", groupRequests)
}()
return utils.Wrap(getDBConn(g.DB, tx).Create(&groupRequests).Error, utils.GetSelfFuncName())
return utils.Wrap(g.DB.Create(&groupRequests).Error, utils.GetSelfFuncName())
}
//func (g *GroupRequestGorm) Delete(ctx context.Context, groupRequests []*relation.GroupRequestModel, tx ...any) (err error) {
// defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupRequests", groupRequests)
// }()
// return utils.Wrap(getDBConn(g.DB, tx).Delete(&groupRequests).Error, utils.GetSelfFuncName())
//}
//func (g *GroupRequestGorm) UpdateMap(ctx context.Context, groupID string, userID string, args map[string]interface{}, tx ...any) (err error) {
// defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "args", args)
// }()
// return utils.Wrap(getDBConn(g.DB, tx).Model(&relation.GroupRequestModel{}).Where("group_id = ? and user_id = ? ", groupID, userID).Updates(args).Error, utils.GetSelfFuncName())
//}
func (g *GroupRequestGorm) UpdateHandler(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, tx ...any) (err error) {
func (g *GroupRequestGorm) UpdateHandler(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "handledMsg", handledMsg, "handleResult", handleResult)
}()
return utils.Wrap(getDBConn(g.DB, tx).Model(&relation.GroupRequestModel{}).Where("group_id = ? and user_id = ? ", groupID, userID).Updates(map[string]any{
return utils.Wrap(g.DB.Model(&relation.GroupRequestModel{}).Where("group_id = ? and user_id = ? ", groupID, userID).Updates(map[string]any{
"handle_msg": handledMsg,
"handle_result": handleResult,
}).Error, utils.GetSelfFuncName())
}
//func (g *GroupRequestGorm) Update(ctx context.Context, groupRequests []*relation.GroupRequestModel, tx ...any) (err error) {
// defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupRequests", groupRequests)
// }()
// return utils.Wrap(getDBConn(g.DB, tx).Updates(&groupRequests).Error, utils.GetSelfFuncName())
//}
//func (g *GroupRequestGorm) Find(ctx context.Context, groupRequests []*relation.GroupRequestModel, tx ...any) (resultGroupRequests []*relation.GroupRequestModel, err error) {
// defer func() {
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupRequests", groupRequests, "resultGroupRequests", resultGroupRequests)
// }()
// var where [][]interface{}
// for _, groupMember := range groupRequests {
// where = append(where, []interface{}{groupMember.GroupID, groupMember.UserID})
// }
// return resultGroupRequests, utils.Wrap(getDBConn(g.DB, tx).Where("(group_id, user_id) in ?", where).Find(&resultGroupRequests).Error, utils.GetSelfFuncName())
//}
func (g *GroupRequestGorm) Take(ctx context.Context, groupID string, userID string, tx ...any) (groupRequest *relation.GroupRequestModel, err error) {
func (g *GroupRequestGorm) Take(ctx context.Context, groupID string, userID string) (groupRequest *relation.GroupRequestModel, err error) {
groupRequest = &relation.GroupRequestModel{}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "groupRequest", *groupRequest)
}()
return groupRequest, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and user_id = ? ", groupID, userID).Take(groupRequest).Error, utils.GetSelfFuncName())
return groupRequest, utils.Wrap(g.DB.Where("group_id = ? and user_id = ? ", groupID, userID).Take(groupRequest).Error, utils.GetSelfFuncName())
}
func (g *GroupRequestGorm) Page(ctx context.Context, userID string, pageNumber, showNumber int32, tx ...any) (total uint32, groups []*relation.GroupRequestModel, err error) {
func (g *GroupRequestGorm) Page(ctx context.Context, userID string, pageNumber, showNumber int32) (total uint32, groups []*relation.GroupRequestModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groups", groups)
}()
return gormSearch[relation.GroupRequestModel](getDBConn(g.DB, tx).Where("user_id = ?", userID), nil, "", pageNumber, showNumber)
return gormSearch[relation.GroupRequestModel](g.DB.Where("user_id = ?", userID), nil, "", pageNumber, showNumber)
}
+5 -83
View File
@@ -3,14 +3,14 @@ package relation
import (
"Open_IM/pkg/common/config"
"fmt"
"gorm.io/driver/mysql"
"time"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/logger"
)
func NewGormDB() (*gorm.DB, error) {
func newMysqlGormDB() (*gorm.DB, error) {
dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local",
config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], "mysql")
db, err := gorm.Open(mysql.Open(dsn), nil)
@@ -58,91 +58,13 @@ func NewGormDB() (*gorm.DB, error) {
return db, nil
}
type Mysql struct {
gormConn *gorm.DB
// gorm mysql
func NewGormDB() (*gorm.DB, error) {
return newMysqlGormDB()
}
func (m *Mysql) GormConn() *gorm.DB {
return m.gormConn
}
//func (m *Mysql) SetGormConn(gormConn *gorm.DB) {
// m.gormConn = gormConn
//}
//
//func (m *Mysql) InitConn() *Mysql {
// dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local",
// config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], "mysql")
// var db *gorm.DB
// db, err := gorm.Open(mysql.Open(dsn), nil)
// if err != nil {
// time.Sleep(time.Duration(30) * time.Second)
// db, err = gorm.Open(mysql.Open(dsn), nil)
// if err != nil {
// panic(err.Error() + " open failed " + dsn)
// }
// }
// sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s default charset utf8 COLLATE utf8_general_ci;", config.Config.Mysql.DBDatabaseName)
// err = db.Exec(sql).Error
// if err != nil {
// panic(err.Error() + " Exec failed:" + sql)
// }
// dsn = fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local",
// config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName)
// newLogger := logger.New(
// Writer{},
// logger.Config{
// SlowThreshold: time.Duration(config.Config.Mysql.SlowThreshold) * time.Millisecond, // Slow SQL threshold
// LogLevel: logger.LogLevel(config.Config.Mysql.LogLevel), // Log level
// IgnoreRecordNotFoundError: true, // Ignore ErrRecordNotFound error for logger
// Colorful: true, // Disable color
// },
// )
// db, err = gorm.Open(mysql.Open(dsn), &gorm.Config{
// Logger: newLogger,
// })
// if err != nil {
// panic(err.Error() + " Open failed " + dsn)
// }
// sqlDB, err := db.DB()
// if err != nil {
// panic(err.Error() + " DB.DB() failed ")
// }
// sqlDB.SetConnMaxLifetime(time.Second * time.Duration(config.Config.Mysql.DBMaxLifeTime))
// sqlDB.SetMaxOpenConns(config.Config.Mysql.DBMaxOpenConns)
// sqlDB.SetMaxIdleConns(config.Config.Mysql.DBMaxIdleConns)
// if db == nil {
// panic("db is nil")
// }
// m.SetGormConn(db)
// return m
//}
//models := []interface{}{&Friend{}, &FriendRequest{}, &Group{}, &GroupMember{}, &GroupRequest{},
// &User{}, &Black{}, &ChatLog{}, &Conversation{}, &AppVersion{}}
//func (m *Mysql) AutoMigrateModel(model interface{}) error {
// err := m.gormConn.AutoMigrate(model)
// if err != nil {
// return err
// }
// m.gormConn.Set("gorm:table_options", "CHARSET=utf8")
// m.gormConn.Set("gorm:table_options", "collation=utf8_unicode_ci")
// _ = m.gormConn.Migrator().CreateTable(model)
// return nil
//}
type Writer struct{}
func (w Writer) Printf(format string, args ...interface{}) {
fmt.Printf(format, args...)
}
func getDBConn(db *gorm.DB, tx []any) *gorm.DB {
if len(tx) > 0 {
if txDB, ok := tx[0].(*gorm.DB); ok {
return txDB
}
}
return db
}
+60 -178
View File
@@ -1,204 +1,86 @@
package relation
import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"fmt"
"context"
"gorm.io/gorm"
"time"
)
func InitManager() {
for k, v := range config.Config.Manager.AppManagerUid {
_, err := GetUserByUserID(v)
if err != nil {
} else {
continue
}
var appMgr User
appMgr.UserID = v
if k == 0 {
appMgr.Nickname = config.Config.Manager.AppSysNotificationName
} else {
appMgr.Nickname = "AppManager" + utils.IntToString(k+1)
}
appMgr.AppMangerLevel = constant.AppAdmin
err = UserRegister(appMgr)
if err != nil {
fmt.Println("AppManager insert error ", err.Error(), appMgr)
} else {
fmt.Println("AppManager insert ", appMgr)
}
}
type UserGorm struct {
DB *gorm.DB
}
func UserRegister(user User) error {
user.CreateTime = time.Now()
if user.AppMangerLevel == 0 {
user.AppMangerLevel = constant.AppOrdinaryUsers
}
if user.Birth.Unix() < 0 {
user.Birth = utils.UnixSecondToTime(0)
}
err := UserDB.Table("users").Create(&user).Error
if err != nil {
return err
}
return nil
func NewUserGorm(DB *gorm.DB) relation.UserModelInterface {
return &UserGorm{DB: DB}
}
func GetAllUser() ([]User, error) {
var userList []User
err := UserDB.Table("users").Find(&userList).Error
return userList, err
// 插入多条
func (u *UserGorm) Create(ctx context.Context, users []*relation.UserModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "users", users)
}()
return utils.Wrap(u.DB.Create(&users).Error, "")
}
func TakeUserByUserID(userID string) (*User, error) {
var user User
err := UserDB.Table("users").Where("user_id=?", userID).Take(&user).Error
if err != nil {
return nil, err
}
return &user, nil
// 更新用户信息 零值
func (u *UserGorm) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "args", args)
}()
return utils.Wrap(u.DB.Model(&relation.UserModel{}).Where("user_id = ?", userID).Updates(args).Error, "")
}
func GetUserByUserID(userID string) (*User, error) {
var user User
err := UserDB.Table("users").Where("user_id=?", userID).Take(&user).Error
if err != nil {
return nil, err
}
return &user, nil
// 更新多个用户信息 非零值
func (u *UserGorm) Update(ctx context.Context, users []*relation.UserModel) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "users", users)
}()
return utils.Wrap(u.DB.Updates(&users).Error, "")
}
func GetUsersByUserIDList(userIDList []string) ([]*User, error) {
var userList []*User
err := UserDB.Table("users").Where("user_id in (?)", userIDList).Find(&userList).Error
return userList, err
}
func GetUserNameByUserID(userID string) (string, error) {
var user User
err := UserDB.Table("users").Select("name").Where("user_id=?", userID).First(&user).Error
if err != nil {
return "", err
}
return user.Nickname, nil
}
func UpdateUserInfo(user User) error {
return UserDB.Where("user_id=?", user.UserID).Updates(&user).Error
}
func UpdateUserInfoByMap(user User, m map[string]interface{}) error {
err := UserDB.Where("user_id=?", user.UserID).Updates(m).Error
return err
}
func SelectAllUserID() ([]string, error) {
var resultArr []string
err := UserDB.Pluck("user_id", &resultArr).Error
if err != nil {
return nil, err
}
return resultArr, nil
}
func SelectSomeUserID(userIDList []string) ([]string, error) {
var resultArr []string
err := UserDB.Pluck("user_id", &resultArr).Error
if err != nil {
return nil, err
}
return resultArr, nil
}
func GetUsers(showNumber, pageNumber int32) ([]User, error) {
var users []User
err := UserDB.Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&users).Error
if err != nil {
return users, err
}
// 获取指定用户信息 不存在,也不返回错误
func (u *UserGorm) Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userIDs", userIDs, "users", users)
}()
err = utils.Wrap(u.DB.Where("user_id in (?)", userIDs).Find(&users).Error, "")
return users, err
}
func AddUser(userID string, phoneNumber string, name string, email string, gender int32, faceURL string, birth string) error {
_birth, err := utils.TimeStringToTime(birth)
// 获取某个用户信息 不存在,则返回错误
func (u *UserGorm) Take(ctx context.Context, userID string) (user *relation.UserModel, err error) {
user = &relation.UserModel{}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "user", *user)
}()
err = utils.Wrap(u.DB.Where("user_id = ?", userID).Take(&user).Error, "")
return user, err
}
// 获取用户信息 不存在,不返回错误
func (u *UserGorm) Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation.UserModel, count int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "pageNumber", pageNumber, "showNumber", showNumber, "users", users, "count", count)
}()
err = utils.Wrap(u.DB.Model(&relation.UserModel{}).Count(&count).Error, "")
if err != nil {
return err
return
}
user := User{
UserID: userID,
Nickname: name,
FaceURL: faceURL,
Gender: gender,
PhoneNumber: phoneNumber,
Birth: _birth,
Email: email,
Ex: "",
CreateTime: time.Now(),
}
result := UserDB.Create(&user)
return result.Error
err = utils.Wrap(u.DB.Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&users).Error, "")
return
}
func UsersIsBlock(userIDList []string) (inBlockUserIDList []string, err error) {
err = BlackListDB.Where("uid in (?) and end_disable_time > now()", userIDList).Pluck("uid", &inBlockUserIDList).Error
return inBlockUserIDList, err
}
type BlockUserInfo struct {
User User
BeginDisableTime time.Time
EndDisableTime time.Time
}
func GetUserByName(userName string, showNumber, pageNumber int32) ([]User, error) {
var users []User
err := UserDB.Where(" name like ?", fmt.Sprintf("%%%s%%", userName)).Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&users).Error
return users, err
}
func GetUsersByNameAndID(content string, showNumber, pageNumber int32) ([]User, int64, error) {
var users []User
var count int64
db := UserDB.Where(" name like ? or user_id = ? ", fmt.Sprintf("%%%s%%", content), content)
if err := db.Count(&count).Error; err != nil {
return nil, 0, err
// 获取所有用户ID
func (u *UserGorm) PageUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, count int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "pageNumber", pageNumber, "showNumber", showNumber, "userIDs", userIDs, "count", count)
}()
err = utils.Wrap(u.DB.Model(&relation.UserModel{}).Count(&count).Error, "")
if err != nil {
return
}
err := db.Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&users).Error
return users, count, err
}
func GetUserIDsByEmailAndID(phoneNumber, email string) ([]string, error) {
if phoneNumber == "" && email == "" {
return nil, nil
}
db := UserDB
if phoneNumber != "" {
db = db.Where("phone_number = ? ", phoneNumber)
}
if email != "" {
db = db.Where("email = ? ", email)
}
var userIDList []string
err := db.Pluck("user_id", &userIDList).Error
return userIDList, err
}
func GetUsersCount(userName string) (int32, error) {
var count int64
if err := UserDB.Where(" name like ? ", fmt.Sprintf("%%%s%%", userName)).Count(&count).Error; err != nil {
return 0, err
}
return int32(count), nil
}
func GetBlockUsersNumCount() (int32, error) {
var count int64
if err := BlackListDB.Count(&count).Error; err != nil {
return 0, err
}
return int32(count), nil
err = u.DB.Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Pluck("user_id", &userIDs).Error
return userIDs, count, err
}
-109
View File
@@ -1,109 +0,0 @@
package relation
import (
"Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils"
"context"
"fmt"
"gorm.io/gorm"
)
type UserGorm struct {
DB *gorm.DB
}
func NewUserGorm(db *gorm.DB) *UserGorm {
var user UserGorm
user.DB = db
return &user
}
// 插入多条
func (u *UserGorm) Create(ctx context.Context, users []*relation.UserModel, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "users", users)
}()
return utils.Wrap(getDBConn(u.DB, tx).Create(&users).Error, "")
}
// 更新用户信息 零值
func (u *UserGorm) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "args", args)
}()
return utils.Wrap(getDBConn(u.DB, tx).Model(&relation.UserModel{}).Where("user_id = ?", userID).Updates(args).Error, "")
}
// 更新多个用户信息 非零值
func (u *UserGorm) Update(ctx context.Context, users []*relation.UserModel, tx ...any) (err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "users", users)
}()
return utils.Wrap(getDBConn(u.DB, tx).Updates(&users).Error, "")
}
// 获取指定用户信息 不存在,也不返回错误
func (u *UserGorm) Find(ctx context.Context, userIDs []string, tx ...any) (users []*relation.UserModel, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userIDs", userIDs, "users", users)
}()
err = utils.Wrap(getDBConn(u.DB, tx).Where("user_id in (?)", userIDs).Find(&users).Error, "")
return users, err
}
// 获取某个用户信息 不存在,则返回错误
func (u *UserGorm) Take(ctx context.Context, userID string, tx ...any) (user *relation.UserModel, err error) {
user = &relation.UserModel{}
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "user", *user)
}()
err = utils.Wrap(getDBConn(u.DB, tx).Where("user_id = ?", userID).Take(&user).Error, "")
return user, err
}
// 通过名字查找用户 不存在,不返回错误
func (u *UserGorm) GetByName(ctx context.Context, userName string, pageNumber, showNumber int32, tx ...any) (users []*relation.UserModel, count int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userName", userName, "pageNumber", pageNumber, "showNumber", showNumber, "users", users, "count", count)
}()
err = utils.Wrap(getDBConn(u.DB, tx).Model(&relation.UserModel{}).Where(" name like ?", fmt.Sprintf("%%%s%%", userName)).Count(&count).Error, "")
if err != nil {
return
}
err = utils.Wrap(getDBConn(u.DB, tx).Model(&relation.UserModel{}).Where(" name like ?", fmt.Sprintf("%%%s%%", userName)).Limit(int(showNumber)).Offset(int(showNumber*pageNumber)).Find(&users).Error, "")
return
}
// 通过名字或userID查找用户 不存在,不返回错误
func (u *UserGorm) GetByNameAndID(ctx context.Context, content string, pageNumber, showNumber int32, tx ...any) (users []*relation.UserModel, count int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "content", content, "pageNumber", pageNumber, "showNumber", showNumber, "users", users, "count", count)
}()
db := getDBConn(u.DB, tx).Model(&relation.UserModel{}).Where(" name like ? or user_id = ? ", fmt.Sprintf("%%%s%%", content), content)
if err = db.Count(&count).Error; err != nil {
return
}
err = utils.Wrap(db.Limit(int(showNumber)).Offset(int(showNumber*pageNumber)).Find(&users).Error, "")
return
}
// 获取用户信息 不存在,不返回错误
func (u *UserGorm) Page(ctx context.Context, pageNumber, showNumber int32, tx ...any) (users []*relation.UserModel, count int64, err error) {
defer func() {
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "pageNumber", pageNumber, "showNumber", showNumber, "users", users, "count", count)
}()
err = utils.Wrap(getDBConn(u.DB, tx).Model(&relation.UserModel{}).Count(&count).Error, "")
if err != nil {
return
}
err = utils.Wrap(getDBConn(u.DB, tx).Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&users).Error, "")
return
}
// 获取所有用户ID
func (u *UserGorm) GetAllUserID(ctx context.Context) ([]string, error) {
var userIDs []string
err := u.DB.Pluck("user_id", &userIDs).Error
return userIDs, err
}
+9
View File
@@ -1,6 +1,7 @@
package relation
import (
"context"
"time"
)
@@ -22,4 +23,12 @@ func (BlackModel) TableName() string {
}
type BlackModelInterface interface {
Create(ctx context.Context, blacks []*BlackModel) (err error)
Delete(ctx context.Context, blacks []*BlackModel) (err error)
UpdateByMap(ctx context.Context, ownerUserID, blockUserID string, args map[string]interface{}) (err error)
Update(ctx context.Context, blacks []*BlackModel) (err error)
Find(ctx context.Context, blacks []*BlackModel) (blackList []*BlackModel, err error)
Take(ctx context.Context, ownerUserID, blockUserID string) (black *BlackModel, err error)
FindOwnerBlacks(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (blacks []*BlackModel, total int64, err error)
FindBlackUserIDs(ctx context.Context, ownerUserID string) (blackUserIDs []string, err error)
}
+30 -1
View File
@@ -1,6 +1,9 @@
package relation
import "time"
import (
"context"
"time"
)
const (
FriendModelTableName = "friends"
@@ -21,4 +24,30 @@ func (FriendModel) TableName() string {
}
type FriendModelInterface interface {
// 插入多条记录
Create(ctx context.Context, friends []*FriendModel) (err error)
// 删除ownerUserID指定的好友
Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error)
// 更新ownerUserID单个好友信息 更新零值
UpdateByMap(ctx context.Context, ownerUserID string, friendUserID string, args map[string]interface{}) (err error)
// 更新好友信息的非零值
Update(ctx context.Context, friends []*FriendModel) (err error)
// 更新好友备注(也支持零值
UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error)
// 获取单个好友信息,如没找到 返回错误
Take(ctx context.Context, ownerUserID, friendUserID string) (friend *FriendModel, err error)
// 查找好友关系,如果是双向关系,则都返回
FindUserState(ctx context.Context, userID1, userID2 string) (friends []*FriendModel, err error)
// 获取 owner指定的好友列表 如果有friendUserIDs不存在,也不返回错误
FindFriends(ctx context.Context, ownerUserID string, friendUserIDs []string) (friends []*FriendModel, err error)
// 获取哪些人添加了friendUserID 如果有ownerUserIDs不存在,也不返回错误
FindReversalFriends(ctx context.Context, friendUserID string, ownerUserIDs []string) (friends []*FriendModel, err error)
// 获取ownerUserID好友列表 支持翻页
FindOwnerFriends(ctx context.Context, ownerUserID string, pageNumber, showNumber int32) (friends []*FriendModel, total int64, err error)
// 获取哪些人添加了friendUserID 支持翻页
FindInWhoseFriends(ctx context.Context, friendUserID string, pageNumber, showNumber int32) (friends []*FriendModel, total int64, err error)
// 获取好友UserID列表
FindFriendUserIDs(ctx context.Context, ownerUserID string) (friendUserIDs []string, err error)
NewTx(tx any) FriendModelInterface
}
+21 -1
View File
@@ -1,6 +1,9 @@
package relation
import "time"
import (
"context"
"time"
)
const FriendRequestModelTableName = "friend_requests"
@@ -21,4 +24,21 @@ func (FriendRequestModel) TableName() string {
}
type FriendRequestModelInterface interface {
// 插入多条记录
Create(ctx context.Context, friendRequests []*FriendRequestModel) (err error)
// 删除记录
Delete(ctx context.Context, fromUserID, toUserID string) (err error)
// 更新零值
UpdateByMap(ctx context.Context, formUserID string, toUserID string, args map[string]interface{}) (err error)
// 更新多条记录 (非零值)
Update(ctx context.Context, friendRequests []*FriendRequestModel) (err error)
// 获取来指定用户的好友申请 未找到 不返回错误
Find(ctx context.Context, fromUserID, toUserID string) (friendRequest *FriendRequestModel, err error)
Take(ctx context.Context, fromUserID, toUserID string) (friendRequest *FriendRequestModel, err error)
// 获取toUserID收到的好友申请列表
FindToUserID(ctx context.Context, toUserID string, pageNumber, showNumber int32) (friendRequests []*FriendRequestModel, total int64, err error)
// 获取fromUserID发出去的好友申请列表
FindFromUserID(ctx context.Context, fromUserID string, pageNumber, showNumber int32) (friendRequests []*FriendRequestModel, total int64, err error)
NewTx(tx any) FriendRequestModelInterface
}
+8 -7
View File
@@ -32,11 +32,12 @@ func (GroupModel) TableName() string {
}
type GroupModelInterface interface {
Create(ctx context.Context, groups []*GroupModel, tx ...any) (err error)
//Delete(ctx context.Context, groupIDs []string, tx ...any) (err error)
UpdateMap(ctx context.Context, groupID string, args map[string]interface{}, tx ...any) (err error)
UpdateStatus(ctx context.Context, groupID string, status int32, tx ...any) (err error)
Find(ctx context.Context, groupIDs []string, tx ...any) (groups []*GroupModel, err error)
Take(ctx context.Context, groupID string, tx ...any) (group *GroupModel, err error)
Search(ctx context.Context, keyword string, pageNumber, showNumber int32, tx ...any) (total uint32, groups []*GroupModel, err error)
NewTx(tx any) GroupModelInterface
Create(ctx context.Context, groups []*GroupModel) (err error)
UpdateMap(ctx context.Context, groupID string, args map[string]interface{}) (err error)
UpdateStatus(ctx context.Context, groupID string, status int32) (err error)
Find(ctx context.Context, groupIDs []string) (groups []*GroupModel, err error)
Take(ctx context.Context, groupID string) (group *GroupModel, err error)
Search(ctx context.Context, keyword string, pageNumber, showNumber int32) (total uint32, groups []*GroupModel, err error)
GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error)
}
+13 -12
View File
@@ -28,16 +28,17 @@ func (GroupMemberModel) TableName() string {
}
type GroupMemberModelInterface interface {
Create(ctx context.Context, groupMemberList []*GroupMemberModel, tx ...any) (err error)
Delete(ctx context.Context, groupID string, userIDs []string, tx ...any) (err error)
DeleteGroup(ctx context.Context, groupIDs []string, tx ...any) (err error)
Update(ctx context.Context, groupID string, userID string, data map[string]any, tx ...any) (err error)
UpdateRoleLevel(ctx context.Context, groupID string, userID string, roleLevel int32, tx ...any) (rowsAffected int64, err error)
Find(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, tx ...any) (groupList []*GroupMemberModel, err error)
FindMemberUserID(ctx context.Context, groupID string, tx ...any) (userIDs []string, err error)
Take(ctx context.Context, groupID string, userID string, tx ...any) (groupMember *GroupMemberModel, err error)
TakeOwner(ctx context.Context, groupID string, tx ...any) (groupMember *GroupMemberModel, err error)
SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32, tx ...any) (total uint32, groupList []*GroupMemberModel, err error)
MapGroupMemberNum(ctx context.Context, groupIDs []string, tx ...any) (count map[string]uint32, err error)
FindJoinUserID(ctx context.Context, groupIDs []string, tx ...any) (groupUsers map[string][]string, err error)
NewTx(tx any) GroupMemberModelInterface
Create(ctx context.Context, groupMemberList []*GroupMemberModel) (err error)
Delete(ctx context.Context, groupID string, userIDs []string) (err error)
DeleteGroup(ctx context.Context, groupIDs []string) (err error)
Update(ctx context.Context, groupID string, userID string, data map[string]any) (err error)
UpdateRoleLevel(ctx context.Context, groupID string, userID string, roleLevel int32) (rowsAffected int64, err error)
Find(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32) (groupList []*GroupMemberModel, err error)
FindMemberUserID(ctx context.Context, groupID string) (userIDs []string, err error)
Take(ctx context.Context, groupID string, userID string) (groupMember *GroupMemberModel, err error)
TakeOwner(ctx context.Context, groupID string) (groupMember *GroupMemberModel, err error)
SearchMember(ctx context.Context, keyword string, groupIDs []string, userIDs []string, roleLevels []int32, pageNumber, showNumber int32) (total uint32, groupList []*GroupMemberModel, err error)
MapGroupMemberNum(ctx context.Context, groupIDs []string) (count map[string]uint32, err error)
FindJoinUserID(ctx context.Context, groupIDs []string) (groupUsers map[string][]string, err error)
}
@@ -28,12 +28,9 @@ func (GroupRequestModel) TableName() string {
}
type GroupRequestModelInterface interface {
Create(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (err error)
//Delete(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (err error)
//UpdateMap(ctx context.Context, groupID string, userID string, args map[string]interface{}, tx ...any) (err error)
UpdateHandler(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, tx ...any) (err error)
//Update(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (err error)
//Find(ctx context.Context, groupRequests []*GroupRequestModel, tx ...any) (resultGroupRequests []*GroupRequestModel, err error)
Take(ctx context.Context, groupID string, userID string, tx ...any) (groupRequest *GroupRequestModel, err error)
Page(ctx context.Context, userID string, pageNumber, showNumber int32, tx ...any) (total uint32, groups []*GroupRequestModel, err error)
NewTx(tx any) GroupRequestModelInterface
Create(ctx context.Context, groupRequests []*GroupRequestModel) (err error)
UpdateHandler(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32) (err error)
Take(ctx context.Context, groupID string, userID string) (groupRequest *GroupRequestModel, err error)
Page(ctx context.Context, userID string, pageNumber, showNumber int32) (total uint32, groups []*GroupRequestModel, err error)
}
+16 -3
View File
@@ -1,6 +1,9 @@
package relation
import "time"
import (
"context"
"time"
)
const (
UserModelTableName = "users"
@@ -17,13 +20,23 @@ type UserModel struct {
Email string `gorm:"column:email;size:64"`
Ex string `gorm:"column:ex;size:1024"`
CreateTime time.Time `gorm:"column:create_time;index:create_time; autoCreateTime"`
AppMangerLevel int32 `gorm:"column:app_manger_level"`
AppMangerLevel int32 `gorm:"column:app_manger_level;default:18"`
GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"`
}
func (UserModel) TableName() string {
return GroupRequestModelTableName
return UserModelTableName
}
type UserModelInterface interface {
Create(ctx context.Context, users []*UserModel) (err error)
UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error)
Update(ctx context.Context, users []*UserModel) (err error)
// 获取指定用户信息 不存在,也不返回错误
Find(ctx context.Context, userIDs []string) (users []*UserModel, err error)
// 获取某个用户信息 不存在,则返回错误
Take(ctx context.Context, userID string) (user *UserModel, err error)
// 获取用户信息 不存在,不返回错误
Page(ctx context.Context, pageNumber, showNumber int32) (users []*UserModel, count int64, err error)
PageUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, count int64, err error)
}
@@ -2,7 +2,6 @@ package unrelation
import (
"context"
"strconv"
)
const (
@@ -29,11 +28,12 @@ func (UserToSuperGroupModel) TableName() string {
}
type SuperGroupModelInterface interface {
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDs []string, tx ...any) error
FindSuperGroup(ctx context.Context, groupIDs []string, tx ...any) (groups []*SuperGroupModel, err error)
AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string, tx ...any) error
RemoverUserFromSuperGroup(ctx context.Context, groupID string, userIDs []string, tx ...any) error
GetSuperGroupByUserID(ctx context.Context, userID string, tx ...any) (*UserToSuperGroupModel, error)
DeleteSuperGroup(ctx context.Context, groupID string, tx ...any) error
RemoveGroupFromUser(ctx context.Context, groupID string, userIDs []string, tx ...any) error
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDs []string) error
TakeSuperGroup(ctx context.Context, groupID string) (group *SuperGroupModel, err error)
FindSuperGroup(ctx context.Context, groupIDs []string) (groups []*SuperGroupModel, err error)
AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error
RemoverUserFromSuperGroup(ctx context.Context, groupID string, userIDs []string) error
GetSuperGroupByUserID(ctx context.Context, userID string) (*UserToSuperGroupModel, error)
DeleteSuperGroup(ctx context.Context, groupID string) error
RemoveGroupFromUser(ctx context.Context, groupID string, userIDs []string) error
}
+10 -139
View File
@@ -11,9 +11,7 @@ import (
"go.mongodb.org/mongo-driver/mongo/readconcern"
)
var _ unrelation.SuperGroupModelInterface = (*SuperGroupMongoDriver)(nil)
func NewSuperGroupMongoDriver(mgoClient *mongo.Client) *SuperGroupMongoDriver {
func NewSuperGroupMongoDriver(mgoClient *mongo.Client) unrelation.SuperGroupModelInterface {
mgoDB := mgoClient.Database(config.Config.Mongo.DBDatabase)
return &SuperGroupMongoDriver{MgoDB: mgoDB, MgoClient: mgoClient, superGroupCollection: mgoDB.Collection(unrelation.CSuperGroup), userToSuperGroupCollection: mgoDB.Collection(unrelation.CUserToSuperGroup)}
}
@@ -25,109 +23,7 @@ type SuperGroupMongoDriver struct {
userToSuperGroupCollection *mongo.Collection
}
// func (s *SuperGroupMongoDriver) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDs []string, tx ...interface{}) error {
// superGroup := unrelation.SuperGroupModel{
// GroupID: groupID,
// MemberIDs: initMemberIDs,
// }
// coll := getTxCtx(s.superGroupCollection, tx)
// _, err := coll.InsertOne(ctx, superGroup)
// if err != nil {
// return err
// }
// opts := &options.UpdateOptions{
// Upsert: utils.ToPtr(true),
// }
// for _, userID := range initMemberIDs {
// _, err = coll.UpdateOne(ctx, bson.M{"user_id": userID}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts)
// if err != nil {
// return err
// }
// }
// return nil
// }
//
// func (s *SuperGroupMongoDriver) FindSuperGroup(ctx context.Context, groupIDs []string, tx ...interface{}) (groups []*unrelation.SuperGroupModel, err error) {
// cursor, err := s.superGroupCollection.Find(ctx, bson.M{"group_id": bson.M{
// "$in": groupIDs,
// }})
// if err != nil {
// return nil, utils.Wrap(err, "")
// }
// defer cursor.Close(ctx)
// if err := cursor.All(ctx, &groups); err != nil {
// return nil, utils.Wrap(err, "")
// }
// return groups, nil
// }
//
// func (s *SuperGroupMongoDriver) AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string, tx ...interface{}) error {
// opts := options.Session().SetDefaultReadConcern(readconcern.Majority())
// return s.MgoDB.Client().UseSessionWithOptions(ctx, opts, func(sCtx mongo.SessionContext) error {
// _, err := s.superGroupCollection.UpdateOne(sCtx, bson.M{"group_id": groupID}, bson.M{"$addToSet": bson.M{"member_id_list": bson.M{"$each": userIDs}}})
// if err != nil {
// _ = sCtx.AbortTransaction(ctx)
// return err
// }
// upsert := true
// opts := &options.UpdateOptions{
// Upsert: &upsert,
// }
// for _, userID := range userIDs {
// _, err = s.userToSuperGroupCollection.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$addToSet": bson.M{"group_id_list": groupID}}, opts)
// if err != nil {
// _ = sCtx.AbortTransaction(ctx)
// return utils.Wrap(err, "transaction failed")
// }
// }
// return sCtx.CommitTransaction(ctx)
// })
// }
//
// func (s *SuperGroupMongoDriver) RemoverUserFromSuperGroup(ctx context.Context, groupID string, userIDs []string, tx ...interface{}) error {
// opts := options.Session().SetDefaultReadConcern(readconcern.Majority())
// return s.MgoDB.Client().UseSessionWithOptions(ctx, opts, func(sCtx mongo.SessionContext) error {
// _, err := s.superGroupCollection.UpdateOne(sCtx, bson.M{"group_id": groupID}, bson.M{"$pull": bson.M{"member_id_list": bson.M{"$in": userIDs}}})
// if err != nil {
// _ = sCtx.AbortTransaction(ctx)
// return err
// }
// err = s.RemoveGroupFromUser(sCtx, groupID, userIDs)
// if err != nil {
// _ = sCtx.AbortTransaction(ctx)
// return err
// }
// return sCtx.CommitTransaction(ctx)
// })
// }
//
// func (s *SuperGroupMongoDriver) GetSuperGroupByUserID(ctx context.Context, userID string, tx ...interface{}) (*unrelation.UserToSuperGroupModel, error) {
// //TODO implement me
// panic("implement me")
// }
//
// func (s *SuperGroupMongoDriver) DeleteSuperGroup(ctx context.Context, groupID string, tx ...interface{}) error {
// //TODO implement me
// panic("implement me")
// }
//func (s *SuperGroupMongoDriver) Transaction(ctx context.Context, fn func(ctx mongo.SessionContext) error) error {
// sess, err := s.MgoClient.StartSession()
// if err != nil {
// return err
// }
// sCtx := mongo.NewSessionContext(ctx, sess)
//
// defer sess.EndSession(sCtx)
// if err := fn(sCtx); err != nil {
// _ = sess.AbortTransaction(sCtx)
// return err
// }
// return utils.Wrap(sess.CommitTransaction(sCtx), "")
//}
func (s *SuperGroupMongoDriver) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDs []string, tx ...any) error {
ctx = getTxCtx(ctx, tx)
func (s *SuperGroupMongoDriver) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDs []string) error {
_, err := s.superGroupCollection.InsertOne(ctx, &unrelation.SuperGroupModel{
GroupID: groupID,
MemberIDs: initMemberIDs,
@@ -146,16 +42,14 @@ func (s *SuperGroupMongoDriver) CreateSuperGroup(ctx context.Context, groupID st
return nil
}
func (s *SuperGroupMongoDriver) TakeSuperGroup(ctx context.Context, groupID string, tx ...any) (group *unrelation.SuperGroupModel, err error) {
ctx = getTxCtx(ctx, tx)
func (s *SuperGroupMongoDriver) TakeSuperGroup(ctx context.Context, groupID string) (group *unrelation.SuperGroupModel, err error) {
if err := s.superGroupCollection.FindOne(ctx, bson.M{"group_id": groupID}).Decode(&group); err != nil {
return nil, utils.Wrap(err, "")
}
return group, nil
}
func (s *SuperGroupMongoDriver) FindSuperGroup(ctx context.Context, groupIDs []string, tx ...any) (groups []*unrelation.SuperGroupModel, err error) {
ctx = getTxCtx(ctx, tx)
func (s *SuperGroupMongoDriver) FindSuperGroup(ctx context.Context, groupIDs []string) (groups []*unrelation.SuperGroupModel, err error) {
cursor, err := s.superGroupCollection.Find(ctx, bson.M{"group_id": bson.M{
"$in": groupIDs,
}})
@@ -170,8 +64,7 @@ func (s *SuperGroupMongoDriver) FindSuperGroup(ctx context.Context, groupIDs []s
return groups, nil
}
func (s *SuperGroupMongoDriver) AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string, tx ...any) error {
ctx = getTxCtx(ctx, tx)
func (s *SuperGroupMongoDriver) AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error {
opts := options.Session().SetDefaultReadConcern(readconcern.Majority())
return s.MgoDB.Client().UseSessionWithOptions(ctx, opts, func(sCtx mongo.SessionContext) error {
_, err := s.superGroupCollection.UpdateOne(sCtx, bson.M{"group_id": groupID}, bson.M{"$addToSet": bson.M{"member_id_list": bson.M{"$each": userIDs}}})
@@ -194,8 +87,7 @@ func (s *SuperGroupMongoDriver) AddUserToSuperGroup(ctx context.Context, groupID
})
}
func (s *SuperGroupMongoDriver) RemoverUserFromSuperGroup(ctx context.Context, groupID string, userIDs []string, tx ...any) error {
ctx = getTxCtx(ctx, tx)
func (s *SuperGroupMongoDriver) RemoverUserFromSuperGroup(ctx context.Context, groupID string, userIDs []string) error {
opts := options.Session().SetDefaultReadConcern(readconcern.Majority())
return s.MgoDB.Client().UseSessionWithOptions(ctx, opts, func(sCtx mongo.SessionContext) error {
_, err := s.superGroupCollection.UpdateOne(sCtx, bson.M{"group_id": groupID}, bson.M{"$pull": bson.M{"member_id_list": bson.M{"$in": userIDs}}})
@@ -212,16 +104,14 @@ func (s *SuperGroupMongoDriver) RemoverUserFromSuperGroup(ctx context.Context, g
})
}
func (s *SuperGroupMongoDriver) GetSuperGroupByUserID(ctx context.Context, userID string, tx ...any) (*unrelation.UserToSuperGroupModel, error) {
ctx = getTxCtx(ctx, tx)
func (s *SuperGroupMongoDriver) GetSuperGroupByUserID(ctx context.Context, userID string) (*unrelation.UserToSuperGroupModel, error) {
var user unrelation.UserToSuperGroupModel
err := s.userToSuperGroupCollection.FindOne(ctx, bson.M{"user_id": userID}).Decode(&user)
return &user, utils.Wrap(err, "")
}
func (s *SuperGroupMongoDriver) DeleteSuperGroup(ctx context.Context, groupID string, tx ...any) error {
ctx = getTxCtx(ctx, tx)
group, err := s.TakeSuperGroup(ctx, groupID, tx...)
func (s *SuperGroupMongoDriver) DeleteSuperGroup(ctx context.Context, groupID string) error {
group, err := s.TakeSuperGroup(ctx, groupID)
if err != nil {
return err
}
@@ -231,26 +121,7 @@ func (s *SuperGroupMongoDriver) DeleteSuperGroup(ctx context.Context, groupID st
return s.RemoveGroupFromUser(ctx, groupID, group.MemberIDs)
}
//func (s *SuperGroupMongoDriver) DeleteSuperGroup(ctx context.Context, groupID string, tx ...any) error {
// ctx = getTxCtx(ctx, tx)
// opts := options.Session().SetDefaultReadConcern(readconcern.Majority())
// return s.MgoDB.Client().UseSessionWithOptions(ctx, opts, func(sCtx mongo.SessionContext) error {
// superGroup := &unrelation.SuperGroupModel{}
// _, err := s.superGroupCollection.DeleteOne(sCtx, bson.M{"group_id": groupID})
// if err != nil {
// _ = sCtx.AbortTransaction(ctx)
// return err
// }
// if err = s.RemoveGroupFromUser(sCtx, groupID, superGroup.MemberIDs); err != nil {
// _ = sCtx.AbortTransaction(ctx)
// return err
// }
// return sCtx.CommitTransaction(ctx)
// })
//}
func (s *SuperGroupMongoDriver) RemoveGroupFromUser(ctx context.Context, groupID string, userIDs []string, tx ...any) error {
ctx = getTxCtx(ctx, tx)
func (s *SuperGroupMongoDriver) RemoveGroupFromUser(ctx context.Context, groupID string, userIDs []string) error {
_, err := s.userToSuperGroupCollection.UpdateOne(ctx, bson.M{"user_id": bson.M{"$in": userIDs}}, bson.M{"$pull": bson.M{"group_id_list": groupID}})
return utils.Wrap(err, "")
}
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"github.com/Shopify/sarama"
"github.com/golang/protobuf/proto"
prome "Open_IM/pkg/common/prometheus"
prome "Open_IM/pkg/common/prome"
)
type Producer struct {
+30 -39
View File
@@ -36,7 +36,7 @@ func (m *UserTokenReq) Reset() { *m = UserTokenReq{} }
func (m *UserTokenReq) String() string { return proto.CompactTextString(m) }
func (*UserTokenReq) ProtoMessage() {}
func (*UserTokenReq) Descriptor() ([]byte, []int) {
return fileDescriptor_auth_ffdf6e1278396193, []int{0}
return fileDescriptor_auth_750060e22d9d752f, []int{0}
}
func (m *UserTokenReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserTokenReq.Unmarshal(m, b)
@@ -82,7 +82,7 @@ func (m *UserTokenResp) Reset() { *m = UserTokenResp{} }
func (m *UserTokenResp) String() string { return proto.CompactTextString(m) }
func (*UserTokenResp) ProtoMessage() {}
func (*UserTokenResp) Descriptor() ([]byte, []int) {
return fileDescriptor_auth_ffdf6e1278396193, []int{1}
return fileDescriptor_auth_750060e22d9d752f, []int{1}
}
func (m *UserTokenResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserTokenResp.Unmarshal(m, b)
@@ -128,7 +128,7 @@ func (m *ForceLogoutReq) Reset() { *m = ForceLogoutReq{} }
func (m *ForceLogoutReq) String() string { return proto.CompactTextString(m) }
func (*ForceLogoutReq) ProtoMessage() {}
func (*ForceLogoutReq) Descriptor() ([]byte, []int) {
return fileDescriptor_auth_ffdf6e1278396193, []int{2}
return fileDescriptor_auth_750060e22d9d752f, []int{2}
}
func (m *ForceLogoutReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ForceLogoutReq.Unmarshal(m, b)
@@ -172,7 +172,7 @@ func (m *ForceLogoutResp) Reset() { *m = ForceLogoutResp{} }
func (m *ForceLogoutResp) String() string { return proto.CompactTextString(m) }
func (*ForceLogoutResp) ProtoMessage() {}
func (*ForceLogoutResp) Descriptor() ([]byte, []int) {
return fileDescriptor_auth_ffdf6e1278396193, []int{3}
return fileDescriptor_auth_750060e22d9d752f, []int{3}
}
func (m *ForceLogoutResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ForceLogoutResp.Unmarshal(m, b)
@@ -194,7 +194,6 @@ var xxx_messageInfo_ForceLogoutResp proto.InternalMessageInfo
type ParseTokenReq struct {
Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -204,7 +203,7 @@ func (m *ParseTokenReq) Reset() { *m = ParseTokenReq{} }
func (m *ParseTokenReq) String() string { return proto.CompactTextString(m) }
func (*ParseTokenReq) ProtoMessage() {}
func (*ParseTokenReq) Descriptor() ([]byte, []int) {
return fileDescriptor_auth_ffdf6e1278396193, []int{4}
return fileDescriptor_auth_750060e22d9d752f, []int{4}
}
func (m *ParseTokenReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ParseTokenReq.Unmarshal(m, b)
@@ -231,13 +230,6 @@ func (m *ParseTokenReq) GetToken() string {
return ""
}
func (m *ParseTokenReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
type ParseTokenResp struct {
UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"`
Platform string `protobuf:"bytes,2,opt,name=platform" json:"platform,omitempty"`
@@ -251,7 +243,7 @@ func (m *ParseTokenResp) Reset() { *m = ParseTokenResp{} }
func (m *ParseTokenResp) String() string { return proto.CompactTextString(m) }
func (*ParseTokenResp) ProtoMessage() {}
func (*ParseTokenResp) Descriptor() ([]byte, []int) {
return fileDescriptor_auth_ffdf6e1278396193, []int{5}
return fileDescriptor_auth_750060e22d9d752f, []int{5}
}
func (m *ParseTokenResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ParseTokenResp.Unmarshal(m, b)
@@ -439,30 +431,29 @@ var _Auth_serviceDesc = grpc.ServiceDesc{
Metadata: "auth/auth.proto",
}
func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_ffdf6e1278396193) }
func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_750060e22d9d752f) }
var fileDescriptor_auth_ffdf6e1278396193 = []byte{
// 350 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0x4f, 0x4f, 0xfa, 0x40,
0x10, 0x4d, 0x7f, 0xfc, 0xc9, 0x8f, 0x41, 0x20, 0x6c, 0x10, 0x49, 0x13, 0xb5, 0xe9, 0xa9, 0x07,
0xa1, 0x89, 0x5e, 0x4c, 0x48, 0x4c, 0x34, 0x44, 0x6d, 0x22, 0x31, 0x29, 0x9c, 0xbc, 0x90, 0x02,
0xc3, 0x9f, 0x20, 0xdd, 0x71, 0x77, 0x2b, 0x7e, 0x39, 0xbf, 0x9b, 0x29, 0x85, 0xba, 0xc4, 0x7a,
0xf2, 0xd2, 0xe4, 0xbd, 0xbe, 0xbe, 0xbe, 0x79, 0x33, 0x50, 0x0b, 0x22, 0xb5, 0x70, 0xe3, 0x47,
0x87, 0x04, 0x57, 0x9c, 0x15, 0x69, 0x7c, 0x1b, 0xa9, 0x85, 0xe9, 0x3c, 0x13, 0x86, 0x6d, 0xaf,
0xdf, 0x1e, 0xa0, 0x78, 0x47, 0xe1, 0xd2, 0x6a, 0xee, 0x6e, 0x15, 0xae, 0x9c, 0xae, 0x46, 0x1b,
0xe9, 0x6e, 0x64, 0xf2, 0x85, 0x7d, 0x0f, 0x47, 0x91, 0x44, 0x31, 0xe4, 0x2b, 0x0c, 0x7d, 0x7c,
0x63, 0x67, 0x00, 0xf4, 0x1a, 0xa8, 0x19, 0x17, 0x6b, 0xaf, 0xd7, 0x32, 0x2c, 0xc3, 0x29, 0xf8,
0x1a, 0xc3, 0x9a, 0x50, 0x8c, 0xf5, 0x5e, 0xaf, 0xf5, 0xcf, 0x32, 0x9c, 0x92, 0xbf, 0x43, 0xf6,
0x00, 0x2a, 0x9a, 0x8f, 0x24, 0xd6, 0x80, 0x82, 0x8a, 0xc1, 0x4e, 0x97, 0x00, 0x76, 0x01, 0x75,
0xfc, 0xa0, 0xa5, 0xc0, 0xe1, 0x72, 0x8d, 0x03, 0x9c, 0xf0, 0x70, 0x2a, 0x5b, 0x39, 0xcb, 0x70,
0x72, 0xfe, 0xcf, 0x17, 0xf6, 0x23, 0x54, 0x67, 0x5c, 0x4c, 0xf0, 0x89, 0xcf, 0x79, 0xa4, 0xfe,
0x12, 0xaf, 0x0e, 0xb5, 0x03, 0x27, 0x49, 0xf6, 0x03, 0x54, 0x28, 0x10, 0x12, 0xd3, 0xd1, 0xd3,
0xc4, 0x86, 0x9e, 0xd8, 0x82, 0x32, 0x27, 0x14, 0x81, 0x5a, 0xf2, 0x30, 0xb5, 0xd5, 0x29, 0x5b,
0x40, 0x55, 0x37, 0x92, 0xa4, 0xa5, 0x30, 0xf4, 0x14, 0xcc, 0x84, 0xff, 0xfb, 0xac, 0x3b, 0xa3,
0x14, 0x67, 0x37, 0x93, 0xff, 0xa5, 0x99, 0xcb, 0x4f, 0x03, 0xf2, 0xf1, 0xa6, 0xd9, 0x35, 0x94,
0xd2, 0xde, 0x59, 0xa3, 0x93, 0xec, 0xbf, 0xa3, 0xaf, 0xd4, 0x3c, 0xce, 0x60, 0x25, 0xb1, 0x1b,
0x28, 0x6b, 0x95, 0xb0, 0xe6, 0x5e, 0x75, 0xd8, 0xb8, 0x79, 0x92, 0xc9, 0x4b, 0x62, 0x5d, 0x80,
0xef, 0xb1, 0x59, 0xfa, 0x93, 0x83, 0x4e, 0xcd, 0x66, 0x16, 0x2d, 0xe9, 0xee, 0xfc, 0xe5, 0x34,
0x3e, 0xd1, 0x91, 0xd7, 0xd7, 0x6e, 0x33, 0x3e, 0xe4, 0x6e, 0xa2, 0x1f, 0x17, 0xb7, 0xd4, 0xd5,
0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x41, 0xd0, 0x40, 0x58, 0xe3, 0x02, 0x00, 0x00,
var fileDescriptor_auth_750060e22d9d752f = []byte{
// 335 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0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 0xb8, 0x9a, 0xaa, 0x89, 0x7a, 0xca,
0xfb, 0xfd, 0xc3, 0x7e, 0x84, 0xc2, 0x58, 0xe9, 0x21, 0x3e, 0xa9, 0x89, 0x0a, 0xfc, 0xff, 0xd8,
0x2b, 0x41, 0x71, 0xa7, 0x13, 0x93, 0x7d, 0x0e, 0x79, 0xea, 0x6b, 0xc6, 0x38, 0x7a, 0xec, 0x58,
0x18, 0x8e, 0x6d, 0x0d, 0x05, 0x93, 0xc6, 0x64, 0x68, 0x08, 0x53, 0x43, 0x5a, 0xb0, 0xbf, 0x75,
0xb2, 0x51, 0x8f, 0xeb, 0xe4, 0xdc, 0xe9, 0x3f, 0x72, 0x5f, 0x7d, 0x09, 0x48, 0x87, 0x6b, 0x94,
0x37, 0x90, 0x8b, 0xa7, 0x2a, 0xcb, 0xcd, 0x68, 0xb9, 0x4d, 0x73, 0x61, 0xd6, 0x51, 0x02, 0xca,
0x24, 0x6f, 0xe1, 0xc0, 0x08, 0x2c, 0x2b, 0x5b, 0xd6, 0xee, 0x3c, 0xad, 0xe3, 0x44, 0x9c, 0x49,
0xb6, 0x00, 0x7e, 0x62, 0xcb, 0x58, 0x64, 0x67, 0x62, 0x56, 0x25, 0x09, 0x66, 0xba, 0x3f, 0x7b,
0x39, 0x09, 0xef, 0xef, 0xd5, 0xed, 0x18, 0x87, 0x17, 0x5e, 0x69, 0x2b, 0xe2, 0x0f, 0xb2, 0x6b,
0xe8, 0xfa, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xaf, 0xd6, 0xd6, 0x96, 0xc0, 0x02, 0x00, 0x00,
}
+3
View File
@@ -30,8 +30,11 @@ message parseTokenResp{
}
service Auth {
//token
rpc userToken(userTokenReq) returns(userTokenResp);
//退
rpc forceLogout(forceLogoutReq) returns(forceLogoutResp);
//token
rpc parseToken(parseTokenReq)returns(parseTokenResp);
}
Regular → Executable
View File
+37
View File
@@ -0,0 +1,37 @@
syntax = "proto3";
option go_package = "Open_IM/pkg/proto/file;file";
package file;
message ApplySpaceReq {
string name = 1; //
int64 size = 2; //
string hash = 3; // md5
uint32 purpose = 4; //
string contentType = 5;
}
message ApplySpaceResp {
string url = 1; //
int64 size = 2; //
repeated string put = 3;// put地址
string confirmID = 4; // ID
}
message ConfirmSpaceReq {
string confirmID = 1; // ID
}
message ConfirmSpaceResp {
string confirmID = 1;
}
service file {
rpc ApplySpaceReq(ApplySpaceReq) returns(ApplySpaceResp);
}
+129 -130
View File
@@ -25,18 +25,18 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type GetPaginationFriendsReq struct {
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
FriendUserIDs []string `protobuf:"bytes,2,rep,name=friendUserIDs" json:"friendUserIDs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"`
UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetPaginationFriendsReq) Reset() { *m = GetPaginationFriendsReq{} }
func (m *GetPaginationFriendsReq) String() string { return proto.CompactTextString(m) }
func (*GetPaginationFriendsReq) ProtoMessage() {}
func (*GetPaginationFriendsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{0}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{0}
}
func (m *GetPaginationFriendsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationFriendsReq.Unmarshal(m, b)
@@ -56,22 +56,23 @@ func (m *GetPaginationFriendsReq) XXX_DiscardUnknown() {
var xxx_messageInfo_GetPaginationFriendsReq proto.InternalMessageInfo
func (m *GetPaginationFriendsReq) GetOwnerUserID() string {
func (m *GetPaginationFriendsReq) GetPagination() *sdkws.RequestPagination {
if m != nil {
return m.OwnerUserID
}
return ""
}
func (m *GetPaginationFriendsReq) GetFriendUserIDs() []string {
if m != nil {
return m.FriendUserIDs
return m.Pagination
}
return nil
}
func (m *GetPaginationFriendsReq) GetUserID() string {
if m != nil {
return m.UserID
}
return ""
}
type GetPaginationFriendsResp struct {
FriendsInfo []*sdkws.FriendInfo `protobuf:"bytes,1,rep,name=friendsInfo" json:"friendsInfo,omitempty"`
FriendsInfo []*sdkws.FriendInfo `protobuf:"bytes,1,rep,name=FriendsInfo" json:"FriendsInfo,omitempty"`
Total int32 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -81,7 +82,7 @@ func (m *GetPaginationFriendsResp) Reset() { *m = GetPaginationFriendsRe
func (m *GetPaginationFriendsResp) String() string { return proto.CompactTextString(m) }
func (*GetPaginationFriendsResp) ProtoMessage() {}
func (*GetPaginationFriendsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{1}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{1}
}
func (m *GetPaginationFriendsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationFriendsResp.Unmarshal(m, b)
@@ -108,6 +109,13 @@ func (m *GetPaginationFriendsResp) GetFriendsInfo() []*sdkws.FriendInfo {
return nil
}
func (m *GetPaginationFriendsResp) GetTotal() int32 {
if m != nil {
return m.Total
}
return 0
}
type ApplyToAddFriendReq struct {
FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"`
ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"`
@@ -122,7 +130,7 @@ func (m *ApplyToAddFriendReq) Reset() { *m = ApplyToAddFriendReq{} }
func (m *ApplyToAddFriendReq) String() string { return proto.CompactTextString(m) }
func (*ApplyToAddFriendReq) ProtoMessage() {}
func (*ApplyToAddFriendReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{2}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{2}
}
func (m *ApplyToAddFriendReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplyToAddFriendReq.Unmarshal(m, b)
@@ -180,7 +188,7 @@ func (m *ApplyToAddFriendResp) Reset() { *m = ApplyToAddFriendResp{} }
func (m *ApplyToAddFriendResp) String() string { return proto.CompactTextString(m) }
func (*ApplyToAddFriendResp) ProtoMessage() {}
func (*ApplyToAddFriendResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{3}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{3}
}
func (m *ApplyToAddFriendResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplyToAddFriendResp.Unmarshal(m, b)
@@ -212,7 +220,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} }
func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) }
func (*ImportFriendReq) ProtoMessage() {}
func (*ImportFriendReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{4}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{4}
}
func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b)
@@ -256,7 +264,7 @@ func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} }
func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) }
func (*ImportFriendResp) ProtoMessage() {}
func (*ImportFriendResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{5}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{5}
}
func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b)
@@ -288,7 +296,7 @@ func (m *GetPaginationFriendsApplyToReq) Reset() { *m = GetPaginationFri
func (m *GetPaginationFriendsApplyToReq) String() string { return proto.CompactTextString(m) }
func (*GetPaginationFriendsApplyToReq) ProtoMessage() {}
func (*GetPaginationFriendsApplyToReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{6}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{6}
}
func (m *GetPaginationFriendsApplyToReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationFriendsApplyToReq.Unmarshal(m, b)
@@ -334,7 +342,7 @@ func (m *GetPaginationFriendsApplyToResp) Reset() { *m = GetPaginationFr
func (m *GetPaginationFriendsApplyToResp) String() string { return proto.CompactTextString(m) }
func (*GetPaginationFriendsApplyToResp) ProtoMessage() {}
func (*GetPaginationFriendsApplyToResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{7}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{7}
}
func (m *GetPaginationFriendsApplyToResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationFriendsApplyToResp.Unmarshal(m, b)
@@ -369,18 +377,18 @@ func (m *GetPaginationFriendsApplyToResp) GetTotal() int32 {
}
type GetDesignatedFriendsReq struct {
Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"`
UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
FriendUserIDs []string `protobuf:"bytes,2,rep,name=friendUserIDs" json:"friendUserIDs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetDesignatedFriendsReq) Reset() { *m = GetDesignatedFriendsReq{} }
func (m *GetDesignatedFriendsReq) String() string { return proto.CompactTextString(m) }
func (*GetDesignatedFriendsReq) ProtoMessage() {}
func (*GetDesignatedFriendsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{8}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{8}
}
func (m *GetDesignatedFriendsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDesignatedFriendsReq.Unmarshal(m, b)
@@ -400,23 +408,22 @@ func (m *GetDesignatedFriendsReq) XXX_DiscardUnknown() {
var xxx_messageInfo_GetDesignatedFriendsReq proto.InternalMessageInfo
func (m *GetDesignatedFriendsReq) GetPagination() *sdkws.RequestPagination {
func (m *GetDesignatedFriendsReq) GetOwnerUserID() string {
if m != nil {
return m.Pagination
}
return nil
}
func (m *GetDesignatedFriendsReq) GetUserID() string {
if m != nil {
return m.UserID
return m.OwnerUserID
}
return ""
}
func (m *GetDesignatedFriendsReq) GetFriendUserIDs() []string {
if m != nil {
return m.FriendUserIDs
}
return nil
}
type GetDesignatedFriendsResp struct {
FriendsInfo []*sdkws.FriendInfo `protobuf:"bytes,1,rep,name=FriendsInfo" json:"FriendsInfo,omitempty"`
Total int32 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"`
FriendsInfo []*sdkws.FriendInfo `protobuf:"bytes,1,rep,name=friendsInfo" json:"friendsInfo,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -426,7 +433,7 @@ func (m *GetDesignatedFriendsResp) Reset() { *m = GetDesignatedFriendsRe
func (m *GetDesignatedFriendsResp) String() string { return proto.CompactTextString(m) }
func (*GetDesignatedFriendsResp) ProtoMessage() {}
func (*GetDesignatedFriendsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{9}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{9}
}
func (m *GetDesignatedFriendsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDesignatedFriendsResp.Unmarshal(m, b)
@@ -453,13 +460,6 @@ func (m *GetDesignatedFriendsResp) GetFriendsInfo() []*sdkws.FriendInfo {
return nil
}
func (m *GetDesignatedFriendsResp) GetTotal() int32 {
if m != nil {
return m.Total
}
return 0
}
type AddBlackReq struct {
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
BlackUserID string `protobuf:"bytes,2,opt,name=blackUserID" json:"blackUserID,omitempty"`
@@ -472,7 +472,7 @@ func (m *AddBlackReq) Reset() { *m = AddBlackReq{} }
func (m *AddBlackReq) String() string { return proto.CompactTextString(m) }
func (*AddBlackReq) ProtoMessage() {}
func (*AddBlackReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{10}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{10}
}
func (m *AddBlackReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddBlackReq.Unmarshal(m, b)
@@ -516,7 +516,7 @@ func (m *AddBlackResp) Reset() { *m = AddBlackResp{} }
func (m *AddBlackResp) String() string { return proto.CompactTextString(m) }
func (*AddBlackResp) ProtoMessage() {}
func (*AddBlackResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{11}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{11}
}
func (m *AddBlackResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddBlackResp.Unmarshal(m, b)
@@ -548,7 +548,7 @@ func (m *RemoveBlackReq) Reset() { *m = RemoveBlackReq{} }
func (m *RemoveBlackReq) String() string { return proto.CompactTextString(m) }
func (*RemoveBlackReq) ProtoMessage() {}
func (*RemoveBlackReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{12}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{12}
}
func (m *RemoveBlackReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RemoveBlackReq.Unmarshal(m, b)
@@ -592,7 +592,7 @@ func (m *RemoveBlackResp) Reset() { *m = RemoveBlackResp{} }
func (m *RemoveBlackResp) String() string { return proto.CompactTextString(m) }
func (*RemoveBlackResp) ProtoMessage() {}
func (*RemoveBlackResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{13}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{13}
}
func (m *RemoveBlackResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RemoveBlackResp.Unmarshal(m, b)
@@ -624,7 +624,7 @@ func (m *GetPaginationBlacksReq) Reset() { *m = GetPaginationBlacksReq{}
func (m *GetPaginationBlacksReq) String() string { return proto.CompactTextString(m) }
func (*GetPaginationBlacksReq) ProtoMessage() {}
func (*GetPaginationBlacksReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{14}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{14}
}
func (m *GetPaginationBlacksReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationBlacksReq.Unmarshal(m, b)
@@ -670,7 +670,7 @@ func (m *GetPaginationBlacksResp) Reset() { *m = GetPaginationBlacksResp
func (m *GetPaginationBlacksResp) String() string { return proto.CompactTextString(m) }
func (*GetPaginationBlacksResp) ProtoMessage() {}
func (*GetPaginationBlacksResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{15}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{15}
}
func (m *GetPaginationBlacksResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationBlacksResp.Unmarshal(m, b)
@@ -716,7 +716,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} }
func (m *IsFriendReq) String() string { return proto.CompactTextString(m) }
func (*IsFriendReq) ProtoMessage() {}
func (*IsFriendReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{16}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{16}
}
func (m *IsFriendReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IsFriendReq.Unmarshal(m, b)
@@ -762,7 +762,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} }
func (m *IsFriendResp) String() string { return proto.CompactTextString(m) }
func (*IsFriendResp) ProtoMessage() {}
func (*IsFriendResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{17}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{17}
}
func (m *IsFriendResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IsFriendResp.Unmarshal(m, b)
@@ -808,7 +808,7 @@ func (m *IsBlackReq) Reset() { *m = IsBlackReq{} }
func (m *IsBlackReq) String() string { return proto.CompactTextString(m) }
func (*IsBlackReq) ProtoMessage() {}
func (*IsBlackReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{18}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{18}
}
func (m *IsBlackReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IsBlackReq.Unmarshal(m, b)
@@ -854,7 +854,7 @@ func (m *IsBlackResp) Reset() { *m = IsBlackResp{} }
func (m *IsBlackResp) String() string { return proto.CompactTextString(m) }
func (*IsBlackResp) ProtoMessage() {}
func (*IsBlackResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{19}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{19}
}
func (m *IsBlackResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IsBlackResp.Unmarshal(m, b)
@@ -900,7 +900,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} }
func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) }
func (*DeleteFriendReq) ProtoMessage() {}
func (*DeleteFriendReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{20}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{20}
}
func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b)
@@ -944,7 +944,7 @@ func (m *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} }
func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) }
func (*DeleteFriendResp) ProtoMessage() {}
func (*DeleteFriendResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{21}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{21}
}
func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b)
@@ -979,7 +979,7 @@ func (m *RespondFriendApplyReq) Reset() { *m = RespondFriendApplyReq{} }
func (m *RespondFriendApplyReq) String() string { return proto.CompactTextString(m) }
func (*RespondFriendApplyReq) ProtoMessage() {}
func (*RespondFriendApplyReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{22}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{22}
}
func (m *RespondFriendApplyReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RespondFriendApplyReq.Unmarshal(m, b)
@@ -1037,7 +1037,7 @@ func (m *RespondFriendApplyResp) Reset() { *m = RespondFriendApplyResp{}
func (m *RespondFriendApplyResp) String() string { return proto.CompactTextString(m) }
func (*RespondFriendApplyResp) ProtoMessage() {}
func (*RespondFriendApplyResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{23}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{23}
}
func (m *RespondFriendApplyResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RespondFriendApplyResp.Unmarshal(m, b)
@@ -1070,7 +1070,7 @@ func (m *SetFriendRemarkReq) Reset() { *m = SetFriendRemarkReq{} }
func (m *SetFriendRemarkReq) String() string { return proto.CompactTextString(m) }
func (*SetFriendRemarkReq) ProtoMessage() {}
func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{24}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{24}
}
func (m *SetFriendRemarkReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetFriendRemarkReq.Unmarshal(m, b)
@@ -1121,7 +1121,7 @@ func (m *SetFriendRemarkResp) Reset() { *m = SetFriendRemarkResp{} }
func (m *SetFriendRemarkResp) String() string { return proto.CompactTextString(m) }
func (*SetFriendRemarkResp) ProtoMessage() {}
func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{25}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{25}
}
func (m *SetFriendRemarkResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetFriendRemarkResp.Unmarshal(m, b)
@@ -1153,7 +1153,7 @@ func (m *GetPaginationFriendsApplyFromReq) Reset() { *m = GetPaginationF
func (m *GetPaginationFriendsApplyFromReq) String() string { return proto.CompactTextString(m) }
func (*GetPaginationFriendsApplyFromReq) ProtoMessage() {}
func (*GetPaginationFriendsApplyFromReq) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{26}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{26}
}
func (m *GetPaginationFriendsApplyFromReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationFriendsApplyFromReq.Unmarshal(m, b)
@@ -1199,7 +1199,7 @@ func (m *GetPaginationFriendsApplyFromResp) Reset() { *m = GetPagination
func (m *GetPaginationFriendsApplyFromResp) String() string { return proto.CompactTextString(m) }
func (*GetPaginationFriendsApplyFromResp) ProtoMessage() {}
func (*GetPaginationFriendsApplyFromResp) Descriptor() ([]byte, []int) {
return fileDescriptor_friend_b44dbd852f0b513f, []int{27}
return fileDescriptor_friend_2a356ccaa517dcdd, []int{27}
}
func (m *GetPaginationFriendsApplyFromResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationFriendsApplyFromResp.Unmarshal(m, b)
@@ -1793,69 +1793,68 @@ var _Friend_serviceDesc = grpc.ServiceDesc{
Metadata: "friend/friend.proto",
}
func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_b44dbd852f0b513f) }
func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_2a356ccaa517dcdd) }
var fileDescriptor_friend_b44dbd852f0b513f = []byte{
// 974 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x5f, 0x6f, 0x1b, 0x45,
0x10, 0x97, 0x1d, 0xe2, 0x26, 0x63, 0xd7, 0x29, 0xe3, 0xd4, 0x3d, 0x5d, 0xfe, 0xb9, 0xab, 0xaa,
0x98, 0x87, 0xc6, 0xaa, 0x81, 0x27, 0x24, 0x20, 0x51, 0x14, 0x11, 0xa4, 0x08, 0xb8, 0x16, 0x50,
0x40, 0x22, 0xba, 0x72, 0x6b, 0x73, 0x8a, 0x7d, 0xb7, 0xb9, 0xb9, 0x24, 0xed, 0x0b, 0x02, 0xf1,
0x19, 0xf8, 0x68, 0x7c, 0x1f, 0x74, 0xbb, 0x7b, 0x77, 0x7b, 0xe7, 0xb3, 0xeb, 0x86, 0xf4, 0xc9,
0x9a, 0x99, 0xdf, 0xfc, 0xdd, 0xf1, 0xcc, 0x1c, 0x74, 0x46, 0x91, 0xcf, 0x03, 0x6f, 0xa0, 0x7e,
0xf6, 0x45, 0x14, 0xc6, 0x21, 0x36, 0x14, 0x65, 0xf7, 0xbf, 0x15, 0x3c, 0x78, 0x76, 0x72, 0xfa,
0xec, 0x05, 0x8f, 0xae, 0x79, 0x34, 0x10, 0x17, 0xe3, 0x81, 0x44, 0x0c, 0xc8, 0xbb, 0x38, 0xbf,
0xa1, 0xc1, 0x0d, 0x29, 0x0d, 0xe6, 0xc2, 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, 0xee, 0x22, 0x31, 0x09, 0xfc, 0x06,
0x36, 0x4a, 0x13, 0x03, 0xed, 0x54, 0x65, 0x76, 0x7c, 0xd9, 0x5b, 0x73, 0x65, 0x24, 0xf0, 0x10,
0xee, 0x9b, 0xf7, 0x2f, 0xe5, 0x49, 0x96, 0x2e, 0xee, 0x3c, 0xc9, 0xf2, 0xbd, 0x8c, 0x67, 0xb0,
0x59, 0x75, 0xb2, 0xa1, 0x59, 0xe0, 0xaa, 0x4b, 0xd2, 0xee, 0x2d, 0x06, 0x64, 0xa6, 0x67, 0x3a,
0x1c, 0xf7, 0x16, 0xf5, 0x7f, 0xd9, 0x74, 0xe5, 0x87, 0xd2, 0xe1, 0xe3, 0x9f, 0xf7, 0x92, 0x6f,
0xba, 0xf3, 0x93, 0x53, 0xe3, 0x63, 0x4e, 0x29, 0x7d, 0xae, 0x7e, 0x5e, 0x35, 0x24, 0xf3, 0x93,
0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xaf, 0x0f, 0xd2, 0x1a, 0x0e, 0x00, 0x00,
var fileDescriptor_friend_2a356ccaa517dcdd = []byte{
// 957 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xe1, 0x6e, 0xdb, 0x46,
0x0c, 0x86, 0x9d, 0x25, 0x4d, 0x68, 0xd7, 0x49, 0x69, 0xd7, 0x15, 0x94, 0x36, 0x71, 0x0f, 0x43,
0xeb, 0xfd, 0x68, 0x8c, 0xba, 0x18, 0x30, 0x60, 0xc3, 0xb0, 0x04, 0x45, 0x81, 0x0c, 0x08, 0xba,
0xa9, 0xed, 0x86, 0xec, 0xc7, 0x06, 0x75, 0x3a, 0x7b, 0x9e, 0x6d, 0xe9, 0x22, 0x2a, 0x4d, 0xfb,
0x20, 0x7b, 0xb4, 0xbd, 0xcf, 0xa0, 0xbb, 0x93, 0xee, 0x24, 0xcb, 0xae, 0xb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0xbf, 0x40, 0xbb,
0x62, 0xab, 0xe0, 0x41, 0x65, 0x8d, 0xf2, 0xf5, 0xe6, 0x1e, 0xae, 0xb4, 0x93, 0xc0, 0x63, 0x68,
0xda, 0xcc, 0x85, 0xf9, 0x5d, 0x4b, 0x44, 0xe9, 0x3a, 0xd5, 0x06, 0x12, 0xf8, 0x0a, 0x70, 0x91,
0x50, 0xf0, 0x81, 0x29, 0x5a, 0x05, 0x07, 0xba, 0x07, 0xab, 0xcc, 0x24, 0xf0, 0x47, 0xd8, 0x2d,
0xf1, 0x02, 0xba, 0xd9, 0x91, 0x45, 0x92, 0x72, 0xf7, 0x97, 0xda, 0x48, 0xe0, 0x09, 0xdc, 0xb6,
0x1f, 0x9f, 0x64, 0x2e, 0x59, 0x7a, 0xee, 0x9a, 0x4b, 0x96, 0x1f, 0xab, 0x78, 0x0e, 0x9d, 0xaa,
0xe7, 0x15, 0xda, 0x05, 0xae, 0x7a, 0xdf, 0xb9, 0xbd, 0xd5, 0x80, 0xdc, 0xf5, 0xc2, 0x84, 0xe3,
0xe1, 0xaa, 0xf9, 0x2f, 0xbb, 0xae, 0xfc, 0xbf, 0x72, 0xf2, 0xf0, 0xb7, 0xc3, 0xf4, 0x3f, 0xd6,
0x1f, 0xa7, 0x67, 0xd6, 0x9f, 0x2b, 0x75, 0xe8, 0x5b, 0xf5, 0xf3, 0x76, 0x4b, 0x2a, 0x9f, 0xfd,
0x17, 0x00, 0x00, 0xff, 0xff, 0x90, 0x2a, 0xf6, 0x16, 0xaa, 0x0d, 0x00, 0x00,
}
+15 -7
View File
@@ -4,11 +4,15 @@ option go_package = "Open_IM/pkg/proto/friend;friend";
package friend;
message getPaginationFriendsReq{
string ownerUserID = 1;
repeated string friendUserIDs = 2;
sdkws.RequestPagination pagination = 1;
string userID = 2;
}
message getPaginationFriendsResp{
repeated sdkws.FriendInfo friendsInfo = 1;
repeated sdkws.FriendInfo FriendsInfo = 1;
int32 total = 2;
}
@@ -43,12 +47,11 @@ message getPaginationFriendsApplyToResp{
message getDesignatedFriendsReq{
sdkws.RequestPagination pagination = 1;
string userID = 2;
string ownerUserID = 1;
repeated string friendUserIDs = 2;
}
message getDesignatedFriendsResp{
repeated sdkws.FriendInfo FriendsInfo = 1;
int32 total = 2;
repeated sdkws.FriendInfo friendsInfo = 1;
}
@@ -160,4 +163,9 @@ service friend{
rpc getDesignatedFriends(getDesignatedFriendsReq) returns(getDesignatedFriendsResp);
// id不存在也返回错误
rpc getPaginationFriends(getPaginationFriendsReq) returns (getPaginationFriendsResp);
}
+64 -64
View File
@@ -39,7 +39,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} }
func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) }
func (*CreateGroupReq) ProtoMessage() {}
func (*CreateGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{0}
return fileDescriptor_group_a9155eb4f624bfe9, []int{0}
}
func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b)
@@ -98,7 +98,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} }
func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) }
func (*CreateGroupResp) ProtoMessage() {}
func (*CreateGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{1}
return fileDescriptor_group_a9155eb4f624bfe9, []int{1}
}
func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b)
@@ -136,7 +136,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} }
func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupsInfoReq) ProtoMessage() {}
func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{2}
return fileDescriptor_group_a9155eb4f624bfe9, []int{2}
}
func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b)
@@ -174,7 +174,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} }
func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupsInfoResp) ProtoMessage() {}
func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{3}
return fileDescriptor_group_a9155eb4f624bfe9, []int{3}
}
func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b)
@@ -212,7 +212,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} }
func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) }
func (*SetGroupInfoReq) ProtoMessage() {}
func (*SetGroupInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{4}
return fileDescriptor_group_a9155eb4f624bfe9, []int{4}
}
func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b)
@@ -249,7 +249,7 @@ func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} }
func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) }
func (*SetGroupInfoResp) ProtoMessage() {}
func (*SetGroupInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{5}
return fileDescriptor_group_a9155eb4f624bfe9, []int{5}
}
func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b)
@@ -281,7 +281,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL
func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupApplicationListReq) ProtoMessage() {}
func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{6}
return fileDescriptor_group_a9155eb4f624bfe9, []int{6}
}
func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b)
@@ -327,7 +327,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication
func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupApplicationListResp) ProtoMessage() {}
func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{7}
return fileDescriptor_group_a9155eb4f624bfe9, []int{7}
}
func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b)
@@ -373,7 +373,7 @@ func (m *GetUserReqApplicationListReq) Reset() { *m = GetUserReqApplicat
func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) }
func (*GetUserReqApplicationListReq) ProtoMessage() {}
func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{8}
return fileDescriptor_group_a9155eb4f624bfe9, []int{8}
}
func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b)
@@ -419,7 +419,7 @@ func (m *GetUserReqApplicationListResp) Reset() { *m = GetUserReqApplica
func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) }
func (*GetUserReqApplicationListResp) ProtoMessage() {}
func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{9}
return fileDescriptor_group_a9155eb4f624bfe9, []int{9}
}
func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b)
@@ -466,7 +466,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} }
func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) }
func (*TransferGroupOwnerReq) ProtoMessage() {}
func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{10}
return fileDescriptor_group_a9155eb4f624bfe9, []int{10}
}
func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b)
@@ -517,7 +517,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{}
func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) }
func (*TransferGroupOwnerResp) ProtoMessage() {}
func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{11}
return fileDescriptor_group_a9155eb4f624bfe9, []int{11}
}
func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b)
@@ -551,7 +551,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} }
func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) }
func (*JoinGroupReq) ProtoMessage() {}
func (*JoinGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{12}
return fileDescriptor_group_a9155eb4f624bfe9, []int{12}
}
func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b)
@@ -609,7 +609,7 @@ func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} }
func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) }
func (*JoinGroupResp) ProtoMessage() {}
func (*JoinGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{13}
return fileDescriptor_group_a9155eb4f624bfe9, []int{13}
}
func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b)
@@ -643,7 +643,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes
func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationResponseReq) ProtoMessage() {}
func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{14}
return fileDescriptor_group_a9155eb4f624bfe9, []int{14}
}
func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b)
@@ -701,7 +701,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe
func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationResponseResp) ProtoMessage() {}
func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{15}
return fileDescriptor_group_a9155eb4f624bfe9, []int{15}
}
func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b)
@@ -732,7 +732,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} }
func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) }
func (*QuitGroupReq) ProtoMessage() {}
func (*QuitGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{16}
return fileDescriptor_group_a9155eb4f624bfe9, []int{16}
}
func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b)
@@ -769,7 +769,7 @@ func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} }
func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) }
func (*QuitGroupResp) ProtoMessage() {}
func (*QuitGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{17}
return fileDescriptor_group_a9155eb4f624bfe9, []int{17}
}
func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b)
@@ -802,7 +802,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} }
func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberListReq) ProtoMessage() {}
func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{18}
return fileDescriptor_group_a9155eb4f624bfe9, []int{18}
}
func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b)
@@ -855,7 +855,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{}
func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberListResp) ProtoMessage() {}
func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{19}
return fileDescriptor_group_a9155eb4f624bfe9, []int{19}
}
func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b)
@@ -901,7 +901,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{}
func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersInfoReq) ProtoMessage() {}
func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{20}
return fileDescriptor_group_a9155eb4f624bfe9, []int{20}
}
func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b)
@@ -946,7 +946,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp
func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersInfoResp) ProtoMessage() {}
func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{21}
return fileDescriptor_group_a9155eb4f624bfe9, []int{21}
}
func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b)
@@ -986,7 +986,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} }
func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*KickGroupMemberReq) ProtoMessage() {}
func (*KickGroupMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{22}
return fileDescriptor_group_a9155eb4f624bfe9, []int{22}
}
func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b)
@@ -1037,7 +1037,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} }
func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) }
func (*KickGroupMemberResp) ProtoMessage() {}
func (*KickGroupMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{23}
return fileDescriptor_group_a9155eb4f624bfe9, []int{23}
}
func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b)
@@ -1069,7 +1069,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} }
func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) }
func (*GetJoinedGroupListReq) ProtoMessage() {}
func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{24}
return fileDescriptor_group_a9155eb4f624bfe9, []int{24}
}
func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b)
@@ -1115,7 +1115,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{}
func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) }
func (*GetJoinedGroupListResp) ProtoMessage() {}
func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{25}
return fileDescriptor_group_a9155eb4f624bfe9, []int{25}
}
func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b)
@@ -1162,7 +1162,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} }
func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) }
func (*InviteUserToGroupReq) ProtoMessage() {}
func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{26}
return fileDescriptor_group_a9155eb4f624bfe9, []int{26}
}
func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b)
@@ -1213,7 +1213,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} }
func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) }
func (*InviteUserToGroupResp) ProtoMessage() {}
func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{27}
return fileDescriptor_group_a9155eb4f624bfe9, []int{27}
}
func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b)
@@ -1245,7 +1245,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} }
func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupAllMemberReq) ProtoMessage() {}
func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{28}
return fileDescriptor_group_a9155eb4f624bfe9, []int{28}
}
func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b)
@@ -1290,7 +1290,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} }
func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupAllMemberResp) ProtoMessage() {}
func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{29}
return fileDescriptor_group_a9155eb4f624bfe9, []int{29}
}
func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b)
@@ -1330,7 +1330,7 @@ func (m *CMSGroup) Reset() { *m = CMSGroup{} }
func (m *CMSGroup) String() string { return proto.CompactTextString(m) }
func (*CMSGroup) ProtoMessage() {}
func (*CMSGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{30}
return fileDescriptor_group_a9155eb4f624bfe9, []int{30}
}
func (m *CMSGroup) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CMSGroup.Unmarshal(m, b)
@@ -1384,7 +1384,7 @@ func (m *GetGroupsReq) Reset() { *m = GetGroupsReq{} }
func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupsReq) ProtoMessage() {}
func (*GetGroupsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{31}
return fileDescriptor_group_a9155eb4f624bfe9, []int{31}
}
func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b)
@@ -1437,7 +1437,7 @@ func (m *GetGroupsResp) Reset() { *m = GetGroupsResp{} }
func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupsResp) ProtoMessage() {}
func (*GetGroupsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{32}
return fileDescriptor_group_a9155eb4f624bfe9, []int{32}
}
func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b)
@@ -1482,7 +1482,7 @@ func (m *GetGroupMemberReq) Reset() { *m = GetGroupMemberReq{} }
func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberReq) ProtoMessage() {}
func (*GetGroupMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{33}
return fileDescriptor_group_a9155eb4f624bfe9, []int{33}
}
func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b)
@@ -1522,7 +1522,7 @@ func (m *GetGroupMembersCMSReq) Reset() { *m = GetGroupMembersCMSReq{} }
func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersCMSReq) ProtoMessage() {}
func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{34}
return fileDescriptor_group_a9155eb4f624bfe9, []int{34}
}
func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b)
@@ -1575,7 +1575,7 @@ func (m *GetGroupMembersCMSResp) Reset() { *m = GetGroupMembersCMSResp{}
func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMembersCMSResp) ProtoMessage() {}
func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{35}
return fileDescriptor_group_a9155eb4f624bfe9, []int{35}
}
func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b)
@@ -1620,7 +1620,7 @@ func (m *DismissGroupReq) Reset() { *m = DismissGroupReq{} }
func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) }
func (*DismissGroupReq) ProtoMessage() {}
func (*DismissGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{36}
return fileDescriptor_group_a9155eb4f624bfe9, []int{36}
}
func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b)
@@ -1657,7 +1657,7 @@ func (m *DismissGroupResp) Reset() { *m = DismissGroupResp{} }
func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) }
func (*DismissGroupResp) ProtoMessage() {}
func (*DismissGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{37}
return fileDescriptor_group_a9155eb4f624bfe9, []int{37}
}
func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b)
@@ -1690,7 +1690,7 @@ func (m *MuteGroupMemberReq) Reset() { *m = MuteGroupMemberReq{} }
func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*MuteGroupMemberReq) ProtoMessage() {}
func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{38}
return fileDescriptor_group_a9155eb4f624bfe9, []int{38}
}
func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b)
@@ -1741,7 +1741,7 @@ func (m *MuteGroupMemberResp) Reset() { *m = MuteGroupMemberResp{} }
func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
func (*MuteGroupMemberResp) ProtoMessage() {}
func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{39}
return fileDescriptor_group_a9155eb4f624bfe9, []int{39}
}
func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b)
@@ -1773,7 +1773,7 @@ func (m *CancelMuteGroupMemberReq) Reset() { *m = CancelMuteGroupMemberR
func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupMemberReq) ProtoMessage() {}
func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{40}
return fileDescriptor_group_a9155eb4f624bfe9, []int{40}
}
func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b)
@@ -1817,7 +1817,7 @@ func (m *CancelMuteGroupMemberResp) Reset() { *m = CancelMuteGroupMember
func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupMemberResp) ProtoMessage() {}
func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{41}
return fileDescriptor_group_a9155eb4f624bfe9, []int{41}
}
func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b)
@@ -1848,7 +1848,7 @@ func (m *MuteGroupReq) Reset() { *m = MuteGroupReq{} }
func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) }
func (*MuteGroupReq) ProtoMessage() {}
func (*MuteGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{42}
return fileDescriptor_group_a9155eb4f624bfe9, []int{42}
}
func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b)
@@ -1885,7 +1885,7 @@ func (m *MuteGroupResp) Reset() { *m = MuteGroupResp{} }
func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) }
func (*MuteGroupResp) ProtoMessage() {}
func (*MuteGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{43}
return fileDescriptor_group_a9155eb4f624bfe9, []int{43}
}
func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b)
@@ -1916,7 +1916,7 @@ func (m *CancelMuteGroupReq) Reset() { *m = CancelMuteGroupReq{} }
func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupReq) ProtoMessage() {}
func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{44}
return fileDescriptor_group_a9155eb4f624bfe9, []int{44}
}
func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b)
@@ -1953,7 +1953,7 @@ func (m *CancelMuteGroupResp) Reset() { *m = CancelMuteGroupResp{} }
func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) }
func (*CancelMuteGroupResp) ProtoMessage() {}
func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{45}
return fileDescriptor_group_a9155eb4f624bfe9, []int{45}
}
func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b)
@@ -1984,7 +1984,7 @@ func (m *GetJoinedSuperGroupListReq) Reset() { *m = GetJoinedSuperGroupL
func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) }
func (*GetJoinedSuperGroupListReq) ProtoMessage() {}
func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{46}
return fileDescriptor_group_a9155eb4f624bfe9, []int{46}
}
func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b)
@@ -2022,7 +2022,7 @@ func (m *GetJoinedSuperGroupListResp) Reset() { *m = GetJoinedSuperGroup
func (m *GetJoinedSuperGroupListResp) String() string { return proto.CompactTextString(m) }
func (*GetJoinedSuperGroupListResp) ProtoMessage() {}
func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{47}
return fileDescriptor_group_a9155eb4f624bfe9, []int{47}
}
func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b)
@@ -2060,7 +2060,7 @@ func (m *GetSuperGroupsInfoReq) Reset() { *m = GetSuperGroupsInfoReq{} }
func (m *GetSuperGroupsInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetSuperGroupsInfoReq) ProtoMessage() {}
func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{48}
return fileDescriptor_group_a9155eb4f624bfe9, []int{48}
}
func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b)
@@ -2098,7 +2098,7 @@ func (m *GetSuperGroupsInfoResp) Reset() { *m = GetSuperGroupsInfoResp{}
func (m *GetSuperGroupsInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetSuperGroupsInfoResp) ProtoMessage() {}
func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{49}
return fileDescriptor_group_a9155eb4f624bfe9, []int{49}
}
func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b)
@@ -2141,7 +2141,7 @@ func (m *SetGroupMemberInfo) Reset() { *m = SetGroupMemberInfo{} }
func (m *SetGroupMemberInfo) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberInfo) ProtoMessage() {}
func (*SetGroupMemberInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{50}
return fileDescriptor_group_a9155eb4f624bfe9, []int{50}
}
func (m *SetGroupMemberInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberInfo.Unmarshal(m, b)
@@ -2214,7 +2214,7 @@ func (m *SetGroupMemberInfoReq) Reset() { *m = SetGroupMemberInfoReq{} }
func (m *SetGroupMemberInfoReq) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberInfoReq) ProtoMessage() {}
func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{51}
return fileDescriptor_group_a9155eb4f624bfe9, []int{51}
}
func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b)
@@ -2251,7 +2251,7 @@ func (m *SetGroupMemberInfoResp) Reset() { *m = SetGroupMemberInfoResp{}
func (m *SetGroupMemberInfoResp) String() string { return proto.CompactTextString(m) }
func (*SetGroupMemberInfoResp) ProtoMessage() {}
func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{52}
return fileDescriptor_group_a9155eb4f624bfe9, []int{52}
}
func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b)
@@ -2282,7 +2282,7 @@ func (m *GetGroupAbstractInfoReq) Reset() { *m = GetGroupAbstractInfoReq
func (m *GetGroupAbstractInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupAbstractInfoReq) ProtoMessage() {}
func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{53}
return fileDescriptor_group_a9155eb4f624bfe9, []int{53}
}
func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b)
@@ -2322,7 +2322,7 @@ func (m *GroupAbstractInfo) Reset() { *m = GroupAbstractInfo{} }
func (m *GroupAbstractInfo) String() string { return proto.CompactTextString(m) }
func (*GroupAbstractInfo) ProtoMessage() {}
func (*GroupAbstractInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{54}
return fileDescriptor_group_a9155eb4f624bfe9, []int{54}
}
func (m *GroupAbstractInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupAbstractInfo.Unmarshal(m, b)
@@ -2374,7 +2374,7 @@ func (m *GetGroupAbstractInfoResp) Reset() { *m = GetGroupAbstractInfoRe
func (m *GetGroupAbstractInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupAbstractInfoResp) ProtoMessage() {}
func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{55}
return fileDescriptor_group_a9155eb4f624bfe9, []int{55}
}
func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b)
@@ -2413,7 +2413,7 @@ func (m *GetUserInGroupMembersReq) Reset() { *m = GetUserInGroupMembersR
func (m *GetUserInGroupMembersReq) String() string { return proto.CompactTextString(m) }
func (*GetUserInGroupMembersReq) ProtoMessage() {}
func (*GetUserInGroupMembersReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{56}
return fileDescriptor_group_a9155eb4f624bfe9, []int{56}
}
func (m *GetUserInGroupMembersReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInGroupMembersReq.Unmarshal(m, b)
@@ -2458,7 +2458,7 @@ func (m *GetUserInGroupMembersResp) Reset() { *m = GetUserInGroupMembers
func (m *GetUserInGroupMembersResp) String() string { return proto.CompactTextString(m) }
func (*GetUserInGroupMembersResp) ProtoMessage() {}
func (*GetUserInGroupMembersResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{57}
return fileDescriptor_group_a9155eb4f624bfe9, []int{57}
}
func (m *GetUserInGroupMembersResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInGroupMembersResp.Unmarshal(m, b)
@@ -2496,7 +2496,7 @@ func (m *GetGroupMemberUserIDReq) Reset() { *m = GetGroupMemberUserIDReq
func (m *GetGroupMemberUserIDReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberUserIDReq) ProtoMessage() {}
func (*GetGroupMemberUserIDReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{58}
return fileDescriptor_group_a9155eb4f624bfe9, []int{58}
}
func (m *GetGroupMemberUserIDReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberUserIDReq.Unmarshal(m, b)
@@ -2534,7 +2534,7 @@ func (m *GetGroupMemberUserIDResp) Reset() { *m = GetGroupMemberUserIDRe
func (m *GetGroupMemberUserIDResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberUserIDResp) ProtoMessage() {}
func (*GetGroupMemberUserIDResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{59}
return fileDescriptor_group_a9155eb4f624bfe9, []int{59}
}
func (m *GetGroupMemberUserIDResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberUserIDResp.Unmarshal(m, b)
@@ -2573,7 +2573,7 @@ func (m *GetGroupMemberRoleLevelReq) Reset() { *m = GetGroupMemberRoleLe
func (m *GetGroupMemberRoleLevelReq) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberRoleLevelReq) ProtoMessage() {}
func (*GetGroupMemberRoleLevelReq) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{60}
return fileDescriptor_group_a9155eb4f624bfe9, []int{60}
}
func (m *GetGroupMemberRoleLevelReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberRoleLevelReq.Unmarshal(m, b)
@@ -2618,7 +2618,7 @@ func (m *GetGroupMemberRoleLevelResp) Reset() { *m = GetGroupMemberRoleL
func (m *GetGroupMemberRoleLevelResp) String() string { return proto.CompactTextString(m) }
func (*GetGroupMemberRoleLevelResp) ProtoMessage() {}
func (*GetGroupMemberRoleLevelResp) Descriptor() ([]byte, []int) {
return fileDescriptor_group_4a94cf46004e5ca3, []int{61}
return fileDescriptor_group_a9155eb4f624bfe9, []int{61}
}
func (m *GetGroupMemberRoleLevelResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGroupMemberRoleLevelResp.Unmarshal(m, b)
@@ -3727,9 +3727,9 @@ var _Group_serviceDesc = grpc.ServiceDesc{
Metadata: "group/group.proto",
}
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_4a94cf46004e5ca3) }
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_a9155eb4f624bfe9) }
var fileDescriptor_group_4a94cf46004e5ca3 = []byte{
var fileDescriptor_group_a9155eb4f624bfe9 = []byte{
// 1833 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x51, 0x53, 0xe4, 0xc6,
0x11, 0xae, 0xdd, 0x33, 0xdc, 0xd1, 0xc7, 0x1a, 0x18, 0xd8, 0x45, 0x27, 0xb8, 0x83, 0x8c, 0xaf,
+232 -144
View File
@@ -38,7 +38,7 @@ func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} }
func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) }
func (*MsgDataToMQ) ProtoMessage() {}
func (*MsgDataToMQ) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{0}
return fileDescriptor_msg_6d33b8473e6e0931, []int{0}
}
func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b)
@@ -91,7 +91,7 @@ func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} }
func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) }
func (*MsgDataToDB) ProtoMessage() {}
func (*MsgDataToDB) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{1}
return fileDescriptor_msg_6d33b8473e6e0931, []int{1}
}
func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b)
@@ -138,7 +138,7 @@ func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} }
func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) }
func (*PushMsgDataToMQ) ProtoMessage() {}
func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{2}
return fileDescriptor_msg_6d33b8473e6e0931, []int{2}
}
func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b)
@@ -193,7 +193,7 @@ func (m *MsgDataToMongoByMQ) Reset() { *m = MsgDataToMongoByMQ{} }
func (m *MsgDataToMongoByMQ) String() string { return proto.CompactTextString(m) }
func (*MsgDataToMongoByMQ) ProtoMessage() {}
func (*MsgDataToMongoByMQ) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{3}
return fileDescriptor_msg_6d33b8473e6e0931, []int{3}
}
func (m *MsgDataToMongoByMQ) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgDataToMongoByMQ.Unmarshal(m, b)
@@ -253,7 +253,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} }
func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqReq) ProtoMessage() {}
func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{4}
return fileDescriptor_msg_6d33b8473e6e0931, []int{4}
}
func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b)
@@ -301,7 +301,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} }
func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqResp) ProtoMessage() {}
func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{5}
return fileDescriptor_msg_6d33b8473e6e0931, []int{5}
}
func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b)
@@ -360,7 +360,7 @@ func (m *SendMsgReq) Reset() { *m = SendMsgReq{} }
func (m *SendMsgReq) String() string { return proto.CompactTextString(m) }
func (*SendMsgReq) ProtoMessage() {}
func (*SendMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{6}
return fileDescriptor_msg_6d33b8473e6e0931, []int{6}
}
func (m *SendMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SendMsgReq.Unmarshal(m, b)
@@ -400,7 +400,7 @@ func (m *SendMsgResp) Reset() { *m = SendMsgResp{} }
func (m *SendMsgResp) String() string { return proto.CompactTextString(m) }
func (*SendMsgResp) ProtoMessage() {}
func (*SendMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{7}
return fileDescriptor_msg_6d33b8473e6e0931, []int{7}
}
func (m *SendMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SendMsgResp.Unmarshal(m, b)
@@ -452,7 +452,7 @@ func (m *ClearMsgReq) Reset() { *m = ClearMsgReq{} }
func (m *ClearMsgReq) String() string { return proto.CompactTextString(m) }
func (*ClearMsgReq) ProtoMessage() {}
func (*ClearMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{8}
return fileDescriptor_msg_6d33b8473e6e0931, []int{8}
}
func (m *ClearMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClearMsgReq.Unmarshal(m, b)
@@ -489,7 +489,7 @@ func (m *ClearMsgResp) Reset() { *m = ClearMsgResp{} }
func (m *ClearMsgResp) String() string { return proto.CompactTextString(m) }
func (*ClearMsgResp) ProtoMessage() {}
func (*ClearMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{9}
return fileDescriptor_msg_6d33b8473e6e0931, []int{9}
}
func (m *ClearMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClearMsgResp.Unmarshal(m, b)
@@ -522,7 +522,7 @@ func (m *SetMsgMinSeqReq) Reset() { *m = SetMsgMinSeqReq{} }
func (m *SetMsgMinSeqReq) String() string { return proto.CompactTextString(m) }
func (*SetMsgMinSeqReq) ProtoMessage() {}
func (*SetMsgMinSeqReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{10}
return fileDescriptor_msg_6d33b8473e6e0931, []int{10}
}
func (m *SetMsgMinSeqReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetMsgMinSeqReq.Unmarshal(m, b)
@@ -573,7 +573,7 @@ func (m *SetMsgMinSeqResp) Reset() { *m = SetMsgMinSeqResp{} }
func (m *SetMsgMinSeqResp) String() string { return proto.CompactTextString(m) }
func (*SetMsgMinSeqResp) ProtoMessage() {}
func (*SetMsgMinSeqResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{11}
return fileDescriptor_msg_6d33b8473e6e0931, []int{11}
}
func (m *SetMsgMinSeqResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetMsgMinSeqResp.Unmarshal(m, b)
@@ -604,7 +604,7 @@ func (m *SetSendMsgStatusReq) Reset() { *m = SetSendMsgStatusReq{} }
func (m *SetSendMsgStatusReq) String() string { return proto.CompactTextString(m) }
func (*SetSendMsgStatusReq) ProtoMessage() {}
func (*SetSendMsgStatusReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{12}
return fileDescriptor_msg_6d33b8473e6e0931, []int{12}
}
func (m *SetSendMsgStatusReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetSendMsgStatusReq.Unmarshal(m, b)
@@ -641,7 +641,7 @@ func (m *SetSendMsgStatusResp) Reset() { *m = SetSendMsgStatusResp{} }
func (m *SetSendMsgStatusResp) String() string { return proto.CompactTextString(m) }
func (*SetSendMsgStatusResp) ProtoMessage() {}
func (*SetSendMsgStatusResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{13}
return fileDescriptor_msg_6d33b8473e6e0931, []int{13}
}
func (m *SetSendMsgStatusResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetSendMsgStatusResp.Unmarshal(m, b)
@@ -672,7 +672,7 @@ func (m *GetSendMsgStatusReq) Reset() { *m = GetSendMsgStatusReq{} }
func (m *GetSendMsgStatusReq) String() string { return proto.CompactTextString(m) }
func (*GetSendMsgStatusReq) ProtoMessage() {}
func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{14}
return fileDescriptor_msg_6d33b8473e6e0931, []int{14}
}
func (m *GetSendMsgStatusReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSendMsgStatusReq.Unmarshal(m, b)
@@ -712,7 +712,7 @@ func (m *GetSendMsgStatusResp) Reset() { *m = GetSendMsgStatusResp{} }
func (m *GetSendMsgStatusResp) String() string { return proto.CompactTextString(m) }
func (*GetSendMsgStatusResp) ProtoMessage() {}
func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{15}
return fileDescriptor_msg_6d33b8473e6e0931, []int{15}
}
func (m *GetSendMsgStatusResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSendMsgStatusResp.Unmarshal(m, b)
@@ -765,7 +765,7 @@ func (m *DelSuperGroupMsgReq) Reset() { *m = DelSuperGroupMsgReq{} }
func (m *DelSuperGroupMsgReq) String() string { return proto.CompactTextString(m) }
func (*DelSuperGroupMsgReq) ProtoMessage() {}
func (*DelSuperGroupMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{16}
return fileDescriptor_msg_6d33b8473e6e0931, []int{16}
}
func (m *DelSuperGroupMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelSuperGroupMsgReq.Unmarshal(m, b)
@@ -809,7 +809,7 @@ func (m *DelSuperGroupMsgResp) Reset() { *m = DelSuperGroupMsgResp{} }
func (m *DelSuperGroupMsgResp) String() string { return proto.CompactTextString(m) }
func (*DelSuperGroupMsgResp) ProtoMessage() {}
func (*DelSuperGroupMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{17}
return fileDescriptor_msg_6d33b8473e6e0931, []int{17}
}
func (m *DelSuperGroupMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelSuperGroupMsgResp.Unmarshal(m, b)
@@ -842,7 +842,7 @@ func (m *GetSuperGroupMsgReq) Reset() { *m = GetSuperGroupMsgReq{} }
func (m *GetSuperGroupMsgReq) String() string { return proto.CompactTextString(m) }
func (*GetSuperGroupMsgReq) ProtoMessage() {}
func (*GetSuperGroupMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{18}
return fileDescriptor_msg_6d33b8473e6e0931, []int{18}
}
func (m *GetSuperGroupMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupMsgReq.Unmarshal(m, b)
@@ -896,7 +896,7 @@ func (m *GetSuperGroupMsgResp) Reset() { *m = GetSuperGroupMsgResp{} }
func (m *GetSuperGroupMsgResp) String() string { return proto.CompactTextString(m) }
func (*GetSuperGroupMsgResp) ProtoMessage() {}
func (*GetSuperGroupMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{19}
return fileDescriptor_msg_6d33b8473e6e0931, []int{19}
}
func (m *GetSuperGroupMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSuperGroupMsgResp.Unmarshal(m, b)
@@ -949,7 +949,7 @@ func (m *GetWriteDiffMsgReq) Reset() { *m = GetWriteDiffMsgReq{} }
func (m *GetWriteDiffMsgReq) String() string { return proto.CompactTextString(m) }
func (*GetWriteDiffMsgReq) ProtoMessage() {}
func (*GetWriteDiffMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{20}
return fileDescriptor_msg_6d33b8473e6e0931, []int{20}
}
func (m *GetWriteDiffMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetWriteDiffMsgReq.Unmarshal(m, b)
@@ -996,7 +996,7 @@ func (m *GetWriteDiffMsgResp) Reset() { *m = GetWriteDiffMsgResp{} }
func (m *GetWriteDiffMsgResp) String() string { return proto.CompactTextString(m) }
func (*GetWriteDiffMsgResp) ProtoMessage() {}
func (*GetWriteDiffMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{21}
return fileDescriptor_msg_6d33b8473e6e0931, []int{21}
}
func (m *GetWriteDiffMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetWriteDiffMsgResp.Unmarshal(m, b)
@@ -1058,7 +1058,7 @@ func (m *ModifyMessageReactionExtensionsReq) Reset() { *m = ModifyMessag
func (m *ModifyMessageReactionExtensionsReq) String() string { return proto.CompactTextString(m) }
func (*ModifyMessageReactionExtensionsReq) ProtoMessage() {}
func (*ModifyMessageReactionExtensionsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{22}
return fileDescriptor_msg_6d33b8473e6e0931, []int{22}
}
func (m *ModifyMessageReactionExtensionsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModifyMessageReactionExtensionsReq.Unmarshal(m, b)
@@ -1176,7 +1176,7 @@ func (m *SetMessageReactionExtensionsReq) Reset() { *m = SetMessageReact
func (m *SetMessageReactionExtensionsReq) String() string { return proto.CompactTextString(m) }
func (*SetMessageReactionExtensionsReq) ProtoMessage() {}
func (*SetMessageReactionExtensionsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{23}
return fileDescriptor_msg_6d33b8473e6e0931, []int{23}
}
func (m *SetMessageReactionExtensionsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetMessageReactionExtensionsReq.Unmarshal(m, b)
@@ -1289,7 +1289,7 @@ func (m *SetMessageReactionExtensionsResp) Reset() { *m = SetMessageReac
func (m *SetMessageReactionExtensionsResp) String() string { return proto.CompactTextString(m) }
func (*SetMessageReactionExtensionsResp) ProtoMessage() {}
func (*SetMessageReactionExtensionsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{24}
return fileDescriptor_msg_6d33b8473e6e0931, []int{24}
}
func (m *SetMessageReactionExtensionsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetMessageReactionExtensionsResp.Unmarshal(m, b)
@@ -1357,6 +1357,7 @@ type GetMessageListReactionExtensionsReq struct {
SourceID string `protobuf:"bytes,3,opt,name=sourceID" json:"sourceID,omitempty"`
SessionType int32 `protobuf:"varint,4,opt,name=sessionType" json:"sessionType,omitempty"`
MessageReactionKeyList []*GetMessageListReactionExtensionsReq_MessageReactionKey `protobuf:"bytes,5,rep,name=messageReactionKeyList" json:"messageReactionKeyList,omitempty"`
TypeKeyList []string `protobuf:"bytes,6,rep,name=TypeKeyList" json:"TypeKeyList,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1366,7 +1367,7 @@ func (m *GetMessageListReactionExtensionsReq) Reset() { *m = GetMessageL
func (m *GetMessageListReactionExtensionsReq) String() string { return proto.CompactTextString(m) }
func (*GetMessageListReactionExtensionsReq) ProtoMessage() {}
func (*GetMessageListReactionExtensionsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{25}
return fileDescriptor_msg_6d33b8473e6e0931, []int{25}
}
func (m *GetMessageListReactionExtensionsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMessageListReactionExtensionsReq.Unmarshal(m, b)
@@ -1421,6 +1422,13 @@ func (m *GetMessageListReactionExtensionsReq) GetMessageReactionKeyList() []*Get
return nil
}
func (m *GetMessageListReactionExtensionsReq) GetTypeKeyList() []string {
if m != nil {
return m.TypeKeyList
}
return nil
}
type GetMessageListReactionExtensionsReq_MessageReactionKey struct {
ClientMsgID string `protobuf:"bytes,1,opt,name=clientMsgID" json:"clientMsgID,omitempty"`
MsgFirstModifyTime int64 `protobuf:"varint,2,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"`
@@ -1437,7 +1445,7 @@ func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) String() string
}
func (*GetMessageListReactionExtensionsReq_MessageReactionKey) ProtoMessage() {}
func (*GetMessageListReactionExtensionsReq_MessageReactionKey) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{25, 0}
return fileDescriptor_msg_6d33b8473e6e0931, []int{25, 0}
}
func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMessageListReactionExtensionsReq_MessageReactionKey.Unmarshal(m, b)
@@ -1484,7 +1492,7 @@ func (m *GetMessageListReactionExtensionsResp) Reset() { *m = GetMessage
func (m *GetMessageListReactionExtensionsResp) String() string { return proto.CompactTextString(m) }
func (*GetMessageListReactionExtensionsResp) ProtoMessage() {}
func (*GetMessageListReactionExtensionsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{26}
return fileDescriptor_msg_6d33b8473e6e0931, []int{26}
}
func (m *GetMessageListReactionExtensionsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMessageListReactionExtensionsResp.Unmarshal(m, b)
@@ -1539,7 +1547,7 @@ func (m *SingleMessageExtensionResult) Reset() { *m = SingleMessageExten
func (m *SingleMessageExtensionResult) String() string { return proto.CompactTextString(m) }
func (*SingleMessageExtensionResult) ProtoMessage() {}
func (*SingleMessageExtensionResult) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{27}
return fileDescriptor_msg_6d33b8473e6e0931, []int{27}
}
func (m *SingleMessageExtensionResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SingleMessageExtensionResult.Unmarshal(m, b)
@@ -1601,7 +1609,7 @@ func (m *ModifyMessageReactionExtensionsResp) Reset() { *m = ModifyMessa
func (m *ModifyMessageReactionExtensionsResp) String() string { return proto.CompactTextString(m) }
func (*ModifyMessageReactionExtensionsResp) ProtoMessage() {}
func (*ModifyMessageReactionExtensionsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{28}
return fileDescriptor_msg_6d33b8473e6e0931, []int{28}
}
func (m *ModifyMessageReactionExtensionsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModifyMessageReactionExtensionsResp.Unmarshal(m, b)
@@ -1669,7 +1677,7 @@ func (m *DeleteMessageListReactionExtensionsReq) Reset() {
func (m *DeleteMessageListReactionExtensionsReq) String() string { return proto.CompactTextString(m) }
func (*DeleteMessageListReactionExtensionsReq) ProtoMessage() {}
func (*DeleteMessageListReactionExtensionsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{29}
return fileDescriptor_msg_6d33b8473e6e0931, []int{29}
}
func (m *DeleteMessageListReactionExtensionsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteMessageListReactionExtensionsReq.Unmarshal(m, b)
@@ -1760,7 +1768,7 @@ func (m *DeleteMessageListReactionExtensionsResp) Reset() {
func (m *DeleteMessageListReactionExtensionsResp) String() string { return proto.CompactTextString(m) }
func (*DeleteMessageListReactionExtensionsResp) ProtoMessage() {}
func (*DeleteMessageListReactionExtensionsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{30}
return fileDescriptor_msg_6d33b8473e6e0931, []int{30}
}
func (m *DeleteMessageListReactionExtensionsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteMessageListReactionExtensionsResp.Unmarshal(m, b)
@@ -1814,7 +1822,7 @@ func (m *ExtendMsgResp) Reset() { *m = ExtendMsgResp{} }
func (m *ExtendMsgResp) String() string { return proto.CompactTextString(m) }
func (*ExtendMsgResp) ProtoMessage() {}
func (*ExtendMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{31}
return fileDescriptor_msg_6d33b8473e6e0931, []int{31}
}
func (m *ExtendMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExtendMsgResp.Unmarshal(m, b)
@@ -1870,7 +1878,7 @@ func (m *ExtendMsg) Reset() { *m = ExtendMsg{} }
func (m *ExtendMsg) String() string { return proto.CompactTextString(m) }
func (*ExtendMsg) ProtoMessage() {}
func (*ExtendMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{32}
return fileDescriptor_msg_6d33b8473e6e0931, []int{32}
}
func (m *ExtendMsg) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExtendMsg.Unmarshal(m, b)
@@ -1938,7 +1946,7 @@ func (m *KeyValueResp) Reset() { *m = KeyValueResp{} }
func (m *KeyValueResp) String() string { return proto.CompactTextString(m) }
func (*KeyValueResp) ProtoMessage() {}
func (*KeyValueResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{33}
return fileDescriptor_msg_6d33b8473e6e0931, []int{33}
}
func (m *KeyValueResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KeyValueResp.Unmarshal(m, b)
@@ -1992,7 +2000,7 @@ func (m *MsgDataToModifyByMQ) Reset() { *m = MsgDataToModifyByMQ{} }
func (m *MsgDataToModifyByMQ) String() string { return proto.CompactTextString(m) }
func (*MsgDataToModifyByMQ) ProtoMessage() {}
func (*MsgDataToModifyByMQ) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_9bd9d9abca588885, []int{34}
return fileDescriptor_msg_6d33b8473e6e0931, []int{34}
}
func (m *MsgDataToModifyByMQ) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgDataToModifyByMQ.Unmarshal(m, b)
@@ -2033,6 +2041,82 @@ func (m *MsgDataToModifyByMQ) GetTriggerID() string {
return ""
}
type DelMsgListReq struct {
UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"`
SeqList []uint32 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DelMsgListReq) Reset() { *m = DelMsgListReq{} }
func (m *DelMsgListReq) String() string { return proto.CompactTextString(m) }
func (*DelMsgListReq) ProtoMessage() {}
func (*DelMsgListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_6d33b8473e6e0931, []int{35}
}
func (m *DelMsgListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelMsgListReq.Unmarshal(m, b)
}
func (m *DelMsgListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DelMsgListReq.Marshal(b, m, deterministic)
}
func (dst *DelMsgListReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_DelMsgListReq.Merge(dst, src)
}
func (m *DelMsgListReq) XXX_Size() int {
return xxx_messageInfo_DelMsgListReq.Size(m)
}
func (m *DelMsgListReq) XXX_DiscardUnknown() {
xxx_messageInfo_DelMsgListReq.DiscardUnknown(m)
}
var xxx_messageInfo_DelMsgListReq proto.InternalMessageInfo
func (m *DelMsgListReq) GetUserID() string {
if m != nil {
return m.UserID
}
return ""
}
func (m *DelMsgListReq) GetSeqList() []uint32 {
if m != nil {
return m.SeqList
}
return nil
}
type DelMsgListResp struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DelMsgListResp) Reset() { *m = DelMsgListResp{} }
func (m *DelMsgListResp) String() string { return proto.CompactTextString(m) }
func (*DelMsgListResp) ProtoMessage() {}
func (*DelMsgListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_msg_6d33b8473e6e0931, []int{36}
}
func (m *DelMsgListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelMsgListResp.Unmarshal(m, b)
}
func (m *DelMsgListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DelMsgListResp.Marshal(b, m, deterministic)
}
func (dst *DelMsgListResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_DelMsgListResp.Merge(dst, src)
}
func (m *DelMsgListResp) XXX_Size() int {
return xxx_messageInfo_DelMsgListResp.Size(m)
}
func (m *DelMsgListResp) XXX_DiscardUnknown() {
xxx_messageInfo_DelMsgListResp.DiscardUnknown(m)
}
var xxx_messageInfo_DelMsgListResp proto.InternalMessageInfo
func init() {
proto.RegisterType((*MsgDataToMQ)(nil), "msg.MsgDataToMQ")
proto.RegisterType((*MsgDataToDB)(nil), "msg.MsgDataToDB")
@@ -2074,6 +2158,8 @@ func init() {
proto.RegisterMapType((map[string]*KeyValueResp)(nil), "msg.ExtendMsg.ReactionExtensionListEntry")
proto.RegisterType((*KeyValueResp)(nil), "msg.KeyValueResp")
proto.RegisterType((*MsgDataToModifyByMQ)(nil), "msg.MsgDataToModifyByMQ")
proto.RegisterType((*DelMsgListReq)(nil), "msg.DelMsgListReq")
proto.RegisterType((*DelMsgListResp)(nil), "msg.DelMsgListResp")
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -2094,7 +2180,7 @@ type MsgClient interface {
// 发送消息
SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error)
// 删除某人消息
DelMsgList(ctx context.Context, in *sdkws.DelMsgListReq, opts ...grpc.CallOption) (*sdkws.DelMsgListResp, error)
DelMsgList(ctx context.Context, in *DelMsgListReq, opts ...grpc.CallOption) (*DelMsgListResp, error)
// 删除某个用户某个大群消息
DelSuperGroupMsg(ctx context.Context, in *DelSuperGroupMsgReq, opts ...grpc.CallOption) (*DelSuperGroupMsgResp, error)
// 清空某人所有消息
@@ -2145,8 +2231,8 @@ func (c *msgClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.Ca
return out, nil
}
func (c *msgClient) DelMsgList(ctx context.Context, in *sdkws.DelMsgListReq, opts ...grpc.CallOption) (*sdkws.DelMsgListResp, error) {
out := new(sdkws.DelMsgListResp)
func (c *msgClient) DelMsgList(ctx context.Context, in *DelMsgListReq, opts ...grpc.CallOption) (*DelMsgListResp, error) {
out := new(DelMsgListResp)
err := grpc.Invoke(ctx, "/msg.msg/DelMsgList", in, out, c.cc, opts...)
if err != nil {
return nil, err
@@ -2236,7 +2322,7 @@ type MsgServer interface {
// 发送消息
SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error)
// 删除某人消息
DelMsgList(context.Context, *sdkws.DelMsgListReq) (*sdkws.DelMsgListResp, error)
DelMsgList(context.Context, *DelMsgListReq) (*DelMsgListResp, error)
// 删除某个用户某个大群消息
DelSuperGroupMsg(context.Context, *DelSuperGroupMsgReq) (*DelSuperGroupMsgResp, error)
// 清空某人所有消息
@@ -2311,7 +2397,7 @@ func _Msg_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interfa
}
func _Msg_DelMsgList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(sdkws.DelMsgListReq)
in := new(DelMsgListReq)
if err := dec(in); err != nil {
return nil, err
}
@@ -2323,7 +2409,7 @@ func _Msg_DelMsgList_Handler(srv interface{}, ctx context.Context, dec func(inte
FullMethod: "/msg.msg/DelMsgList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).DelMsgList(ctx, req.(*sdkws.DelMsgListReq))
return srv.(MsgServer).DelMsgList(ctx, req.(*DelMsgListReq))
}
return interceptor(ctx, in, info, handler)
}
@@ -2529,107 +2615,109 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
Metadata: "msg/msg.proto",
}
func init() { proto.RegisterFile("msg/msg.proto", fileDescriptor_msg_9bd9d9abca588885) }
func init() { proto.RegisterFile("msg/msg.proto", fileDescriptor_msg_6d33b8473e6e0931) }
var fileDescriptor_msg_9bd9d9abca588885 = []byte{
// 1569 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6e, 0xdb, 0x46,
0x10, 0x06, 0x49, 0x4b, 0xb6, 0x47, 0x76, 0xec, 0xac, 0x1d, 0x43, 0x61, 0x8d, 0x46, 0x65, 0x92,
0x5a, 0x41, 0x62, 0x19, 0x70, 0x8b, 0xfe, 0xa5, 0x40, 0x1b, 0x47, 0xae, 0x62, 0xa4, 0x6c, 0x12,
0xca, 0x6d, 0x90, 0xe6, 0x90, 0x32, 0xd6, 0x9a, 0x21, 0xcc, 0x3f, 0x73, 0xa9, 0x58, 0x02, 0x7a,
0xe9, 0xa1, 0xbd, 0xf5, 0x35, 0x7a, 0xeb, 0x43, 0xe4, 0x09, 0xfa, 0x20, 0x3d, 0x15, 0xe8, 0xb9,
0x2d, 0x76, 0xb9, 0xa2, 0xf8, 0x2b, 0xd1, 0x0a, 0x02, 0xe4, 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0x00,
var fileDescriptor_msg_6d33b8473e6e0931 = []byte{
// 1604 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcb, 0x6e, 0xdb, 0x46,
0x17, 0x06, 0x49, 0x4b, 0xb6, 0x8f, 0x7c, 0xcb, 0xd8, 0xbf, 0xa1, 0xf0, 0x37, 0x1a, 0x95, 0x49,
0x6a, 0x05, 0x89, 0x65, 0xc0, 0xbd, 0xa2, 0x29, 0xd0, 0xc6, 0x91, 0xab, 0x18, 0x29, 0x9b, 0x84,
0x72, 0x1b, 0xa4, 0x59, 0xa4, 0x8c, 0x35, 0x66, 0x08, 0x8b, 0x17, 0x73, 0xa8, 0xd8, 0x02, 0xba,
0xe9, 0xa2, 0xdd, 0xf5, 0x1d, 0xba, 0xea, 0xae, 0x0f, 0x91, 0x27, 0xe8, 0x83, 0x74, 0xd3, 0x3e,
0x41, 0x8b, 0x99, 0xa1, 0xe8, 0xe1, 0x4d, 0xa2, 0x15, 0x04, 0xc8, 0xa2, 0x3b, 0x9f, 0x99, 0x33,
0xe7, 0xf2, 0x9d, 0x6f, 0x8e, 0x86, 0xc7, 0xb0, 0xe8, 0x10, 0x6b, 0xdb, 0x21, 0x56, 0xcb, 0x0f,
0xbc, 0xd0, 0x43, 0x8a, 0x43, 0x2c, 0x75, 0xf3, 0x81, 0x8f, 0xdd, 0xad, 0x7d, 0x7d, 0xab, 0x8b,
0x83, 0x97, 0x38, 0xd8, 0xf6, 0x8f, 0xad, 0x6d, 0xb6, 0xbd, 0x4d, 0x7a, 0xc7, 0xa7, 0x64, 0xfb,
0x94, 0x70, 0x6d, 0x75, 0x6b, 0x92, 0x62, 0x60, 0xfa, 0x3e, 0x0e, 0x22, 0x75, 0xcd, 0x83, 0x9a,
0x4e, 0xac, 0xb6, 0x19, 0x9a, 0x07, 0x9e, 0xfe, 0x08, 0xad, 0x41, 0x25, 0xf4, 0x8e, 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,
0x70, 0xcf, 0xe9, 0xd1, 0x5c, 0xe4, 0x39, 0x67, 0xc0, 0x17, 0x79, 0xce, 0x9b, 0xe5, 0x51, 0x43,
0x9d, 0x7c, 0x43, 0x9d, 0x42, 0x43, 0xb9, 0x33, 0xbc, 0x63, 0xd8, 0x18, 0xf7, 0xdd, 0x81, 0xae,
0x95, 0xf9, 0xb6, 0x54, 0xaf, 0x97, 0xd0, 0x22, 0x3e, 0x3a, 0x85, 0xc6, 0xa4, 0x37, 0x25, 0x6a,
0x96, 0x7d, 0x57, 0xab, 0x37, 0x4a, 0x6a, 0x12, 0x1f, 0x9d, 0xc0, 0xc6, 0x9d, 0x5e, 0xaf, 0x38,
0xcb, 0xcd, 0x92, 0x63, 0x1c, 0xb5, 0x59, 0x4e, 0x91, 0xf8, 0xe8, 0x07, 0xb8, 0x92, 0xf8, 0x4d,
0xcc, 0xf1, 0x7a, 0x73, 0xc4, 0xac, 0x12, 0xaf, 0x15, 0xf5, 0x56, 0x79, 0x65, 0xe2, 0xef, 0xfe,
0xff, 0xbb, 0xcb, 0x0f, 0x7c, 0xec, 0x3e, 0xdb, 0xd7, 0x85, 0xff, 0x36, 0x39, 0xc4, 0xba, 0xed,
0x10, 0xeb, 0x79, 0x95, 0x89, 0xef, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x24, 0xb5, 0xd1, 0x36,
0xd5, 0x1a, 0x00, 0x00,
}
+1
View File
@@ -158,6 +158,7 @@ message GetMessageListReactionExtensionsReq {
int64 msgFirstModifyTime = 2;
}
repeated MessageReactionKey messageReactionKeyList = 5;
repeated string TypeKeyList = 6;
}
message GetMessageListReactionExtensionsResp{
int32 errCode = 1;
+70 -70
View File
@@ -37,7 +37,7 @@ func (m *OnlinePushMsgReq) Reset() { *m = OnlinePushMsgReq{} }
func (m *OnlinePushMsgReq) String() string { return proto.CompactTextString(m) }
func (*OnlinePushMsgReq) ProtoMessage() {}
func (*OnlinePushMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{0}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{0}
}
func (m *OnlinePushMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OnlinePushMsgReq.Unmarshal(m, b)
@@ -89,7 +89,7 @@ func (m *OnlinePushMsgResp) Reset() { *m = OnlinePushMsgResp{} }
func (m *OnlinePushMsgResp) String() string { return proto.CompactTextString(m) }
func (*OnlinePushMsgResp) ProtoMessage() {}
func (*OnlinePushMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{1}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{1}
}
func (m *OnlinePushMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OnlinePushMsgResp.Unmarshal(m, b)
@@ -129,7 +129,7 @@ func (m *SingelMsgToUserResultList) Reset() { *m = SingelMsgToUserResult
func (m *SingelMsgToUserResultList) String() string { return proto.CompactTextString(m) }
func (*SingelMsgToUserResultList) ProtoMessage() {}
func (*SingelMsgToUserResultList) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{2}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{2}
}
func (m *SingelMsgToUserResultList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SingelMsgToUserResultList.Unmarshal(m, b)
@@ -183,7 +183,7 @@ func (m *OnlineBatchPushOneMsgReq) Reset() { *m = OnlineBatchPushOneMsgR
func (m *OnlineBatchPushOneMsgReq) String() string { return proto.CompactTextString(m) }
func (*OnlineBatchPushOneMsgReq) ProtoMessage() {}
func (*OnlineBatchPushOneMsgReq) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{3}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{3}
}
func (m *OnlineBatchPushOneMsgReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OnlineBatchPushOneMsgReq.Unmarshal(m, b)
@@ -235,7 +235,7 @@ func (m *OnlineBatchPushOneMsgResp) Reset() { *m = OnlineBatchPushOneMsg
func (m *OnlineBatchPushOneMsgResp) String() string { return proto.CompactTextString(m) }
func (*OnlineBatchPushOneMsgResp) ProtoMessage() {}
func (*OnlineBatchPushOneMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{4}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{4}
}
func (m *OnlineBatchPushOneMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OnlineBatchPushOneMsgResp.Unmarshal(m, b)
@@ -275,7 +275,7 @@ func (m *SingleMsgToUserPlatform) Reset() { *m = SingleMsgToUserPlatform
func (m *SingleMsgToUserPlatform) String() string { return proto.CompactTextString(m) }
func (*SingleMsgToUserPlatform) ProtoMessage() {}
func (*SingleMsgToUserPlatform) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{5}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{5}
}
func (m *SingleMsgToUserPlatform) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SingleMsgToUserPlatform.Unmarshal(m, b)
@@ -329,7 +329,7 @@ func (m *GetUsersOnlineStatusReq) Reset() { *m = GetUsersOnlineStatusReq
func (m *GetUsersOnlineStatusReq) String() string { return proto.CompactTextString(m) }
func (*GetUsersOnlineStatusReq) ProtoMessage() {}
func (*GetUsersOnlineStatusReq) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{6}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{6}
}
func (m *GetUsersOnlineStatusReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersOnlineStatusReq.Unmarshal(m, b)
@@ -384,7 +384,7 @@ func (m *GetUsersOnlineStatusResp) Reset() { *m = GetUsersOnlineStatusRe
func (m *GetUsersOnlineStatusResp) String() string { return proto.CompactTextString(m) }
func (*GetUsersOnlineStatusResp) ProtoMessage() {}
func (*GetUsersOnlineStatusResp) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{7}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{7}
}
func (m *GetUsersOnlineStatusResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersOnlineStatusResp.Unmarshal(m, b)
@@ -448,7 +448,7 @@ func (m *GetUsersOnlineStatusResp_SuccessDetail) Reset() {
func (m *GetUsersOnlineStatusResp_SuccessDetail) String() string { return proto.CompactTextString(m) }
func (*GetUsersOnlineStatusResp_SuccessDetail) ProtoMessage() {}
func (*GetUsersOnlineStatusResp_SuccessDetail) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{7, 0}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{7, 0}
}
func (m *GetUsersOnlineStatusResp_SuccessDetail) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersOnlineStatusResp_SuccessDetail.Unmarshal(m, b)
@@ -509,7 +509,7 @@ func (m *GetUsersOnlineStatusResp_FailedDetail) Reset() { *m = GetUsersO
func (m *GetUsersOnlineStatusResp_FailedDetail) String() string { return proto.CompactTextString(m) }
func (*GetUsersOnlineStatusResp_FailedDetail) ProtoMessage() {}
func (*GetUsersOnlineStatusResp_FailedDetail) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{7, 1}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{7, 1}
}
func (m *GetUsersOnlineStatusResp_FailedDetail) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersOnlineStatusResp_FailedDetail.Unmarshal(m, b)
@@ -565,7 +565,7 @@ func (m *GetUsersOnlineStatusResp_SuccessResult) Reset() {
func (m *GetUsersOnlineStatusResp_SuccessResult) String() string { return proto.CompactTextString(m) }
func (*GetUsersOnlineStatusResp_SuccessResult) ProtoMessage() {}
func (*GetUsersOnlineStatusResp_SuccessResult) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{7, 2}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{7, 2}
}
func (m *GetUsersOnlineStatusResp_SuccessResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersOnlineStatusResp_SuccessResult.Unmarshal(m, b)
@@ -619,7 +619,7 @@ func (m *KickUserOfflineReq) Reset() { *m = KickUserOfflineReq{} }
func (m *KickUserOfflineReq) String() string { return proto.CompactTextString(m) }
func (*KickUserOfflineReq) ProtoMessage() {}
func (*KickUserOfflineReq) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{8}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{8}
}
func (m *KickUserOfflineReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KickUserOfflineReq.Unmarshal(m, b)
@@ -670,7 +670,7 @@ func (m *KickUserOfflineResp) Reset() { *m = KickUserOfflineResp{} }
func (m *KickUserOfflineResp) String() string { return proto.CompactTextString(m) }
func (*KickUserOfflineResp) ProtoMessage() {}
func (*KickUserOfflineResp) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{9}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{9}
}
func (m *KickUserOfflineResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KickUserOfflineResp.Unmarshal(m, b)
@@ -704,7 +704,7 @@ func (m *MultiTerminalLoginCheckReq) Reset() { *m = MultiTerminalLoginCh
func (m *MultiTerminalLoginCheckReq) String() string { return proto.CompactTextString(m) }
func (*MultiTerminalLoginCheckReq) ProtoMessage() {}
func (*MultiTerminalLoginCheckReq) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{10}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{10}
}
func (m *MultiTerminalLoginCheckReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MultiTerminalLoginCheckReq.Unmarshal(m, b)
@@ -764,7 +764,7 @@ func (m *MultiTerminalLoginCheckResp) Reset() { *m = MultiTerminalLoginC
func (m *MultiTerminalLoginCheckResp) String() string { return proto.CompactTextString(m) }
func (*MultiTerminalLoginCheckResp) ProtoMessage() {}
func (*MultiTerminalLoginCheckResp) Descriptor() ([]byte, []int) {
return fileDescriptor_relay_fe7346d2191b0ff8, []int{11}
return fileDescriptor_relay_7fdb1a3cb7bcd264, []int{11}
}
func (m *MultiTerminalLoginCheckResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MultiTerminalLoginCheckResp.Unmarshal(m, b)
@@ -1053,61 +1053,61 @@ var _Relay_serviceDesc = grpc.ServiceDesc{
Metadata: "relay/relay.proto",
}
func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_fe7346d2191b0ff8) }
func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_7fdb1a3cb7bcd264) }
var fileDescriptor_relay_fe7346d2191b0ff8 = []byte{
// 844 bytes of a gzipped FileDescriptorProto
var fileDescriptor_relay_7fdb1a3cb7bcd264 = []byte{
// 834 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0xe3, 0x44,
0x14, 0x97, 0x37, 0xc9, 0xee, 0xf6, 0xb5, 0x85, 0xee, 0xd0, 0x25, 0xae, 0x91, 0x92, 0xac, 0x0f,
0x28, 0x42, 0x34, 0x91, 0x02, 0x37, 0x6e, 0xd9, 0x68, 0x4b, 0x44, 0xa3, 0x54, 0x93, 0x45, 0xa0,
0xbd, 0x04, 0xd7, 0x99, 0x38, 0x56, 0x1c, 0xcf, 0x74, 0xc6, 0x6e, 0xd5, 0x0b, 0x1c, 0xb9, 0x20,
0x0e, 0x7c, 0x00, 0x0e, 0x7c, 0x45, 0xbe, 0x00, 0x9a, 0x3f, 0x31, 0x76, 0x12, 0x37, 0x14, 0xa9,
0x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, 0x81, 0x89, 0x48, 0xa3, 0xe4, 0x32,
0x14, 0x09, 0xfa, 0x14, 0x9e, 0xa7, 0xba, 0x09, 0xcd, 0xce, 0x58, 0x59, 0xa5, 0x67, 0xff, 0xbd,
0x12, 0x6a, 0x00, 0xd0, 0xac, 0x65, 0x45, 0xea, 0x25, 0xce, 0x21, 0xee, 0x9f, 0x16, 0xd8, 0x9a,
0x53, 0xdf, 0x4b, 0xfc, 0x85, 0xc4, 0xc6, 0x31, 0x79, 0x62, 0xad, 0xbf, 0x80, 0x93, 0xbc, 0xae,
0x92, 0xb4, 0x5d, 0x69, 0x55, 0xda, 0x07, 0x78, 0x0b, 0x77, 0x43, 0x38, 0x2b, 0xe9, 0x4f, 0x30,
0x74, 0x09, 0x27, 0x42, 0xd1, 0x97, 0xb8, 0x56, 0xd0, 0xcc, 0xa1, 0x95, 0x53, 0x67, 0xa7, 0xca,
0x78, 0x2b, 0xd2, 0xbd, 0x87, 0x7a, 0x89, 0x98, 0x52, 0x46, 0xed, 0xf4, 0x96, 0xce, 0x88, 0x12,
0xa2, 0x82, 0x73, 0x88, 0x1c, 0x19, 0x26, 0xfe, 0xed, 0x70, 0xa0, 0x64, 0x38, 0xc0, 0xc6, 0x42,
0x9f, 0xc3, 0x47, 0xf2, 0x97, 0xcc, 0xf3, 0x8e, 0xf2, 0x95, 0xd9, 0xab, 0x1a, 0xde, 0x40, 0xdd,
0x3b, 0xa8, 0x5f, 0x90, 0x44, 0x96, 0x14, 0x9a, 0xed, 0x24, 0xf1, 0x92, 0x54, 0xc8, 0x21, 0x34,
0x00, 0xd2, 0x7f, 0x65, 0xb2, 0x94, 0x4c, 0x39, 0x44, 0x0e, 0x89, 0xe6, 0x86, 0xa4, 0xeb, 0xe7,
0x21, 0xe4, 0xc0, 0x4b, 0xca, 0x0a, 0x6b, 0x9d, 0xd9, 0xee, 0xdf, 0x55, 0xb0, 0x77, 0x57, 0x16,
0x0c, 0xd9, 0xf0, 0x82, 0x70, 0x9e, 0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 0xf9, 0xa8, 0x59, 0xa8, 0x65, 0xf3, 0x91, 0x72, 0x5a, 0x8f, 0x3b, 0x08, 0x86, 0xa6,
0xd0, 0x9c, 0xa4, 0x8c, 0xf0, 0x33, 0x4e, 0x53, 0xf6, 0x6c, 0x59, 0xbe, 0x83, 0x4f, 0xd6, 0xe6,
0x0b, 0x9d, 0x98, 0x4d, 0x9b, 0x73, 0xef, 0x38, 0x65, 0x4b, 0x82, 0xa1, 0x5f, 0xa0, 0x5e, 0x32,
0x03, 0xe8, 0xbd, 0xd9, 0x56, 0x3e, 0xb1, 0x8e, 0xbb, 0xcb, 0x45, 0xb0, 0xfe, 0xfb, 0xab, 0xa6,
0xfc, 0xf0, 0xfa, 0x79, 0x38, 0xca, 0x7d, 0x71, 0xa9, 0x6d, 0xdf, 0xb2, 0x6b, 0x2c, 0xff, 0x5f,
0xbf, 0x54, 0xe0, 0x37, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x59, 0x61, 0x49, 0x43, 0xbc, 0x09,
0x00, 0x00,
}
+1
View File
@@ -10,4 +10,5 @@ all_proto=(
relay/relay.proto
sdkws/ws.proto
conversation/conversation.proto
file/file.proto
)
+369
View File
@@ -0,0 +1,369 @@
syntax = "proto3";
import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
import "Open-IM-Server/pkg/proto/sdkws/wrappers.proto";
option go_package = "Open_IM/pkg/proto/group;group";
package group;
message CreateGroupReq{
repeated string initMembers = 1;
sdkws.GroupInfo groupInfo = 2;
repeated string adminUserIDs = 3;
string ownerUserID = 4; //owner
}
message CreateGroupResp{
sdkws.GroupInfo groupInfo = 1;
}
message GetGroupsInfoReq{
repeated string groupIDs = 1;
}
message GetGroupsInfoResp{
repeated sdkws.GroupInfo groupInfos = 1;
}
message SetGroupInfoReq{
sdkws.GroupInfoForSet groupInfoForSet = 1;
}
message SetGroupInfoResp{
}
message GetGroupApplicationListReq {
sdkws.RequestPagination pagination = 1;
string fromUserID = 2; //owner or admin
}
message GetGroupApplicationListResp {
uint32 total = 1;
repeated sdkws.GroupRequest groupRequests = 2;
}
message GetUserReqApplicationListReq{
sdkws.RequestPagination pagination = 1;
string userID = 2;
}
message GetUserReqApplicationListResp{
uint32 total = 1;
repeated sdkws.GroupRequest groupRequests = 2;
}
message TransferGroupOwnerReq {
string groupID = 1;
string oldOwnerUserID = 2;
string newOwnerUserID = 3;
}
message TransferGroupOwnerResp{
}
message JoinGroupReq{
string groupID = 1;
string reqMessage = 2;
int32 joinSource = 3;
string inviterUserID = 4;
}
message JoinGroupResp{
}
message GroupApplicationResponseReq{
string groupID = 1;
string fromUserID = 2; //
string handledMsg = 3;
int32 handleResult = 4;
}
message GroupApplicationResponseResp{
}
message QuitGroupReq{
string groupID = 1;
}
message QuitGroupResp{
}
message GetGroupMemberListReq {
sdkws.RequestPagination pagination = 1;
string groupID = 2;
int32 filter = 3;
}
message GetGroupMemberListResp {
uint32 total = 1;
repeated sdkws.GroupMemberFullInfo members = 2;
}
message GetGroupMembersInfoReq {
string groupID = 1;
repeated string members = 2;
}
message GetGroupMembersInfoResp {
repeated sdkws.GroupMemberFullInfo members = 1;
}
message KickGroupMemberReq {
string groupID = 1;
repeated string kickedUserIDs = 2;
string reason = 3;
}
message KickGroupMemberResp {
}
message GetJoinedGroupListReq {
sdkws.RequestPagination pagination = 1;
string fromUserID = 2;
}
message GetJoinedGroupListResp{
uint32 total = 1;
repeated sdkws.GroupInfo groups = 2;
}
message InviteUserToGroupReq {
string groupID = 1;
string reason = 2;
repeated string invitedUserIDs = 3;
}
message InviteUserToGroupResp {
}
message GetGroupAllMemberReq {
sdkws.RequestPagination pagination = 1;
string groupID = 2;
}
message GetGroupAllMemberResp {
repeated sdkws.GroupMemberFullInfo members = 1;
}
message CMSGroup {
sdkws.GroupInfo groupInfo = 1;
string groupOwnerUserName = 2;
string groupOwnerUserID = 3;
}
message GetGroupsReq {
sdkws.RequestPagination pagination = 1;
string groupName = 2;
string groupID = 3;
}
message GetGroupsResp {
uint32 total = 1;
repeated CMSGroup groups = 2;
}
message GetGroupMemberReq {
string groupID = 1;
}
message GetGroupMembersCMSReq {
sdkws.RequestPagination pagination = 1;
string groupID = 2;
string userName = 3;
}
message GetGroupMembersCMSResp {
uint32 total = 1;
repeated sdkws.GroupMemberFullInfo members = 2;
}
message DismissGroupReq{
string groupID = 1;
}
message DismissGroupResp{
}
message MuteGroupMemberReq{
string groupID = 1;
string userID = 2;
uint32 mutedSeconds = 3;
}
message MuteGroupMemberResp{
}
message CancelMuteGroupMemberReq{
string groupID = 1;
string userID = 2;
}
message CancelMuteGroupMemberResp{
}
message MuteGroupReq{
string groupID = 1;
}
message MuteGroupResp{
}
message CancelMuteGroupReq{
string groupID = 1;
}
message CancelMuteGroupResp{
}
message GetJoinedSuperGroupListReq {
string userID = 1;
}
message GetJoinedSuperGroupListResp {
repeated sdkws.GroupInfo groups = 1;
}
message GetSuperGroupsInfoReq {
repeated string groupIDs = 1;
}
message GetSuperGroupsInfoResp {
repeated sdkws.GroupInfo groupInfos = 1;
}
message SetGroupMemberInfo{
string groupID = 1;
string userID = 2;
google.protobuf.StringValue nickname = 3;
google.protobuf.StringValue faceURL = 4;
google.protobuf.Int32Value roleLevel = 5;
google.protobuf.StringValue ex = 6;
}
message SetGroupMemberInfoReq{
repeated SetGroupMemberInfo members = 1;
}
message SetGroupMemberInfoResp{
}
message GetGroupAbstractInfoReq{
repeated string groupIDs = 1;
}
message GroupAbstractInfo{
string groupID = 1;
uint32 groupMemberNumber = 2;
uint64 groupMemberListHash = 3;
}
message GetGroupAbstractInfoResp{
repeated GroupAbstractInfo groupAbstractInfos = 1;
}
message GetUserInGroupMembersReq {
string userID = 1;
repeated string groupIDs = 2;
}
message GetUserInGroupMembersResp{
repeated sdkws.GroupMemberFullInfo members = 1;
}
message GetGroupMemberUserIDReq{
string groupID = 1;
}
message GetGroupMemberUserIDResp{
repeated string userIDs = 1;
}
message GetGroupMemberRoleLevelReq{
string groupID = 1;
repeated string roleLevel = 2;
}
message GetGroupMemberRoleLevelResp {
repeated sdkws.GroupMemberFullInfo members = 1;
}
service group{
//
rpc createGroup(CreateGroupReq) returns(CreateGroupResp);
//
rpc joinGroup(JoinGroupReq) returns(JoinGroupResp);
//退
rpc quitGroup(QuitGroupReq) returns(QuitGroupResp);
//
rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp);
//
rpc setGroupInfo(SetGroupInfoReq) returns(SetGroupInfoResp);
//
rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp);
//
rpc getUserReqApplicationList(GetUserReqApplicationListReq) returns(GetUserReqApplicationListResp);
//
rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp);
//
rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp);
//
rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp);
//
rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp);
//
rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp);
//
rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp);
//
rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp);
rpc getGroups(GetGroupsReq) returns(GetGroupsResp);
rpc getGroupMembersCMS(GetGroupMembersCMSReq) returns(GetGroupMembersCMSResp);
//
rpc dismissGroup(DismissGroupReq) returns(DismissGroupResp);
//
rpc muteGroupMember(MuteGroupMemberReq) returns(MuteGroupMemberResp);
//
rpc cancelMuteGroupMember(CancelMuteGroupMemberReq) returns(CancelMuteGroupMemberResp);
//
rpc muteGroup(MuteGroupReq) returns(MuteGroupResp);
//
rpc cancelMuteGroup(CancelMuteGroupReq) returns(CancelMuteGroupResp);
//
rpc getJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp);
//
rpc getSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp);
//
//
rpc setGroupMemberInfo(SetGroupMemberInfoReq) returns (SetGroupMemberInfoResp);
//hash值
rpc getGroupAbstractInfo(GetGroupAbstractInfoReq) returns (GetGroupAbstractInfoResp);
//
rpc getUserInGroupMembers(GetUserInGroupMembersReq) returns (GetUserInGroupMembersResp);
//ID
rpc getGroupMemberUserID(GetGroupMemberUserIDReq) returns (GetGroupMemberUserIDResp);
//
rpc GetGroupMemberRoleLevel(GetGroupMemberRoleLevelReq)returns (GetGroupMemberRoleLevelResp);
}
+80 -80
View File
@@ -46,7 +46,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} }
func (m *GroupInfo) String() string { return proto.CompactTextString(m) }
func (*GroupInfo) ProtoMessage() {}
func (*GroupInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{0}
return fileDescriptor_ws_32de46e041571b6e, []int{0}
}
func (m *GroupInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupInfo.Unmarshal(m, b)
@@ -204,7 +204,7 @@ func (m *GroupInfoForSet) Reset() { *m = GroupInfoForSet{} }
func (m *GroupInfoForSet) String() string { return proto.CompactTextString(m) }
func (*GroupInfoForSet) ProtoMessage() {}
func (*GroupInfoForSet) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{1}
return fileDescriptor_ws_32de46e041571b6e, []int{1}
}
func (m *GroupInfoForSet) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupInfoForSet.Unmarshal(m, b)
@@ -309,7 +309,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} }
func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) }
func (*GroupMemberFullInfo) ProtoMessage() {}
func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{2}
return fileDescriptor_ws_32de46e041571b6e, []int{2}
}
func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b)
@@ -428,7 +428,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} }
func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) }
func (*PublicUserInfo) ProtoMessage() {}
func (*PublicUserInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{3}
return fileDescriptor_ws_32de46e041571b6e, []int{3}
}
func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b)
@@ -505,7 +505,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} }
func (m *UserInfo) String() string { return proto.CompactTextString(m) }
func (*UserInfo) ProtoMessage() {}
func (*UserInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{4}
return fileDescriptor_ws_32de46e041571b6e, []int{4}
}
func (m *UserInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserInfo.Unmarshal(m, b)
@@ -626,7 +626,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} }
func (m *FriendInfo) String() string { return proto.CompactTextString(m) }
func (*FriendInfo) ProtoMessage() {}
func (*FriendInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{5}
return fileDescriptor_ws_32de46e041571b6e, []int{5}
}
func (m *FriendInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendInfo.Unmarshal(m, b)
@@ -711,7 +711,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} }
func (m *BlackInfo) String() string { return proto.CompactTextString(m) }
func (*BlackInfo) ProtoMessage() {}
func (*BlackInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{6}
return fileDescriptor_ws_32de46e041571b6e, []int{6}
}
func (m *BlackInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlackInfo.Unmarshal(m, b)
@@ -794,7 +794,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} }
func (m *GroupRequest) String() string { return proto.CompactTextString(m) }
func (*GroupRequest) ProtoMessage() {}
func (*GroupRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{7}
return fileDescriptor_ws_32de46e041571b6e, []int{7}
}
func (m *GroupRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupRequest.Unmarshal(m, b)
@@ -916,7 +916,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} }
func (m *FriendRequest) String() string { return proto.CompactTextString(m) }
func (*FriendRequest) ProtoMessage() {}
func (*FriendRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{8}
return fileDescriptor_ws_32de46e041571b6e, []int{8}
}
func (m *FriendRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendRequest.Unmarshal(m, b)
@@ -1055,7 +1055,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq
func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) }
func (*PullMessageBySeqListReq) ProtoMessage() {}
func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{9}
return fileDescriptor_ws_32de46e041571b6e, []int{9}
}
func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b)
@@ -1107,7 +1107,7 @@ func (m *SeqList) Reset() { *m = SeqList{} }
func (m *SeqList) String() string { return proto.CompactTextString(m) }
func (*SeqList) ProtoMessage() {}
func (*SeqList) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{10}
return fileDescriptor_ws_32de46e041571b6e, []int{10}
}
func (m *SeqList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SeqList.Unmarshal(m, b)
@@ -1145,7 +1145,7 @@ func (m *MsgDataList) Reset() { *m = MsgDataList{} }
func (m *MsgDataList) String() string { return proto.CompactTextString(m) }
func (*MsgDataList) ProtoMessage() {}
func (*MsgDataList) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{11}
return fileDescriptor_ws_32de46e041571b6e, []int{11}
}
func (m *MsgDataList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgDataList.Unmarshal(m, b)
@@ -1186,7 +1186,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe
func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) }
func (*PullMessageBySeqListResp) ProtoMessage() {}
func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{12}
return fileDescriptor_ws_32de46e041571b6e, []int{12}
}
func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b)
@@ -1246,7 +1246,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} }
func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqReq) ProtoMessage() {}
func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{13}
return fileDescriptor_ws_32de46e041571b6e, []int{13}
}
func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b)
@@ -1292,7 +1292,7 @@ func (m *MaxAndMinSeq) Reset() { *m = MaxAndMinSeq{} }
func (m *MaxAndMinSeq) String() string { return proto.CompactTextString(m) }
func (*MaxAndMinSeq) ProtoMessage() {}
func (*MaxAndMinSeq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{14}
return fileDescriptor_ws_32de46e041571b6e, []int{14}
}
func (m *MaxAndMinSeq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MaxAndMinSeq.Unmarshal(m, b)
@@ -1339,7 +1339,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} }
func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqResp) ProtoMessage() {}
func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{15}
return fileDescriptor_ws_32de46e041571b6e, []int{15}
}
func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b)
@@ -1393,7 +1393,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} }
func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) }
func (*UserSendMsgResp) ProtoMessage() {}
func (*UserSendMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{16}
return fileDescriptor_ws_32de46e041571b6e, []int{16}
}
func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b)
@@ -1466,7 +1466,7 @@ func (m *MsgData) Reset() { *m = MsgData{} }
func (m *MsgData) String() string { return proto.CompactTextString(m) }
func (*MsgData) ProtoMessage() {}
func (*MsgData) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{17}
return fileDescriptor_ws_32de46e041571b6e, []int{17}
}
func (m *MsgData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgData.Unmarshal(m, b)
@@ -1655,7 +1655,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} }
func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) }
func (*OfflinePushInfo) ProtoMessage() {}
func (*OfflinePushInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{18}
return fileDescriptor_ws_32de46e041571b6e, []int{18}
}
func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b)
@@ -1723,7 +1723,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} }
func (m *TipsComm) String() string { return proto.CompactTextString(m) }
func (*TipsComm) ProtoMessage() {}
func (*TipsComm) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{19}
return fileDescriptor_ws_32de46e041571b6e, []int{19}
}
func (m *TipsComm) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TipsComm.Unmarshal(m, b)
@@ -1780,7 +1780,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} }
func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) }
func (*GroupCreatedTips) ProtoMessage() {}
func (*GroupCreatedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{20}
return fileDescriptor_ws_32de46e041571b6e, []int{20}
}
func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b)
@@ -1849,7 +1849,7 @@ func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} }
func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) }
func (*GroupInfoSetTips) ProtoMessage() {}
func (*GroupInfoSetTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{21}
return fileDescriptor_ws_32de46e041571b6e, []int{21}
}
func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b)
@@ -1904,7 +1904,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi
func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) }
func (*JoinGroupApplicationTips) ProtoMessage() {}
func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{22}
return fileDescriptor_ws_32de46e041571b6e, []int{22}
}
func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b)
@@ -1960,7 +1960,7 @@ func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} }
func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) }
func (*MemberQuitTips) ProtoMessage() {}
func (*MemberQuitTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{23}
return fileDescriptor_ws_32de46e041571b6e, []int{23}
}
func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b)
@@ -2016,7 +2016,7 @@ func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAc
func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationAcceptedTips) ProtoMessage() {}
func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{24}
return fileDescriptor_ws_32de46e041571b6e, []int{24}
}
func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b)
@@ -2079,7 +2079,7 @@ func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRe
func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationRejectedTips) ProtoMessage() {}
func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{25}
return fileDescriptor_ws_32de46e041571b6e, []int{25}
}
func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b)
@@ -2142,7 +2142,7 @@ func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferred
func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) }
func (*GroupOwnerTransferredTips) ProtoMessage() {}
func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{26}
return fileDescriptor_ws_32de46e041571b6e, []int{26}
}
func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b)
@@ -2205,7 +2205,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} }
func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) }
func (*MemberKickedTips) ProtoMessage() {}
func (*MemberKickedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{27}
return fileDescriptor_ws_32de46e041571b6e, []int{27}
}
func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b)
@@ -2268,7 +2268,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} }
func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) }
func (*MemberInvitedTips) ProtoMessage() {}
func (*MemberInvitedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{28}
return fileDescriptor_ws_32de46e041571b6e, []int{28}
}
func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b)
@@ -2330,7 +2330,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} }
func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) }
func (*MemberEnterTips) ProtoMessage() {}
func (*MemberEnterTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{29}
return fileDescriptor_ws_32de46e041571b6e, []int{29}
}
func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b)
@@ -2384,7 +2384,7 @@ func (m *GroupDismissedTips) Reset() { *m = GroupDismissedTips{} }
func (m *GroupDismissedTips) String() string { return proto.CompactTextString(m) }
func (*GroupDismissedTips) ProtoMessage() {}
func (*GroupDismissedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{30}
return fileDescriptor_ws_32de46e041571b6e, []int{30}
}
func (m *GroupDismissedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupDismissedTips.Unmarshal(m, b)
@@ -2440,7 +2440,7 @@ func (m *GroupMemberMutedTips) Reset() { *m = GroupMemberMutedTips{} }
func (m *GroupMemberMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupMemberMutedTips) ProtoMessage() {}
func (*GroupMemberMutedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{31}
return fileDescriptor_ws_32de46e041571b6e, []int{31}
}
func (m *GroupMemberMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberMutedTips.Unmarshal(m, b)
@@ -2509,7 +2509,7 @@ func (m *GroupMemberCancelMutedTips) Reset() { *m = GroupMemberCancelMut
func (m *GroupMemberCancelMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupMemberCancelMutedTips) ProtoMessage() {}
func (*GroupMemberCancelMutedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{32}
return fileDescriptor_ws_32de46e041571b6e, []int{32}
}
func (m *GroupMemberCancelMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberCancelMutedTips.Unmarshal(m, b)
@@ -2570,7 +2570,7 @@ func (m *GroupMutedTips) Reset() { *m = GroupMutedTips{} }
func (m *GroupMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupMutedTips) ProtoMessage() {}
func (*GroupMutedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{33}
return fileDescriptor_ws_32de46e041571b6e, []int{33}
}
func (m *GroupMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMutedTips.Unmarshal(m, b)
@@ -2624,7 +2624,7 @@ func (m *GroupCancelMutedTips) Reset() { *m = GroupCancelMutedTips{} }
func (m *GroupCancelMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupCancelMutedTips) ProtoMessage() {}
func (*GroupCancelMutedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{34}
return fileDescriptor_ws_32de46e041571b6e, []int{34}
}
func (m *GroupCancelMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupCancelMutedTips.Unmarshal(m, b)
@@ -2679,7 +2679,7 @@ func (m *GroupMemberInfoSetTips) Reset() { *m = GroupMemberInfoSetTips{}
func (m *GroupMemberInfoSetTips) String() string { return proto.CompactTextString(m) }
func (*GroupMemberInfoSetTips) ProtoMessage() {}
func (*GroupMemberInfoSetTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{35}
return fileDescriptor_ws_32de46e041571b6e, []int{35}
}
func (m *GroupMemberInfoSetTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberInfoSetTips.Unmarshal(m, b)
@@ -2740,7 +2740,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} }
func (m *FriendApplication) String() string { return proto.CompactTextString(m) }
func (*FriendApplication) ProtoMessage() {}
func (*FriendApplication) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{36}
return fileDescriptor_ws_32de46e041571b6e, []int{36}
}
func (m *FriendApplication) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplication.Unmarshal(m, b)
@@ -2793,7 +2793,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} }
func (m *FromToUserID) String() string { return proto.CompactTextString(m) }
func (*FromToUserID) ProtoMessage() {}
func (*FromToUserID) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{37}
return fileDescriptor_ws_32de46e041571b6e, []int{37}
}
func (m *FromToUserID) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FromToUserID.Unmarshal(m, b)
@@ -2839,7 +2839,7 @@ func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} }
func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) }
func (*FriendApplicationTips) ProtoMessage() {}
func (*FriendApplicationTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{38}
return fileDescriptor_ws_32de46e041571b6e, []int{38}
}
func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b)
@@ -2879,7 +2879,7 @@ func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplication
func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) }
func (*FriendApplicationApprovedTips) ProtoMessage() {}
func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{39}
return fileDescriptor_ws_32de46e041571b6e, []int{39}
}
func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b)
@@ -2926,7 +2926,7 @@ func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplication
func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) }
func (*FriendApplicationRejectedTips) ProtoMessage() {}
func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{40}
return fileDescriptor_ws_32de46e041571b6e, []int{40}
}
func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b)
@@ -2974,7 +2974,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} }
func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) }
func (*FriendAddedTips) ProtoMessage() {}
func (*FriendAddedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{41}
return fileDescriptor_ws_32de46e041571b6e, []int{41}
}
func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b)
@@ -3027,7 +3027,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} }
func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) }
func (*FriendDeletedTips) ProtoMessage() {}
func (*FriendDeletedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{42}
return fileDescriptor_ws_32de46e041571b6e, []int{42}
}
func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b)
@@ -3065,7 +3065,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} }
func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) }
func (*BlackAddedTips) ProtoMessage() {}
func (*BlackAddedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{43}
return fileDescriptor_ws_32de46e041571b6e, []int{43}
}
func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b)
@@ -3103,7 +3103,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} }
func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) }
func (*BlackDeletedTips) ProtoMessage() {}
func (*BlackDeletedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{44}
return fileDescriptor_ws_32de46e041571b6e, []int{44}
}
func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b)
@@ -3141,7 +3141,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} }
func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) }
func (*FriendInfoChangedTips) ProtoMessage() {}
func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{45}
return fileDescriptor_ws_32de46e041571b6e, []int{45}
}
func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b)
@@ -3180,7 +3180,7 @@ func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} }
func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) }
func (*UserInfoUpdatedTips) ProtoMessage() {}
func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{46}
return fileDescriptor_ws_32de46e041571b6e, []int{46}
}
func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b)
@@ -3221,7 +3221,7 @@ func (m *ConversationUpdateTips) Reset() { *m = ConversationUpdateTips{}
func (m *ConversationUpdateTips) String() string { return proto.CompactTextString(m) }
func (*ConversationUpdateTips) ProtoMessage() {}
func (*ConversationUpdateTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{47}
return fileDescriptor_ws_32de46e041571b6e, []int{47}
}
func (m *ConversationUpdateTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConversationUpdateTips.Unmarshal(m, b)
@@ -3275,7 +3275,7 @@ func (m *ConversationSetPrivateTips) Reset() { *m = ConversationSetPriva
func (m *ConversationSetPrivateTips) String() string { return proto.CompactTextString(m) }
func (*ConversationSetPrivateTips) ProtoMessage() {}
func (*ConversationSetPrivateTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{48}
return fileDescriptor_ws_32de46e041571b6e, []int{48}
}
func (m *ConversationSetPrivateTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConversationSetPrivateTips.Unmarshal(m, b)
@@ -3330,7 +3330,7 @@ func (m *DeleteMessageTips) Reset() { *m = DeleteMessageTips{} }
func (m *DeleteMessageTips) String() string { return proto.CompactTextString(m) }
func (*DeleteMessageTips) ProtoMessage() {}
func (*DeleteMessageTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{49}
return fileDescriptor_ws_32de46e041571b6e, []int{49}
}
func (m *DeleteMessageTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteMessageTips.Unmarshal(m, b)
@@ -3384,7 +3384,7 @@ func (m *RequestPagination) Reset() { *m = RequestPagination{} }
func (m *RequestPagination) String() string { return proto.CompactTextString(m) }
func (*RequestPagination) ProtoMessage() {}
func (*RequestPagination) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{50}
return fileDescriptor_ws_32de46e041571b6e, []int{50}
}
func (m *RequestPagination) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RequestPagination.Unmarshal(m, b)
@@ -3441,7 +3441,7 @@ func (m *SignalReq) Reset() { *m = SignalReq{} }
func (m *SignalReq) String() string { return proto.CompactTextString(m) }
func (*SignalReq) ProtoMessage() {}
func (*SignalReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{51}
return fileDescriptor_ws_32de46e041571b6e, []int{51}
}
func (m *SignalReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalReq.Unmarshal(m, b)
@@ -3830,7 +3830,7 @@ func (m *SignalResp) Reset() { *m = SignalResp{} }
func (m *SignalResp) String() string { return proto.CompactTextString(m) }
func (*SignalResp) ProtoMessage() {}
func (*SignalResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{52}
return fileDescriptor_ws_32de46e041571b6e, []int{52}
}
func (m *SignalResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalResp.Unmarshal(m, b)
@@ -4160,7 +4160,7 @@ func (m *InvitationInfo) Reset() { *m = InvitationInfo{} }
func (m *InvitationInfo) String() string { return proto.CompactTextString(m) }
func (*InvitationInfo) ProtoMessage() {}
func (*InvitationInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{53}
return fileDescriptor_ws_32de46e041571b6e, []int{53}
}
func (m *InvitationInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InvitationInfo.Unmarshal(m, b)
@@ -4270,7 +4270,7 @@ func (m *ParticipantMetaData) Reset() { *m = ParticipantMetaData{} }
func (m *ParticipantMetaData) String() string { return proto.CompactTextString(m) }
func (*ParticipantMetaData) ProtoMessage() {}
func (*ParticipantMetaData) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{54}
return fileDescriptor_ws_32de46e041571b6e, []int{54}
}
func (m *ParticipantMetaData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ParticipantMetaData.Unmarshal(m, b)
@@ -4325,7 +4325,7 @@ func (m *SignalInviteReq) Reset() { *m = SignalInviteReq{} }
func (m *SignalInviteReq) String() string { return proto.CompactTextString(m) }
func (*SignalInviteReq) ProtoMessage() {}
func (*SignalInviteReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{55}
return fileDescriptor_ws_32de46e041571b6e, []int{55}
}
func (m *SignalInviteReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteReq.Unmarshal(m, b)
@@ -4387,7 +4387,7 @@ func (m *SignalInviteReply) Reset() { *m = SignalInviteReply{} }
func (m *SignalInviteReply) String() string { return proto.CompactTextString(m) }
func (*SignalInviteReply) ProtoMessage() {}
func (*SignalInviteReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{56}
return fileDescriptor_ws_32de46e041571b6e, []int{56}
}
func (m *SignalInviteReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteReply.Unmarshal(m, b)
@@ -4449,7 +4449,7 @@ func (m *SignalInviteInGroupReq) Reset() { *m = SignalInviteInGroupReq{}
func (m *SignalInviteInGroupReq) String() string { return proto.CompactTextString(m) }
func (*SignalInviteInGroupReq) ProtoMessage() {}
func (*SignalInviteInGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{57}
return fileDescriptor_ws_32de46e041571b6e, []int{57}
}
func (m *SignalInviteInGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteInGroupReq.Unmarshal(m, b)
@@ -4511,7 +4511,7 @@ func (m *SignalInviteInGroupReply) Reset() { *m = SignalInviteInGroupRep
func (m *SignalInviteInGroupReply) String() string { return proto.CompactTextString(m) }
func (*SignalInviteInGroupReply) ProtoMessage() {}
func (*SignalInviteInGroupReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{58}
return fileDescriptor_ws_32de46e041571b6e, []int{58}
}
func (m *SignalInviteInGroupReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteInGroupReply.Unmarshal(m, b)
@@ -4573,7 +4573,7 @@ func (m *SignalCancelReq) Reset() { *m = SignalCancelReq{} }
func (m *SignalCancelReq) String() string { return proto.CompactTextString(m) }
func (*SignalCancelReq) ProtoMessage() {}
func (*SignalCancelReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{59}
return fileDescriptor_ws_32de46e041571b6e, []int{59}
}
func (m *SignalCancelReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalCancelReq.Unmarshal(m, b)
@@ -4631,7 +4631,7 @@ func (m *SignalCancelReply) Reset() { *m = SignalCancelReply{} }
func (m *SignalCancelReply) String() string { return proto.CompactTextString(m) }
func (*SignalCancelReply) ProtoMessage() {}
func (*SignalCancelReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{60}
return fileDescriptor_ws_32de46e041571b6e, []int{60}
}
func (m *SignalCancelReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalCancelReply.Unmarshal(m, b)
@@ -4666,7 +4666,7 @@ func (m *SignalAcceptReq) Reset() { *m = SignalAcceptReq{} }
func (m *SignalAcceptReq) String() string { return proto.CompactTextString(m) }
func (*SignalAcceptReq) ProtoMessage() {}
func (*SignalAcceptReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{61}
return fileDescriptor_ws_32de46e041571b6e, []int{61}
}
func (m *SignalAcceptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalAcceptReq.Unmarshal(m, b)
@@ -4734,7 +4734,7 @@ func (m *SignalAcceptReply) Reset() { *m = SignalAcceptReply{} }
func (m *SignalAcceptReply) String() string { return proto.CompactTextString(m) }
func (*SignalAcceptReply) ProtoMessage() {}
func (*SignalAcceptReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{62}
return fileDescriptor_ws_32de46e041571b6e, []int{62}
}
func (m *SignalAcceptReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalAcceptReply.Unmarshal(m, b)
@@ -4788,7 +4788,7 @@ func (m *SignalHungUpReq) Reset() { *m = SignalHungUpReq{} }
func (m *SignalHungUpReq) String() string { return proto.CompactTextString(m) }
func (*SignalHungUpReq) ProtoMessage() {}
func (*SignalHungUpReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{63}
return fileDescriptor_ws_32de46e041571b6e, []int{63}
}
func (m *SignalHungUpReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalHungUpReq.Unmarshal(m, b)
@@ -4839,7 +4839,7 @@ func (m *SignalHungUpReply) Reset() { *m = SignalHungUpReply{} }
func (m *SignalHungUpReply) String() string { return proto.CompactTextString(m) }
func (*SignalHungUpReply) ProtoMessage() {}
func (*SignalHungUpReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{64}
return fileDescriptor_ws_32de46e041571b6e, []int{64}
}
func (m *SignalHungUpReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalHungUpReply.Unmarshal(m, b)
@@ -4874,7 +4874,7 @@ func (m *SignalRejectReq) Reset() { *m = SignalRejectReq{} }
func (m *SignalRejectReq) String() string { return proto.CompactTextString(m) }
func (*SignalRejectReq) ProtoMessage() {}
func (*SignalRejectReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{65}
return fileDescriptor_ws_32de46e041571b6e, []int{65}
}
func (m *SignalRejectReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalRejectReq.Unmarshal(m, b)
@@ -4939,7 +4939,7 @@ func (m *SignalRejectReply) Reset() { *m = SignalRejectReply{} }
func (m *SignalRejectReply) String() string { return proto.CompactTextString(m) }
func (*SignalRejectReply) ProtoMessage() {}
func (*SignalRejectReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{66}
return fileDescriptor_ws_32de46e041571b6e, []int{66}
}
func (m *SignalRejectReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalRejectReply.Unmarshal(m, b)
@@ -4972,7 +4972,7 @@ func (m *SignalGetRoomByGroupIDReq) Reset() { *m = SignalGetRoomByGroupI
func (m *SignalGetRoomByGroupIDReq) String() string { return proto.CompactTextString(m) }
func (*SignalGetRoomByGroupIDReq) ProtoMessage() {}
func (*SignalGetRoomByGroupIDReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{67}
return fileDescriptor_ws_32de46e041571b6e, []int{67}
}
func (m *SignalGetRoomByGroupIDReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalGetRoomByGroupIDReq.Unmarshal(m, b)
@@ -5026,7 +5026,7 @@ func (m *SignalGetRoomByGroupIDReply) Reset() { *m = SignalGetRoomByGrou
func (m *SignalGetRoomByGroupIDReply) String() string { return proto.CompactTextString(m) }
func (*SignalGetRoomByGroupIDReply) ProtoMessage() {}
func (*SignalGetRoomByGroupIDReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{68}
return fileDescriptor_ws_32de46e041571b6e, []int{68}
}
func (m *SignalGetRoomByGroupIDReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalGetRoomByGroupIDReply.Unmarshal(m, b)
@@ -5080,7 +5080,7 @@ func (m *SignalOnRoomParticipantConnectedReq) Reset() { *m = SignalOnRoo
func (m *SignalOnRoomParticipantConnectedReq) String() string { return proto.CompactTextString(m) }
func (*SignalOnRoomParticipantConnectedReq) ProtoMessage() {}
func (*SignalOnRoomParticipantConnectedReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{69}
return fileDescriptor_ws_32de46e041571b6e, []int{69}
}
func (m *SignalOnRoomParticipantConnectedReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalOnRoomParticipantConnectedReq.Unmarshal(m, b)
@@ -5136,7 +5136,7 @@ func (m *SignalOnRoomParticipantDisconnectedReq) Reset() {
func (m *SignalOnRoomParticipantDisconnectedReq) String() string { return proto.CompactTextString(m) }
func (*SignalOnRoomParticipantDisconnectedReq) ProtoMessage() {}
func (*SignalOnRoomParticipantDisconnectedReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{70}
return fileDescriptor_ws_32de46e041571b6e, []int{70}
}
func (m *SignalOnRoomParticipantDisconnectedReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalOnRoomParticipantDisconnectedReq.Unmarshal(m, b)
@@ -5191,7 +5191,7 @@ func (m *SignalGetTokenByRoomIDReq) Reset() { *m = SignalGetTokenByRoomI
func (m *SignalGetTokenByRoomIDReq) String() string { return proto.CompactTextString(m) }
func (*SignalGetTokenByRoomIDReq) ProtoMessage() {}
func (*SignalGetTokenByRoomIDReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{71}
return fileDescriptor_ws_32de46e041571b6e, []int{71}
}
func (m *SignalGetTokenByRoomIDReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalGetTokenByRoomIDReq.Unmarshal(m, b)
@@ -5251,7 +5251,7 @@ func (m *SignalGetTokenByRoomIDReply) Reset() { *m = SignalGetTokenByRoo
func (m *SignalGetTokenByRoomIDReply) String() string { return proto.CompactTextString(m) }
func (*SignalGetTokenByRoomIDReply) ProtoMessage() {}
func (*SignalGetTokenByRoomIDReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{72}
return fileDescriptor_ws_32de46e041571b6e, []int{72}
}
func (m *SignalGetTokenByRoomIDReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalGetTokenByRoomIDReply.Unmarshal(m, b)
@@ -5297,7 +5297,7 @@ func (m *SetAppBackgroundStatusReq) Reset() { *m = SetAppBackgroundStatu
func (m *SetAppBackgroundStatusReq) String() string { return proto.CompactTextString(m) }
func (*SetAppBackgroundStatusReq) ProtoMessage() {}
func (*SetAppBackgroundStatusReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{73}
return fileDescriptor_ws_32de46e041571b6e, []int{73}
}
func (m *SetAppBackgroundStatusReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetAppBackgroundStatusReq.Unmarshal(m, b)
@@ -5343,7 +5343,7 @@ func (m *SetAppBackgroundStatusResp) Reset() { *m = SetAppBackgroundStat
func (m *SetAppBackgroundStatusResp) String() string { return proto.CompactTextString(m) }
func (*SetAppBackgroundStatusResp) ProtoMessage() {}
func (*SetAppBackgroundStatusResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{74}
return fileDescriptor_ws_32de46e041571b6e, []int{74}
}
func (m *SetAppBackgroundStatusResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetAppBackgroundStatusResp.Unmarshal(m, b)
@@ -5393,7 +5393,7 @@ func (m *ExtendMsgSet) Reset() { *m = ExtendMsgSet{} }
func (m *ExtendMsgSet) String() string { return proto.CompactTextString(m) }
func (*ExtendMsgSet) ProtoMessage() {}
func (*ExtendMsgSet) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{75}
return fileDescriptor_ws_32de46e041571b6e, []int{75}
}
func (m *ExtendMsgSet) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExtendMsgSet.Unmarshal(m, b)
@@ -5470,7 +5470,7 @@ func (m *ExtendMsg) Reset() { *m = ExtendMsg{} }
func (m *ExtendMsg) String() string { return proto.CompactTextString(m) }
func (*ExtendMsg) ProtoMessage() {}
func (*ExtendMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{76}
return fileDescriptor_ws_32de46e041571b6e, []int{76}
}
func (m *ExtendMsg) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExtendMsg.Unmarshal(m, b)
@@ -5538,7 +5538,7 @@ func (m *KeyValue) Reset() { *m = KeyValue{} }
func (m *KeyValue) String() string { return proto.CompactTextString(m) }
func (*KeyValue) ProtoMessage() {}
func (*KeyValue) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_2c814dd0dc73fa33, []int{77}
return fileDescriptor_ws_32de46e041571b6e, []int{77}
}
func (m *KeyValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KeyValue.Unmarshal(m, b)
@@ -5666,9 +5666,9 @@ func init() {
proto.RegisterType((*KeyValue)(nil), "sdkws.KeyValue")
}
func init() { proto.RegisterFile("sdkws/ws.proto", fileDescriptor_ws_2c814dd0dc73fa33) }
func init() { proto.RegisterFile("sdkws/ws.proto", fileDescriptor_ws_32de46e041571b6e) }
var fileDescriptor_ws_2c814dd0dc73fa33 = []byte{
var fileDescriptor_ws_32de46e041571b6e = []byte{
// 3680 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5b, 0xcf, 0x6f, 0xdc, 0xd6,
0xf1, 0x0f, 0x77, 0xb5, 0x92, 0x76, 0x56, 0x3f, 0x69, 0x5b, 0xd9, 0x6c, 0x62, 0x47, 0x60, 0xf2,
+201 -87
View File
@@ -36,7 +36,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} }
func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) }
func (*GetAllUserIDReq) ProtoMessage() {}
func (*GetAllUserIDReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{0}
return fileDescriptor_user_4ddd294c9f082be5, []int{0}
}
func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b)
@@ -75,7 +75,7 @@ func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} }
func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) }
func (*GetAllUserIDResp) ProtoMessage() {}
func (*GetAllUserIDResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{1}
return fileDescriptor_user_4ddd294c9f082be5, []int{1}
}
func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b)
@@ -120,7 +120,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} }
func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) }
func (*AccountCheckReq) ProtoMessage() {}
func (*AccountCheckReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{2}
return fileDescriptor_user_4ddd294c9f082be5, []int{2}
}
func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b)
@@ -158,7 +158,7 @@ func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} }
func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) }
func (*AccountCheckResp) ProtoMessage() {}
func (*AccountCheckResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{3}
return fileDescriptor_user_4ddd294c9f082be5, []int{3}
}
func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b)
@@ -197,7 +197,7 @@ func (m *AccountCheckRespSingleUserStatus) Reset() { *m = AccountCheckRe
func (m *AccountCheckRespSingleUserStatus) String() string { return proto.CompactTextString(m) }
func (*AccountCheckRespSingleUserStatus) ProtoMessage() {}
func (*AccountCheckRespSingleUserStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{3, 0}
return fileDescriptor_user_4ddd294c9f082be5, []int{3, 0}
}
func (m *AccountCheckRespSingleUserStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AccountCheckRespSingleUserStatus.Unmarshal(m, b)
@@ -242,7 +242,7 @@ func (m *GetDesignateUsersReq) Reset() { *m = GetDesignateUsersReq{} }
func (m *GetDesignateUsersReq) String() string { return proto.CompactTextString(m) }
func (*GetDesignateUsersReq) ProtoMessage() {}
func (*GetDesignateUsersReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{4}
return fileDescriptor_user_4ddd294c9f082be5, []int{4}
}
func (m *GetDesignateUsersReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDesignateUsersReq.Unmarshal(m, b)
@@ -280,7 +280,7 @@ func (m *GetDesignateUsersResp) Reset() { *m = GetDesignateUsersResp{} }
func (m *GetDesignateUsersResp) String() string { return proto.CompactTextString(m) }
func (*GetDesignateUsersResp) ProtoMessage() {}
func (*GetDesignateUsersResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{5}
return fileDescriptor_user_4ddd294c9f082be5, []int{5}
}
func (m *GetDesignateUsersResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDesignateUsersResp.Unmarshal(m, b)
@@ -318,7 +318,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} }
func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) }
func (*UpdateUserInfoReq) ProtoMessage() {}
func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{6}
return fileDescriptor_user_4ddd294c9f082be5, []int{6}
}
func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b)
@@ -355,7 +355,7 @@ func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} }
func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) }
func (*UpdateUserInfoResp) ProtoMessage() {}
func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{7}
return fileDescriptor_user_4ddd294c9f082be5, []int{7}
}
func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b)
@@ -387,7 +387,7 @@ func (m *SetGlobalRecvMessageOptReq) Reset() { *m = SetGlobalRecvMessage
func (m *SetGlobalRecvMessageOptReq) String() string { return proto.CompactTextString(m) }
func (*SetGlobalRecvMessageOptReq) ProtoMessage() {}
func (*SetGlobalRecvMessageOptReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{8}
return fileDescriptor_user_4ddd294c9f082be5, []int{8}
}
func (m *SetGlobalRecvMessageOptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGlobalRecvMessageOptReq.Unmarshal(m, b)
@@ -431,7 +431,7 @@ func (m *SetGlobalRecvMessageOptResp) Reset() { *m = SetGlobalRecvMessag
func (m *SetGlobalRecvMessageOptResp) String() string { return proto.CompactTextString(m) }
func (*SetGlobalRecvMessageOptResp) ProtoMessage() {}
func (*SetGlobalRecvMessageOptResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{9}
return fileDescriptor_user_4ddd294c9f082be5, []int{9}
}
func (m *SetGlobalRecvMessageOptResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGlobalRecvMessageOptResp.Unmarshal(m, b)
@@ -464,7 +464,7 @@ func (m *SetConversationReq) Reset() { *m = SetConversationReq{} }
func (m *SetConversationReq) String() string { return proto.CompactTextString(m) }
func (*SetConversationReq) ProtoMessage() {}
func (*SetConversationReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{10}
return fileDescriptor_user_4ddd294c9f082be5, []int{10}
}
func (m *SetConversationReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetConversationReq.Unmarshal(m, b)
@@ -515,7 +515,7 @@ func (m *SetConversationResp) Reset() { *m = SetConversationResp{} }
func (m *SetConversationResp) String() string { return proto.CompactTextString(m) }
func (*SetConversationResp) ProtoMessage() {}
func (*SetConversationResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{11}
return fileDescriptor_user_4ddd294c9f082be5, []int{11}
}
func (m *SetConversationResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetConversationResp.Unmarshal(m, b)
@@ -550,7 +550,7 @@ func (m *SetRecvMsgOptReq) Reset() { *m = SetRecvMsgOptReq{} }
func (m *SetRecvMsgOptReq) String() string { return proto.CompactTextString(m) }
func (*SetRecvMsgOptReq) ProtoMessage() {}
func (*SetRecvMsgOptReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{12}
return fileDescriptor_user_4ddd294c9f082be5, []int{12}
}
func (m *SetRecvMsgOptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetRecvMsgOptReq.Unmarshal(m, b)
@@ -615,7 +615,7 @@ func (m *SetRecvMsgOptResp) Reset() { *m = SetRecvMsgOptResp{} }
func (m *SetRecvMsgOptResp) String() string { return proto.CompactTextString(m) }
func (*SetRecvMsgOptResp) ProtoMessage() {}
func (*SetRecvMsgOptResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{13}
return fileDescriptor_user_4ddd294c9f082be5, []int{13}
}
func (m *SetRecvMsgOptResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetRecvMsgOptResp.Unmarshal(m, b)
@@ -648,7 +648,7 @@ func (m *GetConversationReq) Reset() { *m = GetConversationReq{} }
func (m *GetConversationReq) String() string { return proto.CompactTextString(m) }
func (*GetConversationReq) ProtoMessage() {}
func (*GetConversationReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{14}
return fileDescriptor_user_4ddd294c9f082be5, []int{14}
}
func (m *GetConversationReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationReq.Unmarshal(m, b)
@@ -700,7 +700,7 @@ func (m *GetConversationResp) Reset() { *m = GetConversationResp{} }
func (m *GetConversationResp) String() string { return proto.CompactTextString(m) }
func (*GetConversationResp) ProtoMessage() {}
func (*GetConversationResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{15}
return fileDescriptor_user_4ddd294c9f082be5, []int{15}
}
func (m *GetConversationResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationResp.Unmarshal(m, b)
@@ -740,7 +740,7 @@ func (m *GetConversationsReq) Reset() { *m = GetConversationsReq{} }
func (m *GetConversationsReq) String() string { return proto.CompactTextString(m) }
func (*GetConversationsReq) ProtoMessage() {}
func (*GetConversationsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{16}
return fileDescriptor_user_4ddd294c9f082be5, []int{16}
}
func (m *GetConversationsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationsReq.Unmarshal(m, b)
@@ -792,7 +792,7 @@ func (m *GetConversationsResp) Reset() { *m = GetConversationsResp{} }
func (m *GetConversationsResp) String() string { return proto.CompactTextString(m) }
func (*GetConversationsResp) ProtoMessage() {}
func (*GetConversationsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{17}
return fileDescriptor_user_4ddd294c9f082be5, []int{17}
}
func (m *GetConversationsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationsResp.Unmarshal(m, b)
@@ -831,7 +831,7 @@ func (m *GetAllConversationsReq) Reset() { *m = GetAllConversationsReq{}
func (m *GetAllConversationsReq) String() string { return proto.CompactTextString(m) }
func (*GetAllConversationsReq) ProtoMessage() {}
func (*GetAllConversationsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{18}
return fileDescriptor_user_4ddd294c9f082be5, []int{18}
}
func (m *GetAllConversationsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllConversationsReq.Unmarshal(m, b)
@@ -876,7 +876,7 @@ func (m *GetAllConversationsResp) Reset() { *m = GetAllConversationsResp
func (m *GetAllConversationsResp) String() string { return proto.CompactTextString(m) }
func (*GetAllConversationsResp) ProtoMessage() {}
func (*GetAllConversationsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{19}
return fileDescriptor_user_4ddd294c9f082be5, []int{19}
}
func (m *GetAllConversationsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllConversationsResp.Unmarshal(m, b)
@@ -917,7 +917,7 @@ func (m *BatchSetConversationsReq) Reset() { *m = BatchSetConversationsR
func (m *BatchSetConversationsReq) String() string { return proto.CompactTextString(m) }
func (*BatchSetConversationsReq) ProtoMessage() {}
func (*BatchSetConversationsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{20}
return fileDescriptor_user_4ddd294c9f082be5, []int{20}
}
func (m *BatchSetConversationsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchSetConversationsReq.Unmarshal(m, b)
@@ -977,7 +977,7 @@ func (m *BatchSetConversationsResp) Reset() { *m = BatchSetConversations
func (m *BatchSetConversationsResp) String() string { return proto.CompactTextString(m) }
func (*BatchSetConversationsResp) ProtoMessage() {}
func (*BatchSetConversationsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{21}
return fileDescriptor_user_4ddd294c9f082be5, []int{21}
}
func (m *BatchSetConversationsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchSetConversationsResp.Unmarshal(m, b)
@@ -1022,7 +1022,7 @@ func (m *GetPaginationUsersReq) Reset() { *m = GetPaginationUsersReq{} }
func (m *GetPaginationUsersReq) String() string { return proto.CompactTextString(m) }
func (*GetPaginationUsersReq) ProtoMessage() {}
func (*GetPaginationUsersReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{22}
return fileDescriptor_user_4ddd294c9f082be5, []int{22}
}
func (m *GetPaginationUsersReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationUsersReq.Unmarshal(m, b)
@@ -1061,7 +1061,7 @@ func (m *GetPaginationUsersResp) Reset() { *m = GetPaginationUsersResp{}
func (m *GetPaginationUsersResp) String() string { return proto.CompactTextString(m) }
func (*GetPaginationUsersResp) ProtoMessage() {}
func (*GetPaginationUsersResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{23}
return fileDescriptor_user_4ddd294c9f082be5, []int{23}
}
func (m *GetPaginationUsersResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPaginationUsersResp.Unmarshal(m, b)
@@ -1106,7 +1106,7 @@ func (m *UserRegisterReq) Reset() { *m = UserRegisterReq{} }
func (m *UserRegisterReq) String() string { return proto.CompactTextString(m) }
func (*UserRegisterReq) ProtoMessage() {}
func (*UserRegisterReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{24}
return fileDescriptor_user_4ddd294c9f082be5, []int{24}
}
func (m *UserRegisterReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserRegisterReq.Unmarshal(m, b)
@@ -1143,7 +1143,7 @@ func (m *UserRegisterResp) Reset() { *m = UserRegisterResp{} }
func (m *UserRegisterResp) String() string { return proto.CompactTextString(m) }
func (*UserRegisterResp) ProtoMessage() {}
func (*UserRegisterResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_c6c77fe2e81ca7ab, []int{25}
return fileDescriptor_user_4ddd294c9f082be5, []int{25}
}
func (m *UserRegisterResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserRegisterResp.Unmarshal(m, b)
@@ -1163,6 +1163,82 @@ func (m *UserRegisterResp) XXX_DiscardUnknown() {
var xxx_messageInfo_UserRegisterResp proto.InternalMessageInfo
type GetGlobalRecvMessageOptReq struct {
UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetGlobalRecvMessageOptReq) Reset() { *m = GetGlobalRecvMessageOptReq{} }
func (m *GetGlobalRecvMessageOptReq) String() string { return proto.CompactTextString(m) }
func (*GetGlobalRecvMessageOptReq) ProtoMessage() {}
func (*GetGlobalRecvMessageOptReq) Descriptor() ([]byte, []int) {
return fileDescriptor_user_4ddd294c9f082be5, []int{26}
}
func (m *GetGlobalRecvMessageOptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGlobalRecvMessageOptReq.Unmarshal(m, b)
}
func (m *GetGlobalRecvMessageOptReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetGlobalRecvMessageOptReq.Marshal(b, m, deterministic)
}
func (dst *GetGlobalRecvMessageOptReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetGlobalRecvMessageOptReq.Merge(dst, src)
}
func (m *GetGlobalRecvMessageOptReq) XXX_Size() int {
return xxx_messageInfo_GetGlobalRecvMessageOptReq.Size(m)
}
func (m *GetGlobalRecvMessageOptReq) XXX_DiscardUnknown() {
xxx_messageInfo_GetGlobalRecvMessageOptReq.DiscardUnknown(m)
}
var xxx_messageInfo_GetGlobalRecvMessageOptReq proto.InternalMessageInfo
func (m *GetGlobalRecvMessageOptReq) GetUserID() string {
if m != nil {
return m.UserID
}
return ""
}
type GetGlobalRecvMessageOptResp struct {
GlobalRecvMsgOpt int32 `protobuf:"varint,1,opt,name=globalRecvMsgOpt" json:"globalRecvMsgOpt,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetGlobalRecvMessageOptResp) Reset() { *m = GetGlobalRecvMessageOptResp{} }
func (m *GetGlobalRecvMessageOptResp) String() string { return proto.CompactTextString(m) }
func (*GetGlobalRecvMessageOptResp) ProtoMessage() {}
func (*GetGlobalRecvMessageOptResp) Descriptor() ([]byte, []int) {
return fileDescriptor_user_4ddd294c9f082be5, []int{27}
}
func (m *GetGlobalRecvMessageOptResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetGlobalRecvMessageOptResp.Unmarshal(m, b)
}
func (m *GetGlobalRecvMessageOptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetGlobalRecvMessageOptResp.Marshal(b, m, deterministic)
}
func (dst *GetGlobalRecvMessageOptResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetGlobalRecvMessageOptResp.Merge(dst, src)
}
func (m *GetGlobalRecvMessageOptResp) XXX_Size() int {
return xxx_messageInfo_GetGlobalRecvMessageOptResp.Size(m)
}
func (m *GetGlobalRecvMessageOptResp) XXX_DiscardUnknown() {
xxx_messageInfo_GetGlobalRecvMessageOptResp.DiscardUnknown(m)
}
var xxx_messageInfo_GetGlobalRecvMessageOptResp proto.InternalMessageInfo
func (m *GetGlobalRecvMessageOptResp) GetGlobalRecvMsgOpt() int32 {
if m != nil {
return m.GlobalRecvMsgOpt
}
return 0
}
func init() {
proto.RegisterType((*GetAllUserIDReq)(nil), "user.getAllUserIDReq")
proto.RegisterType((*GetAllUserIDResp)(nil), "user.getAllUserIDResp")
@@ -1191,6 +1267,8 @@ func init() {
proto.RegisterType((*GetPaginationUsersResp)(nil), "user.getPaginationUsersResp")
proto.RegisterType((*UserRegisterReq)(nil), "user.userRegisterReq")
proto.RegisterType((*UserRegisterResp)(nil), "user.userRegisterResp")
proto.RegisterType((*GetGlobalRecvMessageOptReq)(nil), "user.getGlobalRecvMessageOptReq")
proto.RegisterType((*GetGlobalRecvMessageOptResp)(nil), "user.getGlobalRecvMessageOptResp")
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1210,6 +1288,8 @@ type UserClient interface {
UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*UpdateUserInfoResp, error)
// 设置用户消息接收选项
SetGlobalRecvMessageOpt(ctx context.Context, in *SetGlobalRecvMessageOptReq, opts ...grpc.CallOption) (*SetGlobalRecvMessageOptResp, error)
// 获取用户消息接收选项 没找到不返回错误
GetGlobalRecvMessageOpt(ctx context.Context, in *GetGlobalRecvMessageOptReq, opts ...grpc.CallOption) (*GetGlobalRecvMessageOptResp, error)
// 检查userID是否存在
AccountCheck(ctx context.Context, in *AccountCheckReq, opts ...grpc.CallOption) (*AccountCheckResp, error)
// 翻页(或指定userID,昵称)拉取用户信息 全字段
@@ -1253,6 +1333,15 @@ func (c *userClient) SetGlobalRecvMessageOpt(ctx context.Context, in *SetGlobalR
return out, nil
}
func (c *userClient) GetGlobalRecvMessageOpt(ctx context.Context, in *GetGlobalRecvMessageOptReq, opts ...grpc.CallOption) (*GetGlobalRecvMessageOptResp, error) {
out := new(GetGlobalRecvMessageOptResp)
err := grpc.Invoke(ctx, "/user.user/getGlobalRecvMessageOpt", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userClient) AccountCheck(ctx context.Context, in *AccountCheckReq, opts ...grpc.CallOption) (*AccountCheckResp, error) {
out := new(AccountCheckResp)
err := grpc.Invoke(ctx, "/user.user/accountCheck", in, out, c.cc, opts...)
@@ -1289,6 +1378,8 @@ type UserServer interface {
UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*UpdateUserInfoResp, error)
// 设置用户消息接收选项
SetGlobalRecvMessageOpt(context.Context, *SetGlobalRecvMessageOptReq) (*SetGlobalRecvMessageOptResp, error)
// 获取用户消息接收选项 没找到不返回错误
GetGlobalRecvMessageOpt(context.Context, *GetGlobalRecvMessageOptReq) (*GetGlobalRecvMessageOptResp, error)
// 检查userID是否存在
AccountCheck(context.Context, *AccountCheckReq) (*AccountCheckResp, error)
// 翻页(或指定userID,昵称)拉取用户信息 全字段
@@ -1355,6 +1446,24 @@ func _User_SetGlobalRecvMessageOpt_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _User_GetGlobalRecvMessageOpt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGlobalRecvMessageOptReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServer).GetGlobalRecvMessageOpt(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/user.user/GetGlobalRecvMessageOpt",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServer).GetGlobalRecvMessageOpt(ctx, req.(*GetGlobalRecvMessageOptReq))
}
return interceptor(ctx, in, info, handler)
}
func _User_AccountCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AccountCheckReq)
if err := dec(in); err != nil {
@@ -1425,6 +1534,10 @@ var _User_serviceDesc = grpc.ServiceDesc{
MethodName: "setGlobalRecvMessageOpt",
Handler: _User_SetGlobalRecvMessageOpt_Handler,
},
{
MethodName: "getGlobalRecvMessageOpt",
Handler: _User_GetGlobalRecvMessageOpt_Handler,
},
{
MethodName: "accountCheck",
Handler: _User_AccountCheck_Handler,
@@ -1442,65 +1555,66 @@ var _User_serviceDesc = grpc.ServiceDesc{
Metadata: "user/user.proto",
}
func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_c6c77fe2e81ca7ab) }
func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_4ddd294c9f082be5) }
var fileDescriptor_user_c6c77fe2e81ca7ab = []byte{
// 911 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x6d, 0x6f, 0xe3, 0x44,
0x10, 0x96, 0x93, 0xe6, 0x8e, 0x4e, 0x7b, 0xd7, 0x74, 0xfb, 0x66, 0x5c, 0x0e, 0x95, 0xd5, 0x09,
0x2a, 0xa4, 0x4b, 0xa0, 0x08, 0x01, 0x42, 0x20, 0x8e, 0x46, 0x40, 0xa4, 0x46, 0x39, 0x39, 0x54,
0x20, 0xde, 0x82, 0xeb, 0x6e, 0x7d, 0x56, 0x8d, 0xbd, 0xf1, 0xac, 0x5b, 0xf1, 0x0d, 0x89, 0x7f,
0xc2, 0x17, 0xfe, 0x0a, 0x42, 0xfc, 0x28, 0xb4, 0x6b, 0xa7, 0x59, 0x7b, 0xed, 0x5e, 0xae, 0xba,
0x2f, 0x89, 0x77, 0x76, 0xe6, 0xd9, 0x79, 0x66, 0x66, 0x77, 0x06, 0x36, 0x32, 0x64, 0x69, 0x5f,
0xfe, 0xf4, 0x78, 0x9a, 0x88, 0x84, 0xac, 0xc8, 0x6f, 0xe7, 0x70, 0xcc, 0x59, 0xfc, 0x64, 0x38,
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0x3d, 0xf4, 0x95, 0xbc, 0x93, 0x45, 0x58, 0xcc, 0x82, 0x73, 0xde, 0x68, 0xde, 0xcc, 0xfd,
0xd1, 0xf3, 0x33, 0xf7, 0xa7, 0x92, 0xf9, 0xb9, 0x3f, 0xd5, 0x54, 0x7e, 0xf9, 0xe8, 0x87, 0x7d,
0x39, 0x42, 0x4f, 0x87, 0x23, 0x6d, 0x76, 0x96, 0x5a, 0x9f, 0xca, 0x9f, 0xb3, 0x7b, 0x4a, 0xf0,
0xc1, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x3a, 0xa4, 0xbe, 0xa9, 0x0b, 0x00, 0x00,
var fileDescriptor_user_4ddd294c9f082be5 = []byte{
// 927 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x6d, 0x6f, 0xe4, 0x34,
0x10, 0x56, 0xb6, 0xdd, 0x3b, 0x3a, 0xed, 0xdd, 0x6e, 0xdd, 0xb7, 0x90, 0x72, 0xa8, 0x58, 0xc0,
0x55, 0xa0, 0xee, 0xa2, 0x02, 0x52, 0x25, 0x04, 0xba, 0xa3, 0xd5, 0xc1, 0x8a, 0xab, 0xf6, 0x48,
0xa9, 0x84, 0x00, 0x01, 0x69, 0xea, 0xa6, 0x51, 0xa3, 0xc4, 0x9b, 0x71, 0x5a, 0xf1, 0x0d, 0x89,
0x7f, 0xc2, 0x17, 0xf8, 0x2d, 0x88, 0x1f, 0x85, 0x6c, 0x67, 0xbb, 0x4e, 0x9c, 0xf4, 0x05, 0xdd,
0x97, 0xdd, 0x78, 0x5e, 0x1e, 0xcf, 0x33, 0x1e, 0x7b, 0x06, 0x7a, 0x05, 0xb2, 0x7c, 0x28, 0x7f,
0x06, 0x3c, 0xcf, 0x44, 0x46, 0xe6, 0xe5, 0xb7, 0xf7, 0x74, 0xcc, 0x59, 0xba, 0x33, 0x3a, 0xdc,
0x39, 0x62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, 0x25, 0x73, 0xb0, 0x23, 0x6b, 0x4d, 0xc3, 0xde, 0xc4, 0x5b, 0x6f, 0x9e, 0x01, 0xc9, 0x58,
0x75, 0xa9, 0x5a, 0x01, 0x93, 0x59, 0xda, 0xed, 0xdb, 0xe2, 0xbd, 0xd5, 0xae, 0xd4, 0xf1, 0x98,
0x05, 0x38, 0x8d, 0xa7, 0x56, 0xce, 0xd3, 0x78, 0xea, 0xb5, 0xfa, 0xe5, 0x93, 0x1f, 0x36, 0xe5,
0x6c, 0xff, 0xcb, 0xe8, 0xd0, 0x18, 0xea, 0xa5, 0xd5, 0x67, 0xf2, 0xe7, 0xe4, 0x81, 0x12, 0x7c,
0xfc, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xd8, 0x30, 0x73, 0x41, 0x0c, 0x00, 0x00,
}
+33 -1
View File
@@ -5,6 +5,38 @@ import (
"sort"
)
// SliceSub a中存在,b中不存在 (a-b)
func SliceSub[E comparable](a, b []E) []E {
k := make(map[E]struct{})
for i := 0; i < len(b); i++ {
k[b[i]] = struct{}{}
}
t := make(map[E]struct{})
rs := make([]E, 0, len(a))
for i := 0; i < len(a); i++ {
e := a[i]
if _, ok := t[e]; ok {
continue
}
if _, ok := k[e]; ok {
continue
}
rs = append(rs, e)
t[e] = struct{}{}
}
return rs
}
// SliceSubAny a中存在,b中不存在 (a-b)
func SliceSubAny[E comparable, T any](a []E, b []T, fn func(t T) E) []E {
return SliceSub(a, Slice(b, fn))
}
// SliceAnySub a中存在,b中不存在 (a-b) fn 返回的是uuid
func SliceAnySub[E any, T comparable](a, b []E, fn func(t E) T) []E {
panic("todo")
}
// DistinctAny 去重
func DistinctAny[E any, K comparable](es []E, fn func(e E) K) []E {
v := make([]E, 0, len(es))
@@ -159,7 +191,7 @@ func Filter[E, T any](es []E, fn func(e E) (T, bool)) []T {
func Slice[E any, T any](es []E, fn func(e E) T) []T {
v := make([]T, len(es))
for i := 0; i < len(es); i++ {
v = append(v, fn(es[i]))
v[i] = fn(es[i])
}
return v
}