func (r *RedisStorer) Get(key string) (value string, err error) {
	val, err := r.client.Get(key).Result()
	if err == redis.Nil {
		return "", errNoSession{}
	} else if err != nil {
		return "", errors.Wrap(err, "unable to get session")
	}
	return val, nil
}
Get returns the value string saved in the session pointed to by the
session id key.
package abcsessions
import (
	"time"
	"github.com/friendsofgo/errors"
	redis "gopkg.in/redis.v5"
)
type RedisStorer struct {
	maxAge time.Duration
	client *redis.Client
}
func NewDefaultRedisStorer(addr, password string, db int) (*RedisStorer, error) {
	if addr == "" {
		addr = "localhost:6379"
	}
	opts := redis.Options{
		Addr:     addr,
		Password: password,
		DB:       db,
	}
	return NewRedisStorer(opts, time.Hour*24*2)
}
func NewRedisStorer(opts redis.Options, maxAge time.Duration) (*RedisStorer, error) {
	r := &RedisStorer{
		maxAge: maxAge,
		client: redis.NewClient(&opts),
	}
	return r, nil
}
func (r *RedisStorer) All() ([]string, error) {
	var sessions []string
	iter := r.client.Scan(0, "", 0).Iterator()
	for iter.Next() {
		sessions = append(sessions, iter.Val())
	}
	err := iter.Err()
	return sessions, errors.Wrap(err, "unable to iterate redis store")
}