Versions in this module Expand all Collapse all v0 v0.1.0 Jan 6, 2023 Changes in this version + const ErrEmptyToken + const ErrEmptyValueKey + const ErrPropertyNotFound + const ErrSessionNotFound + type SessionManager struct + Lifetime time.Duration + Store Store + TokenLength uint + func New(pool *redis.Pool) *SessionManager + func (sm *SessionManager) DeleteValue(token, key string) error + func (sm *SessionManager) DestroySession(token string) error + func (sm *SessionManager) GetValue(token, key string) (any, error) + func (sm *SessionManager) InitSession() (string, error) + func (sm *SessionManager) RenewToken(token string) (newToken string, err error) + func (sm *SessionManager) RetrieveSession(token string) (map[string]any, time.Time, error) + func (sm *SessionManager) SetValue(token, key string, v any) error + type Store interface + Delete func(token string) error + Insert func(token string, data []byte, expiry time.Time) error + Retrieve func(token string) (data []byte, err error)