Versions in this module Expand all Collapse all v1 v1.0.1 Sep 3, 2018 v1.0.0 Aug 19, 2018 Changes in this version + const DefaultIDLength + const MinIDLength + var ErrNoToken = errors.New("no session token") + var ErrUnsupportedTokenType = errors.New("unsupported session token type") + func NewRedisPool(addr string, testAfterIdle time.Duration) *redis.Pool + type ID interface + Len func() int + String func() string + type Manager interface + BeginSession func(w http.ResponseWriter, sessionState interface{}) (Token, error) + EndSession func(r *http.Request) error + GetState func(r *http.Request, sessionState interface{}) (Token, error) + GetToken func(r *http.Request) (Token, error) + UpdateState func(token Token, sessionState interface{}) error + func NewManager(idLength int, signingKeys []string, store Store) Manager + type RedisStore struct + SessionDuration time.Duration + func NewRedisStore(pool *redis.Pool, sessionDuration time.Duration) *RedisStore + func (rs *RedisStore) Delete(token Token) error + func (rs *RedisStore) Get(token Token, sessionState interface{}) error + func (rs *RedisStore) Save(token Token, sessionState interface{}) error + type Store interface + Delete func(token Token) error + Get func(token Token, sessionState interface{}) error + Save func(token Token, sessionState interface{}) error + type Token interface + ID func() ID + String func() string + func NewToken(signingKey []byte) (Token, error) + func NewTokenOfLength(signingKey []byte, idLength int) (Token, error) + func VerifyToken(b64token string, signingKey []byte) (Token, error)