ldap-client-0.4.1: 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.

Instances
Eq Operation Source # 
Instance details

Defined in Ldap.Client.Modify

Show Operation Source # 
Instance details

Defined in Ldap.Client.Modify

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 
Instances
Eq RelativeDn Source # 
Instance details

Defined in Ldap.Client.Modify

Show RelativeDn Source # 
Instance details

Defined in Ldap.Client.Modify

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
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.