Documentation
¶
Index ¶
- Variables
- func AcceptFriend(userId, friendId, source string, addTime int64) error
- func AcceptFriendApply(userId, friendId string) (int64, error)
- func AddMember(tx types.Tx, userId, roomId string, memberLevel int, id, createTime int64, ...) error
- func AddMutedMember(id int64, roomId, userId string, mutedType int, deadline int64) error
- func AddPrivateChatLog(log *types.PrivateLog) (int64, error)
- func AlertRoomRevStateByRevId(Id string, state int) error
- func AppendApplyLog(targetId, userId, applyReason, source, remark string, state, tp int, ...) (int64, error)
- func AppendMemberRevLog(id int64, userId, logId string, state int) error
- func AppendRoomChatLog(logId int64, userId, roomId, msgId string, msgType, isSnap int, ...) error
- func ApproveChangeStateStep(tx types.Tx, logId int64, status int) (bool, error)
- func CheckFriendApplyExists(userId, friendId string) (bool, error)
- func CheckIsFriend(userId, friendId string) (bool, error)
- func ClearDeviceToken(userId string) error
- func ClearMutedList(tx types.Tx, roomId string) error
- func CreateNewRoom(tx types.Tx, roomId int64, creater, roomName, roomAvatar string, ...) error
- func DelMemberMuted(roomId, userId string) error
- func DelPrivateChatLog(logId string) (int, error)
- func DelRoomChatLogById(logId string) error
- func DeleteFriend(userId, friendId string, alterTime int64) error
- func DeleteRoomInfoById(roomId string) error
- func DeleteRoomMemberById(userId, roomId string) (bool, error)
- func FindAddFriendConfByUserId(userId string) (*types.AddFriendConf, error)
- func FindApplyLogById(logId int64) (*types.Apply, error)
- func FindApplyLogByUserAndTarget(applyUser, target string, tp int) (*types.Apply, error)
- func FindDeletedFriends(userId string) ([]string, error)
- func FindFriendById(userID, friendID string) (*types.FriendJoinUser, error)
- func FindFriends(userId string) ([]string, error)
- func FindFriendsAfterTime(userId string, commonUse int, time int64) ([]*types.FriendJoinUser, error)
- func FindFriendsFilterByCommonUse(userId string, commonUse int) ([]*types.FriendJoinUser, error)
- func FindNotBurnedLogsAfter(userId string, isDel int, time int64) ([]*types.PrivateLogJoinUser, error)
- func FindNotBurnedLogsBetween(userId string, isDel int, begin, end int64) ([]*types.PrivateLogJoinUser, error)
- func FindPrivateChatLogById(id string) (*types.PrivateLogJoinUser, error)
- func FindPrivateChatLogs(userId, friendId string, start int64, number int) (int64, []*types.PrivateLogJoinUser, error)
- func FindReceiveLogById(logId, userId string) (*types.RoomMsgReceive, error)
- func FindRoomChatLogByContentId(logId string) (*types.RoomLogJoinUser, error)
- func FindRoomChatLogByMsgId(senderId, msgId string) (*types.RoomLogJoinUser, error)
- func FindRoomMemberById(roomId, userId string, isDel int) (*types.MemberJoinUser, error)
- func FindSessionKeyAlert(userId string, endTime int64) ([]*types.PrivateLogJoinUser, error)
- func FindSetNoDisturbingMembers(roomId string) ([]*types.RoomMember, error)
- func FindUserIdByDeviceToken(deviceToken string) (string, string, error)
- func GetAddFriendApplyLog(userId, friendId string) (*types.Apply, error)
- func GetCreateRoomsLimit(appId string, level int) (int, error)
- func GetLoginLog(userId string, devices []string) (*types.LoginLog, error)
- func GetMutedListByType(roomId string, mutedType int) ([]*types.RoomUserMuted, error)
- func GetOrderById(serverUrl, orderId string) (*types.Order, error)
- func GetPraiseStatic(tp int, startTime, endTime int64) (map[string]*types.RankingItem, error)
- func GetRoomManagerAndMaster(roomId string) ([]*types.MemberJoinUser, error)
- func GetRoomMemberName(roomId, userId string) (string, error)
- func GetRoomMembersLimit(appId string, level int) (int, error)
- func GetRoomMutedType(roomId string, isDel int) (int, error)
- func GetRoomUserLevel(roomId, userId string, isDel int) (int, error)
- func GetRoomUserMuted(roomId, userId string) (mutedType int, deadline int64)
- func GetToken(appId, token string) (*user_model.Token, error)
- func GetUserInfoByField(appId, field, value string) (*types.User, error)
- func GetUserInfoById(id string) (*types.User, error)
- func InsertLoginLog(userID, deviceType, deviceName, loginType, uuid, version string, ...) (int64, error)
- func IsNeedConfirm(userId string, state int) error
- func RoomInviteConfirm(userId string) (*types.InviteRoomConf, error)
- func SavePraiseStatic(tp int, items map[string]*types.RankingItem, startTime, endTime int64) error
- func SaveToken(tokenInfo *user_model.Token) error
- func SearchRoomInfo(roomid string, isDel int) (*types.Room, error)
- func SetAvatar(roomId, avatar string, isDel int) (bool, error)
- func SetCreateRoomsLimit(appId string, level, limit int) error
- func SetFriendDND(userId, friendId string, DND int) error
- func SetFriendExtRemark(userId, friendId, remark string) error
- func SetFriendIsBlock(userId, friendId string, state int, alterTime int64) error
- func SetFriendIsTop(userId, friendId string, isTop int) error
- func SetFriendRemark(userId, friendId, remark string) error
- func SetMemberLevel(userId, roomId string, level, isDel int) error
- func SetMemberNickname(userId, roomId string, nickname string, isDel int) error
- func SetNeedAnswer(userId, question, answer string) error
- func SetNewMaster(master, userId, roomId string, level int) error
- func SetNoDisturbing(userId, roomId string, permission, isDel int) error
- func SetNotNeedAnswer(userId string) error
- func SetOnTop(userId, roomId string, permission, isDel int) error
- func SetPermission(roomId string, canAddFriend, joinPermission, recordPermission, isDel int) error
- func SetQuestionandAnswer(userId, question, answer string) error
- func SetRoomInviteConfirm(userId string, needConfirm int) error
- func SetRoomMembersLimit(appId string, level, limit int) error
- func SetRoomMutedType(roomId string, mutedType, isDel int) error
- func SetRoomName(roomId, name string, isDel int) (bool, error)
- func SetRoomVerifyed(roomId, vInfo string) error
- func UpdateApply(applyUser, target string, tp int, reason, remark, source string, state int) (int64, error)
- func UpdateDepositAddress(userId, address string) error
- func UpdateDeviceToken(userId, deviceToken, deviceType string) error
- func UpdateEmail(userId, email string) error
- func UpdateInviteCode(userId, code string) error
- func UpdateNowVersion(userId, version string) error
- func UpdatePhone(userId, phone string) error
- func UpdatePrivateLogContentById(logId, content string) error
- func UpdatePrivateLogStateById(logId string, state int) error
- func UpdatePublicKey(userId, publicKey, privateKey string) error
- func UpdateUid(markId, userId, uid string) error
- func UpdateUserAvatar(userId, avatar string) error
- func UpdateUsername(userId, username string) error
- type By
Constants ¶
This section is empty.
Variables ¶
View Source
var UserFieldMap = map[string]func(string, string) (*types.User, error){ "uid": mysql.GetUserInfoByUid, "phone": mysql.GetUserInfoByPhone, "mark_id": mysql.GetUserInfoByMarkId, "account": mysql.GetUserInfoByAccount, }
Functions ¶
func AcceptFriendApply ¶
func AddMember ¶
func AddMember(tx types.Tx, userId, roomId string, memberLevel int, id, createTime int64, source string) error
增加群成员,同时入群申请的第一步 添加user也用这个方法
func AddMutedMember ¶
新增成员禁言
func AppendApplyLog ¶
func AppendMemberRevLog ¶
添加群聊接收日志
func AppendRoomChatLog ¶
func AppendRoomChatLog(logId int64, userId, roomId, msgId string, msgType, isSnap int, content, ext string, time int64) error
添加群聊聊天日志
func ApproveChangeStateStep ¶
func CheckFriendApplyExists ¶
func ClearDeviceToken ¶
func CreateNewRoom ¶
func FindAddFriendConfByUserId ¶
func FindAddFriendConfByUserId(userId string) (*types.AddFriendConf, error)
func FindDeletedFriends ¶
func FindFriendById ¶
func FindFriendById(userID, friendID string) (*types.FriendJoinUser, error)
获取好友信息
func FindFriendsAfterTime ¶
func FindFriendsAfterTime(userId string, commonUse int, time int64) ([]*types.FriendJoinUser, error)
根据是否是常用群筛选
func FindFriendsFilterByCommonUse ¶
func FindFriendsFilterByCommonUse(userId string, commonUse int) ([]*types.FriendJoinUser, error)
根据是否是常用群筛选
func FindNotBurnedLogsAfter ¶
func FindPrivateChatLogById ¶
func FindPrivateChatLogById(id string) (*types.PrivateLogJoinUser, error)
func FindPrivateChatLogs ¶
func FindPrivateChatLogs(userId, friendId string, start int64, number int) (int64, []*types.PrivateLogJoinUser, error)
TODO 未测试
func FindReceiveLogById ¶
func FindReceiveLogById(logId, userId string) (*types.RoomMsgReceive, error)
查找recv群消息
func FindRoomChatLogByContentId ¶
func FindRoomChatLogByContentId(logId string) (*types.RoomLogJoinUser, error)
根据logid查群聊天信息
func FindRoomChatLogByMsgId ¶
func FindRoomChatLogByMsgId(senderId, msgId string) (*types.RoomLogJoinUser, error)
根据senderid和msgid查群聊天信息
func FindRoomMemberById ¶
func FindRoomMemberById(roomId, userId string, isDel int) (*types.MemberJoinUser, error)
根据id查询群成员信息
func FindSessionKeyAlert ¶
func FindSessionKeyAlert(userId string, endTime int64) ([]*types.PrivateLogJoinUser, error)
func FindSetNoDisturbingMembers ¶
func FindSetNoDisturbingMembers(roomId string) ([]*types.RoomMember, error)
查找群中消息免打扰的成员
func FindUserIdByDeviceToken ¶
func GetAddFriendApplyLog ¶
func GetCreateRoomsLimit ¶
获取用户创建群个数上限
func GetMutedListByType ¶
func GetMutedListByType(roomId string, mutedType int) ([]*types.RoomUserMuted, error)
获取某种禁言信息
func GetPraiseStatic ¶
获取赞赏榜单
func GetRoomManagerAndMaster ¶
func GetRoomManagerAndMaster(roomId string) ([]*types.MemberJoinUser, error)
获取群中所有管理员
func GetRoomMemberName ¶
func GetRoomUserLevel ¶
判断用户是否为管理员或者群主
func GetRoomUserMuted ¶
func GetUserInfoByField ¶
根据id获取用户信息
func InsertLoginLog ¶
func IsNeedConfirm ¶
func RoomInviteConfirm ¶
func RoomInviteConfirm(userId string) (*types.InviteRoomConf, error)
func SavePraiseStatic ¶
存储赞赏榜单
func SearchRoomInfo ¶
根据room id获取群信息
func SetCreateRoomsLimit ¶
设置用户创建群个数上限
func SetFriendDND ¶
func SetFriendExtRemark ¶
func SetFriendIsBlock ¶
设置黑名单
func SetFriendIsTop ¶
func SetFriendRemark ¶
func SetMemberNickname ¶
func SetNeedAnswer ¶
func SetNewMaster ¶
转让群主 master原群主id userid新群主id
func SetNoDisturbing ¶
func SetNotNeedAnswer ¶
func SetPermission ¶
set三种permission,写在一起
func SetQuestionandAnswer ¶
func SetRoomInviteConfirm ¶
func SetRoomMutedType ¶
func UpdateApply ¶
func UpdateDeviceToken ¶
func UpdateInviteCode ¶
func UpdateNowVersion ¶
func UpdatePublicKey ¶
Types ¶
type By ¶
type By func(p1, p2 *types.PrivateLogJoinUser) bool
By is the type of a "less" function that defines the ordering of its Planet arguments.
func (By) Sort ¶
func (by By) Sort(logs []*types.PrivateLogJoinUser)
Sort is a method on the function type, By, that sorts the argument slice according to the function.
Click to show internal directories.
Click to hide internal directories.