Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStore ¶
RedisStore represents the session store.
func New ¶
func New(redis *redis.Redis) *RedisStore
New returns a new RedisStore instance. The pool parameter should be a pointer to a redigo connection pool. See https://godoc.org/github.com/gomodule/redigo/redis#Pool.
func NewWithPrefix ¶
func NewWithPrefix(redis *redis.Redis, prefix string) *RedisStore
NewWithPrefix returns a new RedisStore instance. The pool parameter should be a pointer to a redigo connection pool. The prefix parameter controls the Redis key prefix, which can be used to avoid naming clashes if necessary.
func (*RedisStore) Commit ¶
Commit adds a session token and data to the RedisStore instance with the given expiry time. If the session token already exists then the data and expiry time are updated.
func (*RedisStore) Delete ¶
func (r *RedisStore) Delete(token string) error
Delete removes a session token and corresponding data from the RedisStore instance.