Example #1
0
func (r *RedisType) MSet(keys map[string]interface{}) (bool, error) {
	params := make([]interface{}, 0)
	for k, v := range keys {
		params = append(params, k)
		params = append(params, v)
	}
	row, err := redis.Bool(r.RedisConn.Do("MSET", params...))
	return row, err
}
Example #2
0
func (r *RedisType) PexpireAt(key string, milliseconds int) (bool, error) {
	row, err := redis.Bool(r.RedisConn.Do("PEXPIREAT", key, milliseconds))
	return row, err
}
Example #3
0
func (r *RedisType) Persist(key string) (bool, error) {
	row, err := redis.Bool(r.RedisConn.Do("PERSIST", key))
	return row, err
}
Example #4
0
func (r *RedisType) Exists(key string) (bool, error) {
	exist, err := redis.Bool(r.RedisConn.Do("EXISTS", key))
	return exist, err
}
Example #5
0
//RESTORE key ttl serialized-value
func (r *RedisType) Restore(key string, ttl int, serialized_value string) (bool, error) {
	row, err := redis.Bool(r.RedisConn.Do("RESTORE", key, ttl, serialized_value))
	return row, err
}
Example #6
0
func (r *RedisType) RenameNX(key, newkey string) (bool, error) {
	row, err := redis.Bool(r.RedisConn.Do("RENAMENX", key, newkey))
	return row, err
}
Example #7
0
func (r *RedisType) Pttl(key string) (bool, error) {
	row, err := redis.Bool(r.RedisConn.Do("PTTL", key))
	return row, err
}
Example #8
0
func (r *RedisType) SIsMember(key string, member interface{}) (bool, error) {
	row, err := redis.Bool(r.RedisConn.Do("SISMEMBER", key, member))
	return row, err
}
Example #9
0
func (r *RedisType) SetEx(key string, value interface{}, seconds interface{}) (bool, error) {
	row, err := redis.Bool(r.RedisConn.Do("SETEX", key, seconds, value))
	return row, err
}