ldap-client-0.1.0: Pure Haskell LDAP Client Library

Safe HaskellNone
LanguageHaskell2010

Ldap.Client.Modify

Description

Modify and Modify DN operations.

These operations come in four flavours:

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

Synopsis

Documentation

data Operation Source

Type of modification being performed.

Constructors

Delete Attr [AttrValue]

Delete values from the attribute. Deletes the attribute if the list is empty or all current values are listed.

Add Attr [AttrValue]

Add values to the attribute, creating it if necessary.

Replace Attr [AttrValue]

Replace all existing values of the attribute with the new list. Deletes the attribute if the list is empty.

modify :: Ldap -> Dn -> [Operation] -> IO () Source

Perform the Modify operation synchronously. Raises ResponseError on failures.

modifyEither :: Ldap -> Dn -> [Operation] -> IO (Either ResponseError ()) Source

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

modifyAsync :: Ldap -> Dn -> [Operation] -> IO (Async ()) Source

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

modifyAsyncSTM :: Ldap -> Dn -> [Operation] -> STM (Async ()) Source

Perform the Modify operation asynchronously.

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

newtype RelativeDn Source

A component of Dn.

Constructors

RelativeDn Text 

modifyDn :: Ldap -> Dn -> RelativeDn -> Bool -> Maybe Dn -> IO () Source

Perform the Modify DN operation synchronously. Raises ResponseError on failures.

modifyDnEither :: Ldap -> Dn -> RelativeDn -> Bool -> Maybe Dn -> IO (Either ResponseError ()) Source

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

modifyDnAsync :: Ldap -> Dn -> RelativeDn -> Bool -> Maybe Dn -> IO (Async ()) Source

Perform the Modify DN operation asynchronously. Call wait to wait for its completion.

modifyDnAsyncSTM :: Ldap -> Dn -> RelativeDn -> Bool -> Maybe Dn -> STM (Async ()) Source

Perform the Modify DN operation asynchronously.

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

data Async a Source

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

Instances

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.