mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
getui
This commit is contained in:
@@ -14,6 +14,7 @@ const (
|
||||
userMinSeq = "REDIS_USER_MIN_SEQ:"
|
||||
uidPidToken = "UID_PID_TOKEN_STATUS:"
|
||||
conversationReceiveMessageOpt = "CON_RECV_MSG_OPT:"
|
||||
GetuiToken = "GETUI"
|
||||
)
|
||||
|
||||
func (d *DataBases) Exec(cmd string, key interface{}, args ...interface{}) (interface{}, error) {
|
||||
@@ -144,3 +145,13 @@ func (d *DataBases) GetMultiConversationMsgOpt(userID string, conversationIDs []
|
||||
return m, nil
|
||||
|
||||
}
|
||||
|
||||
func (d *DataBases) SetGetuiToken(token string, expireTime int64) error {
|
||||
_, err := d.Exec("SET", GetuiToken, token, "ex", expireTime)
|
||||
return err
|
||||
}
|
||||
|
||||
func (d *DataBases) GetGetuiToken() (string, error) {
|
||||
result, err := redis.String(d.Exec("GET", GetuiToken))
|
||||
return result, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user