servant-auth-token-0.5.0.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.Patch

Description

 

Synopsis

Documentation

withPatch :: Monad m => Maybe a -> (a -> b -> m b) -> b -> m b Source #

Helper for implementation of HasPatch

withPatch' :: Maybe a -> (a -> b -> b) -> b -> b Source #

Helper for implementation of HasPatch

withNullPatch Source #

Arguments

:: Monad m 
=> Maybe Bool

If this is 'Just true' then execute following updater

-> (b -> m b)

Updater when previous value is 'Just true'

-> Maybe a

If the value is Just and the first parameter is Nothing then execute following updater

-> (a -> b -> m b)

Main updater

-> b 
-> m b 

Helper to implement patch with nullable flag

withNullPatch' Source #

Arguments

:: Maybe Bool

If this is 'Just true' then execute following updater

-> (b -> b)

Updater when previous value is 'Just true'

-> Maybe a

If the value is Just and the first parameter is Nothing then execute following updater

-> (a -> b -> b)

Main updater

-> b 
-> b 

Helper to implement patch with nullable flag