mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
25 lines
637 B
Go
25 lines
637 B
Go
package cachekey
|
|
|
|
const (
|
|
FriendIDsKey = "FRIEND_IDS:"
|
|
TwoWayFriendsIDsKey = "COMMON_FRIENDS_IDS:"
|
|
FriendKey = "FRIEND_INFO:"
|
|
IsFriendKey = "IS_FRIEND:" // local cache key
|
|
)
|
|
|
|
func GetFriendIDsKey(ownerUserID string) string {
|
|
return FriendIDsKey + ownerUserID
|
|
}
|
|
|
|
func GetTwoWayFriendsIDsKey(ownerUserID string) string {
|
|
return TwoWayFriendsIDsKey + ownerUserID
|
|
}
|
|
|
|
func GetFriendKey(ownerUserID, friendUserID string) string {
|
|
return FriendKey + ownerUserID + "-" + friendUserID
|
|
}
|
|
|
|
func GetIsFriendKey(possibleFriendUserID, userID string) string {
|
|
return IsFriendKey + possibleFriendUserID + "-" + userID
|
|
}
|