Documentation ¶
Index ¶
- Constants
- type 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
Constants ¶
View Source
const ( ErrSessionNotFound = managerError("session not found") ErrPropertyNotFound = managerError("property not found") ErrEmptyToken = managerError("the provided token is empty") ErrEmptyValueKey = managerError("the provided value key is empty") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionManager ¶
func New ¶
func New(pool *redis.Pool) *SessionManager
func (*SessionManager) DeleteValue ¶
func (sm *SessionManager) DeleteValue(token, key string) error
func (*SessionManager) DestroySession ¶
func (sm *SessionManager) DestroySession(token string) error
func (*SessionManager) GetValue ¶
func (sm *SessionManager) GetValue(token, key string) (any, error)
func (*SessionManager) InitSession ¶
func (sm *SessionManager) InitSession() (string, error)
func (*SessionManager) RenewToken ¶
func (sm *SessionManager) RenewToken(token string) (newToken string, err error)
func (*SessionManager) RetrieveSession ¶
Click to show internal directories.
Click to hide internal directories.