Module
Biscotti.Session
- Package
- purescript-biscotti-session
- Repository
- drewolson/purescript-biscotti-session
Session provides 4 basic functions: create, get, set and destroy.
createtakes aSessionStoreand your session data and returns a Cookie representing your new session.gettakes aSessionStoreand aCookieand returns your session data, if available.settakes aSessionStore, your session data and your current sessionCookie. It returns a new sessionCookie.destroytakes aSessionStoreand your sessionCookieand returns a new, empty sessionCookie.
#cookieStore Source
cookieStore :: forall a. DecodeJson a => EncodeJson a => String -> String -> SessionStore a#memoryStore Source
memoryStore :: forall a. DecodeJson a => EncodeJson a => String -> Effect (SessionStore a)Re-exports from Biscotti.Session.Store
#SessionStore Source
newtype SessionStore a#set Source
set :: forall a. EncodeJson a => SessionStore a -> Setter aUpdate a cookie to represent a new session
#get Source
get :: forall a. DecodeJson a => SessionStore a -> Getter aRetrieve the session represented by a cookie
#destroy Source
destroy :: forall a. EncodeJson a => SessionStore a -> DestroyerDestroy the session represented by a cookie and expire the cookie
#create Source
create :: forall a. EncodeJson a => SessionStore a -> Creater aCreate a cookie representing a new session