servant-auth-token-0.1.2.0: Servant based API and server for token based authorisation

Copyright(c) Anton Gushcha, 2016
LicenseMIT
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Servant.Server.Auth.Token.Common

Description

 

Synopsis

Documentation

showb :: Show a => a -> ByteString Source

Helper to print a value to lazy bytestring

showt :: Show a => a -> Text Source

Helper to print a value to text

whenNothing :: Applicative m => Maybe a -> m () -> m () Source

Do something when first value is Nothing

whenJust :: Applicative m => Maybe a -> (a -> m ()) -> m () Source

Do something when first value is Just

fromKey :: (Integral a, ToBackendKey SqlBackend record) => Key record -> a Source

Shortcut to convert sql key

toKey :: (Integral a, ToBackendKey SqlBackend record) => a -> Key record Source

Shortcut to convert sql key