ldap-client-0.4.2: Pure Haskell LDAP Client Library

Safe HaskellNone
LanguageHaskell2010

Ldap.Client.Extended

Contents

Description

Extended operation.

This operation comes in four flavours:

Of those, the first one (extended) is probably the most useful for the typical usecase.

Synopsis

Extended Operation

newtype Oid Source #

Globally unique LDAP object identifier.

Constructors

Oid Text 
Instances
Eq Oid Source # 
Instance details

Defined in Ldap.Client.Extended

Methods

(==) :: Oid -> Oid -> Bool #

(/=) :: Oid -> Oid -> Bool #

Show Oid Source # 
Instance details

Defined in Ldap.Client.Extended

Methods

showsPrec :: Int -> Oid -> ShowS #

show :: Oid -> String #

showList :: [Oid] -> ShowS #

IsString Oid Source # 
Instance details

Defined in Ldap.Client.Extended

Methods

fromString :: String -> Oid #

extended :: Ldap -> Oid -> Maybe ByteString -> IO () Source #

Perform the Extended operation synchronously. Raises ResponseError on failures.

extendedEither :: Ldap -> Oid -> Maybe ByteString -> IO (Either ResponseError ()) Source #

Perform the Extended operation synchronously. Returns Left e where e is a ResponseError on failures.

extendedAsync :: Ldap -> Oid -> Maybe ByteString -> IO (Async ()) Source #

Perform the Extended operation asynchronously. Call wait to wait for its completion.

extendedAsyncSTM :: Ldap -> Oid -> Maybe ByteString -> STM (Async ()) Source #

Perform the Extended operation asynchronously.

Don't wait for its completion (with waitSTM) in the same transaction you've performed it in.

StartTLS Operation

startTls :: Ldap -> IO () Source #

An example of Extended Operation, cf. extended.

startTlsEither :: Ldap -> IO (Either ResponseError ()) Source #

An example of Extended Operation, cf. extendedEither.

startTlsAsync :: Ldap -> IO (Async ()) Source #

An example of Extended Operation, cf. extendedAsync.

startTlsAsyncSTM :: Ldap -> STM (Async ()) Source #

An example of Extended Operation, cf. extendedAsyncSTM.

OIDs

data Async a Source #

Asynchronous LDAP operation. Use wait or waitSTM to wait for its completion.

Instances
Functor Async Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

fmap :: (a -> b) -> Async a -> Async b #

(<$) :: a -> Async b -> Async a #

wait :: Async a -> IO (Either ResponseError a) Source #

Wait for operation completion.

waitSTM :: Async a -> STM (Either ResponseError a) Source #

Wait for operation completion inside STM.

Do not use this inside the same STM transaction the operation was requested in! To give LDAP the chance to respond to it that transaction should commit. After that, applying waitSTM to the corresponding Async starts to make sense.