Documentation ¶
Overview ¶
*
* * @author liangjf * @create on 2020/6/4 * @version 1.0
*
* * @author liangjf * @create on 2020/6/4 * @version 1.0
Index ¶
- type IModels
- type RedisModel
- func (m *RedisModel) DeleteAppUUID(uuid string, appTag string) error
- func (m *RedisModel) DeleteExpireMsg(uuid string, msgId string) error
- func (m *RedisModel) DeleteGatewayUUID(uuid string) error
- func (m *RedisModel) GetAppUUID(appTag string) ([]string, error)
- func (m *RedisModel) GetGatewayUUID(uuid string) (string, error)
- func (m *RedisModel) Init() error
- func (m *RedisModel) SaveAppUUID(uuid string, appTag string) error
- func (m *RedisModel) SaveExpireMsg(uuid string, msgId string, msg string, expireTime int64) error
- func (m *RedisModel) SaveGatewayUUID(uuid string, gatewayAddr string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IModels ¶
type IModels interface { //初始化 Init() error //保存网关uuid映射 SaveGatewayUUID(string, string) error //保存App和uuid映射 SaveAppUUID(string, string) error //保存离线消息 SaveExpireMsg(string, string, string, int64) error //删除网关uuid映射 DeleteGatewayUUID(string) error //删除AppTag和uuid映射 DeleteAppUUID(string, string) error //删除离线消息 DeleteExpireMsg(string, string) error //获取网关uuid映射 GetGatewayUUID(string) (string, error) //获取App和uuid映射 GetAppUUID(string) ([]string, error) }
func NewRedisModel ¶
type RedisModel ¶
type RedisModel struct {
// contains filtered or unexported fields
}
func (*RedisModel) DeleteAppUUID ¶
func (m *RedisModel) DeleteAppUUID(uuid string, appTag string) error
DeleteAppUUID 删除AppTag和uuid映射
func (*RedisModel) DeleteExpireMsg ¶
func (m *RedisModel) DeleteExpireMsg(uuid string, msgId string) error
DeleteExpireMsg 删除离线消息
func (*RedisModel) DeleteGatewayUUID ¶
func (m *RedisModel) DeleteGatewayUUID(uuid string) error
DeleteGatewayUUID 删除网关uuid映射
func (*RedisModel) GetAppUUID ¶
func (m *RedisModel) GetAppUUID(appTag string) ([]string, error)
获取App和uuid映射
func (*RedisModel) GetGatewayUUID ¶
func (m *RedisModel) GetGatewayUUID(uuid string) (string, error)
获取网关uuid映射
func (*RedisModel) SaveAppUUID ¶
func (m *RedisModel) SaveAppUUID(uuid string, appTag string) error
SaveAppUUID 保存App和uuid映射
func (*RedisModel) SaveExpireMsg ¶
SaveExpireMsg 保存离线消息
func (*RedisModel) SaveGatewayUUID ¶
func (m *RedisModel) SaveGatewayUUID(uuid string, gatewayAddr string) error
SaveGatewayUUID 保存网关uuid映射
Click to show internal directories.
Click to hide internal directories.