Spock-0.8.0.0: Another Haskell web framework for rapid development

Safe HaskellNone
LanguageHaskell98

Web.Spock.Internal.SessionVault

Synopsis

Documentation

class (Eq (SessionKey s), Hashable (SessionKey s)) => IsSession s where Source

Associated Types

type SessionKey s :: * Source

newtype SessionVault s Source

Constructors

SessionVault 

Fields

unSessionVault :: Map (SessionKey s) s
 

newSessionVault :: IsSession s => STM (SessionVault s) Source

Create a new session vault

loadSession :: IsSession s => SessionKey s -> SessionVault s -> STM (Maybe s) Source

Load a session

storeSession :: IsSession s => s -> SessionVault s -> STM () Source

Store a session, overwriting any previous values

deleteSession :: IsSession s => SessionKey s -> SessionVault s -> STM () Source

Removea session

toList :: IsSession s => SessionVault s -> STM [s] Source

Get all sessions as list

filterSessions :: IsSession s => (s -> Bool) -> SessionVault s -> STM () Source

Remove all sessions that do not match the predicate