Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Modify and Modify DN operations.
These operations come in four flavours:
- synchronous, exception throwing (
modify
/modifyDn
) - synchronous, returning
Either
ResponseError
()
(modifyEither
/modifyDnEither
) - asynchronous,
IO
based (modifyAsync
/modifyDnAsync
) - asynchronous,
STM
based (modifyAsyncSTM
/modifyDnAsyncSTM
)
Of those, the first one (modify
/ modifyDn
) is probably the most
useful for the typical usecase.
Synopsis
- data Operation
- modify :: Ldap -> Dn -> [Operation] -> IO ()
- modifyEither :: Ldap -> Dn -> [Operation] -> IO (Either ResponseError ())
- modifyAsync :: Ldap -> Dn -> [Operation] -> IO (Async ())
- modifyAsyncSTM :: Ldap -> Dn -> [Operation] -> STM (Async ())
- newtype RelativeDn = RelativeDn Text
- modifyDn :: Ldap -> Dn -> RelativeDn -> Bool -> Maybe Dn -> IO ()
- modifyDnEither :: Ldap -> Dn -> RelativeDn -> Bool -> Maybe Dn -> IO (Either ResponseError ())
- modifyDnAsync :: Ldap -> Dn -> RelativeDn -> Bool -> Maybe Dn -> IO (Async ())
- modifyDnAsyncSTM :: Ldap -> Dn -> RelativeDn -> Bool -> Maybe Dn -> STM (Async ())
- data Async a
- wait :: Async a -> IO (Either ResponseError a)
- waitSTM :: Async a -> STM (Either ResponseError a)
Documentation
Type of modification being performed.
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
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
.
Instances
Show RelativeDn Source # | |
Defined in Ldap.Client.Modify showsPrec :: Int -> RelativeDn -> ShowS # show :: RelativeDn -> String # showList :: [RelativeDn] -> ShowS # | |
Eq RelativeDn Source # | |
Defined in Ldap.Client.Modify (==) :: RelativeDn -> RelativeDn -> Bool # (/=) :: RelativeDn -> RelativeDn -> Bool # |
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.