Documentation ¶
Index ¶
- Constants
- Variables
- func GetCurrentTimestampByMill() int64
- func GetExtendMsgMaxNum() int32
- func GetExtendMsgSourceID(ID string, index int32) string
- func GetSeqUid(uid string, seq uint32) string
- func GetSingleGocMsgNum() int
- func SplitSourceIDAndGetIndex(sourceID string) int32
- type AppVersion
- type Black
- type BlackList
- type ChatLog
- type ClientInitConfig
- type Comment
- type Conversation
- type DataBases
- func (d *DataBases) AddGroupMember(groupID, uid string) error
- func (d *DataBases) AddTokenFlag(userID string, platformID int, token string, flag int) error
- func (d *DataBases) AddUserToSuperGroup(groupID string, userIDList []string) error
- func (d *DataBases) AddUserToSuperGroups(groupIDList []string, userID string) error
- func (d *DataBases) BatchInsertChat2Cache(insertID string, msgList []*pbMsg.MsgDataToMQ, operationID string) (error, uint64)
- func (d *DataBases) BatchInsertChat2DB(userID string, msgList []*pbMsg.MsgDataToMQ, operationID string, ...) error
- func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string, operationID string) error
- func (d *DataBases) CleanUpUserMsgFromMongo(userID string, operationID string) error
- func (d *DataBases) CommentOneWorkMoment(comment *Comment, workMomentID string) (WorkMoment, error)
- func (d *DataBases) CreateExtendMsgSet(set *ExtendMsgSet) error
- func (d *DataBases) CreateOneWorkMoment(workMoment *WorkMoment) error
- func (d *DataBases) CreateSuperGroup(groupID string, initMemberIDList []string, memberNumCount int) error
- func (d *DataBases) CreateTag(userID, tagName string, userList []string) error
- func (d *DataBases) DelFcmToken(account string, platformID int) error
- func (d *DataBases) DelGroupMember(groupID, uid string) error
- func (d *DataBases) DelMongoMsgs(IDList []string) error
- func (d *DataBases) DelMsgByIndex(suffixUserID string, msg *open_im_sdk.MsgData, operationID string, ...) error
- func (d *DataBases) DelMsgBySeqList(userID string, seqList []uint32, operationID string) (totalUnExistSeqList []uint32, err error)
- func (d *DataBases) DelMsgBySeqListInOneDoc(suffixUserID string, seqList []uint32, operationID string) ([]uint32, error)
- func (d *DataBases) DelMsgFromCache(uid string, seqList []uint32, operationID string)
- func (d *DataBases) DelMsgLogic(uid string, seqList []uint32, operationID string) error
- func (d *DataBases) DelUserChat(uid string) error
- func (d *DataBases) DelUserChatMongo2(uid string) error
- func (d *DataBases) DelUserSignalList(userID string) error
- func (d *DataBases) DeleteComment(workMomentID, contentID, opUserID string) error
- func (d *DataBases) DeleteMessageFromCache(msgList []*pbChat.MsgDataToMQ, uid string, operationID string) error
- func (d *DataBases) DeleteOneMessageKey(clientMsgID string, sessionType int32, subKey string) error
- func (d *DataBases) DeleteOneWorkMoment(workMomentID string) error
- func (d *DataBases) DeleteReactionExtendMsgSet(sourceID string, sessionType int32, clientMsgID string, ...) error
- func (d *DataBases) DeleteSuperGroup(groupID string) error
- func (d *DataBases) DeleteTag(userID, tagID string) error
- func (d *DataBases) DeleteTokenByUidPid(userID string, platformID int, fields []string) error
- func (d *DataBases) GetAccountCode(account string) (string, error)
- func (d *DataBases) GetAllExtendMsgSet(ID string, opts *GetAllExtendMsgSetOpts) (sets []*ExtendMsgSet, err error)
- func (d *DataBases) GetAvailableSignalInvitationInfo(userID string) (invitationInfo *pbRtc.SignalInviteReq, err error)
- func (d *DataBases) GetExtendMsg(sourceID string, sessionType int32, clientMsgID string, maxMsgUpdateTime int64) (extendMsg *ExtendMsg, err error)
- func (d *DataBases) GetExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, ...) (*ExtendMsgSet, error)
- func (d *DataBases) GetFcmToken(account string, platformID int) (string, error)
- func (d *DataBases) GetGetuiTaskID() (string, error)
- func (d *DataBases) GetGetuiToken() (string, error)
- func (d *DataBases) GetGroupMaxSeq(groupID string) (uint64, error)
- func (d *DataBases) GetGroupMember(groupID string) []string
- func (d *DataBases) GetGroupUserMinSeq(groupID, userID string) (uint64, error)
- func (d *DataBases) GetMessageListBySeq(userID string, seqList []uint32, operationID string) (seqMsg []*pbCommon.MsgData, failedSeqList []uint32, errResult error)
- func (d *DataBases) GetMessageTypeKeyValue(clientMsgID string, sessionType int32, typeKey string) (string, error)
- func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq uint32, err error)
- func (d *DataBases) GetMinSeqFromMongo2(uid string) (MinSeq uint32, err error)
- func (d *DataBases) GetMsgAndIndexBySeqListInOneMongo2(suffixUserID string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, indexList []int, unexistSeqList []uint32, ...)
- func (d *DataBases) GetMsgBySeqIndex(uid string, seq uint32, operationID string) (*open_im_sdk.MsgData, error)
- func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error)
- func (d *DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error)
- func (d *DataBases) GetNewestMsg(ID string) (msg *open_im_sdk.MsgData, err error)
- func (d *DataBases) GetOldestMsg(ID string) (msg *open_im_sdk.MsgData, err error)
- func (d *DataBases) GetOneMessageAllReactionList(clientMsgID string, sessionType int32) (map[string]string, error)
- func (d *DataBases) GetSendMsgStatus(operationID string) (int, error)
- func (d *DataBases) GetSignalInfoFromCacheByClientMsgID(clientMsgID string) (invitationInfo *pbRtc.SignalInviteReq, err error)
- func (d *DataBases) GetSingleConversationRecvMsgOpt(userID, conversationID string) (int, error)
- func (d *DataBases) GetSuperGroup(groupID string) (SuperGroup, error)
- func (d *DataBases) GetSuperGroupByUserID(userID string) (UserToSuperGroup, error)
- func (d *DataBases) GetSuperGroupMsgBySeqListMongo(groupID string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, indexes map[uint32]int, err error)
- func (d *DataBases) GetSuperGroupUserReceiveNotNotifyMessageIDList(groupID string) ([]string, error)
- func (d *DataBases) GetTagByID(userID, tagID string) (Tag, error)
- func (d *DataBases) GetTagSendLogs(userID string, showNumber, pageNumber int32) ([]TagSendLog, error)
- func (d *DataBases) GetTokenMapByUidPid(userID, platformID string) (map[string]int, error)
- func (d *DataBases) GetUserBadgeUnreadCountSum(uid string) (int, error)
- func (d *DataBases) GetUserFriendWorkMoments(showNumber, pageNumber int32, userID string, friendIDList []string) ([]WorkMoment, error)
- func (d *DataBases) GetUserGlobalMsgRecvOpt(userID string) (int, error)
- func (d *DataBases) GetUserIDListByTagID(userID, tagID string) ([]string, error)
- func (d *DataBases) GetUserMaxSeq(uid string) (uint64, error)
- func (d *DataBases) GetUserMinSeq(uid string) (uint64, error)
- func (d *DataBases) GetUserMsgListByIndex(ID string, index int64) (*UserChat, error)
- func (d *DataBases) GetUserSelfWorkMoments(userID string, showNumber, pageNumber int32) ([]WorkMoment, error)
- func (d *DataBases) GetUserTags(userID string) ([]Tag, error)
- func (d *DataBases) GetUserWorkMoments(opUserID, userID string, showNumber, pageNumber int32, friendIDList []string) ([]WorkMoment, error)
- func (d *DataBases) GetWorkMomentByID(workMomentID string) (*WorkMoment, error)
- func (d *DataBases) HandleSignalInfo(operationID string, msg *pbCommon.MsgData, pushToUserID string) (isSend bool, err error)
- func (d *DataBases) IncrGroupMaxSeq(groupID string) (uint64, error)
- func (d *DataBases) IncrUserBadgeUnreadCountSum(uid string) (int, error)
- func (d *DataBases) IncrUserSeq(uid string) (uint64, error)
- func (d *DataBases) InsertExtendMsg(sourceID string, sessionType int32, msg *ExtendMsg) error
- func (d *DataBases) InsertOrUpdateReactionExtendMsgSet(sourceID string, sessionType int32, clientMsgID string, ...) error
- func (d *DataBases) JudgeAccountEXISTS(account string) (bool, error)
- func (d *DataBases) JudgeMessageReactionEXISTS(clientMsgID string, sessionType int32) (bool, error)
- func (d *DataBases) LikeOneWorkMoment(likeUserID, userName, workMomentID string) (*WorkMoment, bool, error)
- func (d *DataBases) LockMessageTypeKey(clientMsgID string, TypeKey string) error
- func (d *DataBases) MgoSkipUID(count int) (string, error)
- func (d *DataBases) MgoUserCount() (int, error)
- func (d *DataBases) RemoveGroupFromUser(ctx, sCtx context.Context, groupID string, userIDList []string) error
- func (d *DataBases) RemoverUserFromSuperGroup(groupID string, userIDList []string) error
- func (d *DataBases) ReplaceMsgByIndex(uid string, msg *open_im_sdk.MsgData, index int) error
- func (d *DataBases) ReplaceMsgBySeq(uid string, msg *open_im_sdk.MsgData, operationID string) error
- func (d *DataBases) ReplaceMsgToBlankByIndex(suffixID string, index int) (replaceMaxSeq uint32, err error)
- func (d *DataBases) SaveTagSendLog(tagSendLog *TagSendLog) error
- func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgDataToDB) error
- func (d *DataBases) SaveUserChatMongo2(uid string, sendTime int64, m *pbMsg.MsgDataToDB) error
- func (d *DataBases) SetAccountCode(account string, code, ttl int) (err error)
- func (d *DataBases) SetFcmToken(account string, platformID int, fcmToken string, expireTime int64) (err error)
- func (d *DataBases) SetGetuiTaskID(taskID string, expireTime int64) error
- func (d *DataBases) SetGetuiToken(token string, expireTime int64) error
- func (d *DataBases) SetGroupMaxSeq(groupID string, maxSeq uint64) error
- func (d *DataBases) SetGroupMinSeq(groupID string, minSeq uint32) error
- func (d *DataBases) SetGroupUserMinSeq(groupID, userID string, minSeq uint64) (err error)
- func (d *DataBases) SetMessageReactionExpire(clientMsgID string, sessionType int32, expiration time.Duration) (bool, error)
- func (d *DataBases) SetMessageToCache(msgList []*pbChat.MsgDataToMQ, uid string, operationID string) (error, int)
- func (d *DataBases) SetMessageTypeKeyValue(clientMsgID string, sessionType int32, typeKey, value string) error
- func (d *DataBases) SetSendMsgStatus(status int32, operationID string) error
- func (d *DataBases) SetSingleConversationRecvMsgOpt(userID, conversationID string, opt int32) error
- func (d *DataBases) SetSuperGroupUserReceiveNotNotifyMessage(groupID, userID string) error
- func (d *DataBases) SetSuperGroupUserReceiveNotifyMessage(groupID, userID string) error
- func (d *DataBases) SetTag(userID, tagID, newName string, increaseUserIDList []string, ...) error
- func (d *DataBases) SetTokenMapByUidPid(userID string, platformID int, m map[string]int) error
- func (d *DataBases) SetUserBadgeUnreadCountSum(uid string, value int) error
- func (d *DataBases) SetUserGlobalMsgRecvOpt(userID string, opt int32) error
- func (d *DataBases) SetUserMaxSeq(uid string, maxSeq uint64) error
- func (d *DataBases) SetUserMinSeq(uid string, minSeq uint32) (err error)
- func (d *DataBases) SetUserWorkMomentsLevel(userID string, level int32) error
- func (d *DataBases) UnLockMessageTypeKey(clientMsgID string, TypeKey string) error
- func (d *DataBases) UpdateOneMsgList(msg *UserChat) error
- type Department
- type DepartmentMember
- type ExtendMsg
- type ExtendMsgSet
- type Friend
- type FriendRequest
- type GetAllExtendMsgSetOpts
- type Group
- type GroupMember
- type GroupMember_x
- type GroupRequest
- type Invitation
- type IpLimit
- type KeyValue
- type MsgInfo
- type OrganizationUser
- type RedisClient
- type Register
- type RegisterAddFriend
- type SuperGroup
- type Tag
- type TagSendLog
- type TagUser
- type User
- type UserChat
- type UserIpLimit
- type UserIpRecord
- type UserToSuperGroup
- type WorkMoment
- type WorkMomentUser
- type Writer
Constants ¶
const ( SignalCache = "SIGNAL_CACHE:" SignalListCache = "SIGNAL_LIST_CACHE:" GlobalMsgRecvOpt = "GLOBAL_MSG_RECV_OPT" FcmToken = "FCM_TOKEN:" )
const MaxNum = 100
Variables ¶
var ErrMsgListNotExist = errors.New("user not have msg in mongoDB")
Functions ¶
func GetCurrentTimestampByMill ¶
func GetCurrentTimestampByMill() int64
func GetExtendMsgMaxNum ¶
func GetExtendMsgMaxNum() int32
func GetExtendMsgSourceID ¶
func GetSingleGocMsgNum ¶
func GetSingleGocMsgNum() int
Types ¶
type AppVersion ¶
type AppVersion struct { Version string `gorm:"column:version;size:64" json:"version"` Type int `gorm:"column:type;primary_key" json:"type"` UpdateTime int `gorm:"column:update_time" json:"update_time"` ForceUpdate bool `gorm:"column:force_update" json:"force_update"` FileName string `gorm:"column:file_name" json:"file_name"` YamlName string `gorm:"column:yaml_name" json:"yaml_name"` UpdateLog string `gorm:"column:update_log" json:"update_log"` }
func (AppVersion) TableName ¶
func (AppVersion) TableName() string
type Black ¶
type Black struct { OwnerUserID string `gorm:"column:owner_user_id;primary_key;size:64"` BlockUserID string `gorm:"column:block_user_id;primary_key;size:64"` CreateTime time.Time `gorm:"column:create_time"` AddSource int32 `gorm:"column:add_source"` OperatorUserID string `gorm:"column:operator_user_id;size:64"` Ex string `gorm:"column:ex;size:1024"` }
message BlackInfo{ string OwnerUserID = 1; int64 CreateTime = 2; PublicUserInfo BlackUserInfo = 4; int32 AddSource = 5; string OperatorUserID = 6; string Ex = 7; } open_im_sdk.BlackInfo(BlackUserInfo) != imdb.Black (BlockUserID)
type ChatLog ¶
type ChatLog struct { ServerMsgID string `gorm:"column:server_msg_id;primary_key;type:char(64)" json:"serverMsgID"` ClientMsgID string `gorm:"column:client_msg_id;type:char(64)" json:"clientMsgID"` SendID string `gorm:"column:send_id;type:char(64);index:send_id,priority:2" json:"sendID"` RecvID string `gorm:"column:recv_id;type:char(64);index:recv_id,priority:2" json:"recvID"` SenderPlatformID int32 `gorm:"column:sender_platform_id" json:"senderPlatformID"` SenderNickname string `gorm:"column:sender_nick_name;type:varchar(255)" json:"senderNickname"` SenderFaceURL string `gorm:"column:sender_face_url;type:varchar(255);" json:"senderFaceURL"` SessionType int32 `gorm:"column:session_type;index:session_type,priority:2;index:session_type_alone" json:"sessionType"` MsgFrom int32 `gorm:"column:msg_from" json:"msgFrom"` ContentType int32 `gorm:"column:content_type;index:content_type,priority:2;index:content_type_alone" json:"contentType"` Content string `gorm:"column:content;type:varchar(3000)" json:"content"` Status int32 `gorm:"column:status" json:"status"` SendTime time.Time `` /* 164-byte string literal not displayed */ CreateTime time.Time `gorm:"column:create_time" json:"createTime"` Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"` }
type ClientInitConfig ¶
type ClientInitConfig struct {
DiscoverPageURL string `gorm:"column:discover_page_url;size:64" json:"version"`
}
func (ClientInitConfig) TableName ¶
func (ClientInitConfig) TableName() string
type Comment ¶
type Comment struct { UserID string `bson:"user_id" json:"user_id"` UserName string `bson:"user_name" json:"user_name"` ReplyUserID string `bson:"reply_user_id" json:"reply_user_id"` ReplyUserName string `bson:"reply_user_name" json:"reply_user_name"` ContentID string `bson:"content_id" json:"content_id"` Content string `bson:"content" json:"content"` CreateTime int32 `bson:"create_time" json:"create_time"` }
type Conversation ¶
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 ¶
func (Conversation) TableName() string
type DataBases ¶
type DataBases struct { MysqlDB mysqlDB RDB go_redis.UniversalClient Rc *rockscache.Client WeakRc *rockscache.Client // contains filtered or unexported fields }
var DB DataBases
func (*DataBases) AddGroupMember ¶
func (*DataBases) AddTokenFlag ¶
Store userid and platform class to redis
func (*DataBases) AddUserToSuperGroup ¶
func (*DataBases) AddUserToSuperGroups ¶
func (*DataBases) BatchInsertChat2Cache ¶
func (*DataBases) BatchInsertChat2DB ¶
func (*DataBases) CleanUpOneUserAllMsgFromRedis ¶
func (*DataBases) CleanUpUserMsgFromMongo ¶
func (*DataBases) CommentOneWorkMoment ¶
func (d *DataBases) CommentOneWorkMoment(comment *Comment, workMomentID string) (WorkMoment, error)
func (*DataBases) CreateExtendMsgSet ¶
func (d *DataBases) CreateExtendMsgSet(set *ExtendMsgSet) error
func (*DataBases) CreateOneWorkMoment ¶
func (d *DataBases) CreateOneWorkMoment(workMoment *WorkMoment) error
func (*DataBases) CreateSuperGroup ¶
func (*DataBases) DelFcmToken ¶
func (*DataBases) DelGroupMember ¶
func (*DataBases) DelMongoMsgs ¶
func (*DataBases) DelMsgByIndex ¶
func (*DataBases) DelMsgBySeqList ¶
func (d *DataBases) DelMsgBySeqList(userID string, seqList []uint32, operationID string) (totalUnExistSeqList []uint32, err error)
deleteMsgByLogic
func (*DataBases) DelMsgBySeqListInOneDoc ¶
func (*DataBases) DelMsgFromCache ¶
func (*DataBases) DelMsgLogic ¶
deleteMsgByLogic
func (*DataBases) DelUserChat ¶
func (*DataBases) DelUserChatMongo2 ¶
func (*DataBases) DelUserSignalList ¶
func (*DataBases) DeleteComment ¶
func (*DataBases) DeleteMessageFromCache ¶
func (*DataBases) DeleteOneMessageKey ¶
func (*DataBases) DeleteOneWorkMoment ¶
func (*DataBases) DeleteReactionExtendMsgSet ¶
func (d *DataBases) DeleteReactionExtendMsgSet(sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*server_api_params.KeyValue) error
delete TypeKey
func (*DataBases) DeleteSuperGroup ¶
func (*DataBases) DeleteTokenByUidPid ¶
func (*DataBases) GetAccountCode ¶
func (*DataBases) GetAllExtendMsgSet ¶
func (d *DataBases) GetAllExtendMsgSet(ID string, opts *GetAllExtendMsgSetOpts) (sets []*ExtendMsgSet, err error)
func (*DataBases) GetAvailableSignalInvitationInfo ¶
func (d *DataBases) GetAvailableSignalInvitationInfo(userID string) (invitationInfo *pbRtc.SignalInviteReq, err error)
func (*DataBases) GetExtendMsg ¶
func (*DataBases) GetExtendMsgSet ¶
func (d *DataBases) GetExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, maxMsgUpdateTime int64, c *mongo.Collection) (*ExtendMsgSet, error)
func (*DataBases) GetFcmToken ¶
func (*DataBases) GetGetuiTaskID ¶
func (*DataBases) GetGetuiToken ¶
func (*DataBases) GetGroupMaxSeq ¶
func (*DataBases) GetGroupMember ¶
func (*DataBases) GetGroupUserMinSeq ¶
func (*DataBases) GetMessageListBySeq ¶
func (*DataBases) GetMessageTypeKeyValue ¶
func (*DataBases) GetMinSeqFromMongo ¶
func (*DataBases) GetMinSeqFromMongo2 ¶
func (*DataBases) GetMsgAndIndexBySeqListInOneMongo2 ¶
func (*DataBases) GetMsgBySeqIndex ¶
func (*DataBases) GetMsgBySeqList ¶
func (*DataBases) GetMsgBySeqListMongo2 ¶
func (*DataBases) GetNewestMsg ¶
func (d *DataBases) GetNewestMsg(ID string) (msg *open_im_sdk.MsgData, err error)
func (*DataBases) GetOldestMsg ¶
func (d *DataBases) GetOldestMsg(ID string) (msg *open_im_sdk.MsgData, err error)
func (*DataBases) GetOneMessageAllReactionList ¶
func (*DataBases) GetSendMsgStatus ¶
func (*DataBases) GetSignalInfoFromCacheByClientMsgID ¶
func (d *DataBases) GetSignalInfoFromCacheByClientMsgID(clientMsgID string) (invitationInfo *pbRtc.SignalInviteReq, err error)
func (*DataBases) GetSingleConversationRecvMsgOpt ¶
func (*DataBases) GetSuperGroup ¶
func (d *DataBases) GetSuperGroup(groupID string) (SuperGroup, error)
func (*DataBases) GetSuperGroupByUserID ¶
func (d *DataBases) GetSuperGroupByUserID(userID string) (UserToSuperGroup, error)
func (*DataBases) GetSuperGroupMsgBySeqListMongo ¶
func (*DataBases) GetSuperGroupUserReceiveNotNotifyMessageIDList ¶
func (*DataBases) GetTagSendLogs ¶
func (d *DataBases) GetTagSendLogs(userID string, showNumber, pageNumber int32) ([]TagSendLog, error)
func (*DataBases) GetTokenMapByUidPid ¶
func (*DataBases) GetUserBadgeUnreadCountSum ¶
func (*DataBases) GetUserFriendWorkMoments ¶
func (*DataBases) GetUserGlobalMsgRecvOpt ¶
func (*DataBases) GetUserIDListByTagID ¶
func (*DataBases) GetUserMaxSeq ¶
Get the largest Seq
func (*DataBases) GetUserMinSeq ¶
Get the smallest Seq
func (*DataBases) GetUserMsgListByIndex ¶
func (*DataBases) GetUserSelfWorkMoments ¶
func (d *DataBases) GetUserSelfWorkMoments(userID string, showNumber, pageNumber int32) ([]WorkMoment, error)
func (*DataBases) GetUserWorkMoments ¶
func (*DataBases) GetWorkMomentByID ¶
func (d *DataBases) GetWorkMomentByID(workMomentID string) (*WorkMoment, error)
func (*DataBases) HandleSignalInfo ¶
func (*DataBases) IncrGroupMaxSeq ¶
func (*DataBases) IncrUserBadgeUnreadCountSum ¶
func (*DataBases) IncrUserSeq ¶
Perform seq auto-increment operation of user messages
func (*DataBases) InsertExtendMsg ¶
first modify msg
func (*DataBases) InsertOrUpdateReactionExtendMsgSet ¶
func (d *DataBases) InsertOrUpdateReactionExtendMsgSet(sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*server_api_params.KeyValue) error
insert or update
func (*DataBases) JudgeAccountEXISTS ¶
func (*DataBases) JudgeMessageReactionEXISTS ¶
func (*DataBases) LikeOneWorkMoment ¶
func (d *DataBases) LikeOneWorkMoment(likeUserID, userName, workMomentID string) (*WorkMoment, bool, error)
func (*DataBases) LockMessageTypeKey ¶
func (*DataBases) MgoUserCount ¶
func (*DataBases) RemoveGroupFromUser ¶
func (*DataBases) RemoverUserFromSuperGroup ¶
func (*DataBases) ReplaceMsgByIndex ¶
func (*DataBases) ReplaceMsgBySeq ¶
func (*DataBases) ReplaceMsgToBlankByIndex ¶
func (*DataBases) SaveTagSendLog ¶
func (d *DataBases) SaveTagSendLog(tagSendLog *TagSendLog) error
func (*DataBases) SaveUserChat ¶
func (*DataBases) SaveUserChatMongo2 ¶
func (*DataBases) SetAccountCode ¶
func (*DataBases) SetFcmToken ¶
func (*DataBases) SetGetuiTaskID ¶
func (*DataBases) SetGetuiToken ¶
func (*DataBases) SetGroupMaxSeq ¶
func (*DataBases) SetGroupMinSeq ¶
func (*DataBases) SetGroupUserMinSeq ¶
func (*DataBases) SetMessageReactionExpire ¶
func (*DataBases) SetMessageToCache ¶
func (*DataBases) SetMessageTypeKeyValue ¶
func (*DataBases) SetSendMsgStatus ¶
func (*DataBases) SetSingleConversationRecvMsgOpt ¶
func (*DataBases) SetSuperGroupUserReceiveNotNotifyMessage ¶
func (*DataBases) SetSuperGroupUserReceiveNotifyMessage ¶
func (*DataBases) SetTokenMapByUidPid ¶
func (*DataBases) SetUserBadgeUnreadCountSum ¶
func (*DataBases) SetUserGlobalMsgRecvOpt ¶
func (*DataBases) SetUserMaxSeq ¶
set the largest Seq
func (*DataBases) SetUserMinSeq ¶
Set the user's minimum seq
func (*DataBases) SetUserWorkMomentsLevel ¶
func (*DataBases) UnLockMessageTypeKey ¶
func (*DataBases) UpdateOneMsgList ¶
type Department ¶
type Department struct { DepartmentID string `gorm:"column:department_id;primary_key;size:64" json:"departmentID"` FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"` Name string `gorm:"column:name;size:256" json:"name" binding:"required"` ParentID string `gorm:"column:parent_id;size:64" json:"parentID" binding:"required"` // "0" or Real parent id Order int32 `gorm:"column:order" json:"order" ` // 1, 2, ... DepartmentType int32 `gorm:"column:department_type" json:"departmentType"` //1, 2... RelatedGroupID string `gorm:"column:related_group_id;size:64" json:"relatedGroupID"` CreateTime time.Time `gorm:"column:create_time" json:"createTime"` Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"` }
func (Department) TableName ¶
func (Department) TableName() string
type DepartmentMember ¶
type DepartmentMember struct { UserID string `gorm:"column:user_id;primary_key;size:64"` DepartmentID string `gorm:"column:department_id;primary_key;size:64"` Order int32 `gorm:"column:order" json:"order"` //1,2 Position string `gorm:"column:position;size:256" json:"position"` Leader int32 `gorm:"column:leader" json:"leader"` //-1, 1 Status int32 `gorm:"column:status" json:"status"` //-1, 1 CreateTime time.Time `gorm:"column:create_time"` Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"` }
func (DepartmentMember) TableName ¶
func (DepartmentMember) TableName() string
type ExtendMsg ¶
type ExtendMsg struct { ReactionExtensionList map[string]KeyValue `bson:"reaction_extension_list" json:"reactionExtensionList"` ClientMsgID string `bson:"client_msg_id" json:"clientMsgID"` MsgFirstModifyTime int64 `bson:"msg_first_modify_time" json:"msgFirstModifyTime"` // this extendMsg create time AttachedInfo string `bson:"attached_info" json:"attachedInfo"` Ex string `bson:"ex" json:"ex"` }
type ExtendMsgSet ¶
type ExtendMsgSet struct { SourceID string `bson:"source_id" json:"sourceID"` SessionType int32 `bson:"session_type" json:"sessionType"` ExtendMsgs map[string]ExtendMsg `bson:"extend_msgs" json:"extendMsgs"` ExtendMsgNum int32 `bson:"extend_msg_num" json:"extendMsgNum"` CreateTime int64 `bson:"create_time" json:"createTime"` // this block's create time MaxMsgUpdateTime int64 `bson:"max_msg_update_time" json:"maxMsgUpdateTime"` // index find msg }
type Friend ¶
type Friend struct { OwnerUserID string `gorm:"column:owner_user_id;primary_key;size:64"` FriendUserID string `gorm:"column:friend_user_id;primary_key;size:64"` Remark string `gorm:"column:remark;size:255"` CreateTime time.Time `gorm:"column:create_time"` AddSource int32 `gorm:"column:add_source"` OperatorUserID string `gorm:"column:operator_user_id;size:64"` Ex string `gorm:"column:ex;size:1024"` }
message FriendInfo{ string OwnerUserID = 1; string Remark = 2; int64 CreateTime = 3; UserInfo FriendUser = 4; int32 AddSource = 5; string OperatorUserID = 6; string Ex = 7; } open_im_sdk.FriendInfo(FriendUser) != imdb.Friend(FriendUserID)
type FriendRequest ¶
type FriendRequest struct { FromUserID string `gorm:"column:from_user_id;primary_key;size:64"` ToUserID string `gorm:"column:to_user_id;primary_key;size:64"` HandleResult int32 `gorm:"column:handle_result"` ReqMsg string `gorm:"column:req_msg;size:255"` CreateTime time.Time `gorm:"column:create_time"` HandlerUserID string `gorm:"column:handler_user_id;size:64"` HandleMsg string `gorm:"column:handle_msg;size:255"` HandleTime time.Time `gorm:"column:handle_time"` Ex string `gorm:"column:ex;size:1024"` }
message FriendRequest{ string FromUserID = 1; string ToUserID = 2; int32 HandleResult = 3; string ReqMsg = 4; int64 CreateTime = 5; string HandlerUserID = 6; string HandleMsg = 7; int64 HandleTime = 8; string Ex = 9; } open_im_sdk.FriendRequest(nickname, farce url ...) != imdb.FriendRequest
func (FriendRequest) TableName ¶
func (FriendRequest) TableName() string
type GetAllExtendMsgSetOpts ¶
type GetAllExtendMsgSetOpts struct {
ExcludeExtendMsgs bool
}
type Group ¶
type Group struct { //`json:"operationID" binding:"required"` //`protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` `json:"operationID" binding:"required"` GroupID string `gorm:"column:group_id;primary_key;size:64" json:"groupID" binding:"required"` GroupName string `gorm:"column:name;size:255" json:"groupName"` Notification string `gorm:"column:notification;size:255" json:"notification"` Introduction string `gorm:"column:introduction;size:255" json:"introduction"` FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"` CreateTime time.Time `gorm:"column:create_time;index:create_time"` Ex string `gorm:"column:ex" json:"ex;size:1024" json:"ex"` Status int32 `gorm:"column:status"` CreatorUserID string `gorm:"column:creator_user_id;size:64"` GroupType int32 `gorm:"column:group_type"` NeedVerification int32 `gorm:"column:need_verification"` LookMemberInfo int32 `gorm:"column:look_member_info" json:"lookMemberInfo"` ApplyMemberFriend int32 `gorm:"column:apply_member_friend" json:"applyMemberFriend"` NotificationUpdateTime time.Time `gorm:"column:notification_update_time"` NotificationUserID string `gorm:"column:notification_user_id;size:64"` }
message GroupInfo{ string GroupID = 1; string GroupName = 2; string Notification = 3; string Introduction = 4; string FaceUrl = 5; string OwnerUserID = 6; uint32 MemberCount = 8; int64 CreateTime = 7; string Ex = 9; int32 Status = 10; string CreatorUserID = 11; int32 GroupType = 12; }
open_im_sdk.GroupInfo (OwnerUserID , MemberCount )> imdb.Group
type GroupMember ¶
type GroupMember struct { GroupID string `gorm:"column:group_id;primary_key;size:64"` UserID string `gorm:"column:user_id;primary_key;size:64"` Nickname string `gorm:"column:nickname;size:255"` FaceURL string `gorm:"column:user_group_face_url;size:255"` RoleLevel int32 `gorm:"column:role_level"` JoinTime time.Time `gorm:"column:join_time"` JoinSource int32 `gorm:"column:join_source"` InviterUserID string `gorm:"column:inviter_user_id;size:64"` OperatorUserID string `gorm:"column:operator_user_id;size:64"` MuteEndTime time.Time `gorm:"column:mute_end_time"` Ex string `gorm:"column:ex;size:1024"` }
message GroupMemberFullInfo { string GroupID = 1 ; string UserID = 2 ; int32 roleLevel = 3; int64 JoinTime = 4; string NickName = 5; string FaceUrl = 6; int32 JoinSource = 8; string OperatorUserID = 9; string Ex = 10; int32 AppMangerLevel = 7; //if >0 } open_im_sdk.GroupMemberFullInfo(AppMangerLevel) > imdb.GroupMember
type GroupMember_x ¶
type GroupRequest ¶
type GroupRequest struct { UserID string `gorm:"column:user_id;primary_key;size:64"` GroupID string `gorm:"column:group_id;primary_key;size:64"` HandleResult int32 `gorm:"column:handle_result"` ReqMsg string `gorm:"column:req_msg;size:1024"` HandledMsg string `gorm:"column:handle_msg;size:1024"` ReqTime time.Time `gorm:"column:req_time"` HandleUserID string `gorm:"column:handle_user_id;size:64"` HandledTime time.Time `gorm:"column:handle_time"` JoinSource int32 `gorm:"column:join_source"` InviterUserID string `gorm:"column:inviter_user_id;size:64"` Ex string `gorm:"column:ex;size:1024"` }
message GroupRequest{ string UserID = 1; string GroupID = 2; string HandleResult = 3; string ReqMsg = 4; string HandleMsg = 5; int64 ReqTime = 6; string HandleUserID = 7; int64 HandleTime = 8; string Ex = 9; }open_im_sdk.GroupRequest == imdb.GroupRequest
type Invitation ¶
type IpLimit ¶
type IpLimit struct { Ip string `gorm:"column:ip;primary_key;size:15"` LimitRegister int32 `gorm:"column:limit_register;size:1"` LimitLogin int32 `gorm:"column:limit_login;size:1"` CreateTime time.Time `gorm:"column:create_time"` LimitTime time.Time `gorm:"column:limit_time"` }
ip limit login
type OrganizationUser ¶
type OrganizationUser struct { UserID string `gorm:"column:user_id;primary_key;size:64"` Nickname string `gorm:"column:nickname;size:256"` EnglishName string `gorm:"column:english_name;size:256"` FaceURL string `gorm:"column:face_url;size:256"` Gender int32 `gorm:"column:gender"` //1 ,2 Mobile string `gorm:"column:mobile;size:32"` Telephone string `gorm:"column:telephone;size:32"` Birth time.Time `gorm:"column:birth"` Email string `gorm:"column:email;size:64"` CreateTime time.Time `gorm:"column:create_time"` Ex string `gorm:"column:ex;size:1024"` }
func (OrganizationUser) TableName ¶
func (OrganizationUser) TableName() string
type RedisClient ¶
type RedisClient struct { go_redis.UniversalClient // contains filtered or unexported fields }
type Register ¶
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)"` }
type RegisterAddFriend ¶
type RegisterAddFriend struct {
UserID string `gorm:"column:user_id;primary_key;size:64"`
}
func (RegisterAddFriend) TableName ¶
func (RegisterAddFriend) TableName() string
type SuperGroup ¶
type TagSendLog ¶
type User ¶
type User struct { UserID string `gorm:"column:user_id;primary_key;size:64"` Nickname string `gorm:"column:name;size:255"` FaceURL string `gorm:"column:face_url;size:255"` Gender int32 `gorm:"column:gender"` PhoneNumber string `gorm:"column:phone_number;size:32"` Birth time.Time `gorm:"column:birth"` Email string `gorm:"column:email;size:64"` Ex string `gorm:"column:ex;size:1024"` CreateTime time.Time `gorm:"column:create_time;index:create_time"` AppMangerLevel int32 `gorm:"column:app_manger_level"` GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"` // contains filtered or unexported fields }
string UserID = 1; string Nickname = 2; string FaceUrl = 3; int32 Gender = 4; string PhoneNumber = 5; string Birth = 6; string Email = 7; string Ex = 8; string CreateIp = 9; int64 CreateTime = 10; int32 AppMangerLevel = 11; open_im_sdk.User == imdb.User
type UserIpLimit ¶
type UserIpLimit struct { UserID string `gorm:"column:user_id;primary_key;size:64"` Ip string `gorm:"column:ip;primary_key;size:15"` CreateTime time.Time `gorm:"column:create_time"` }
ip login
type UserIpRecord ¶
type UserToSuperGroup ¶
type WorkMoment ¶
type WorkMoment struct { WorkMomentID string `bson:"work_moment_id"` UserID string `bson:"user_id"` UserName string `bson:"user_name"` FaceURL string `bson:"face_url"` Content string `bson:"content"` LikeUserList []*WorkMomentUser `bson:"like_user_list"` AtUserList []*WorkMomentUser `bson:"at_user_list"` PermissionUserList []*WorkMomentUser `bson:"permission_user_list"` Comments []*Comment `bson:"comments"` PermissionUserIDList []string `bson:"permission_user_id_list"` Permission int32 `bson:"permission"` CreateTime int32 `bson:"create_time"` }