ldif-0.0.1: The LDAP Data Interchange Format (LDIF) parserSource codeContentsIndex
Text.LDIF
Synopsis
parseLDIFStr :: String -> Either ParseError LDIF
parseLDIFFile :: String -> IO (Either ParseError LDIF)
data LDIF
= LDIFContent {
lcVersion :: Maybe String
lcEntries :: [Record]
}
| LDIFChanges {
lcVersion :: Maybe String
lcEntries :: [Record]
}
data Record
= AttrValRecord {
recDN :: DN
recAttrVals :: [AttrValue]
}
| ChangeRecord {
recDN :: DN
recOp :: Change
}
data Change
= ChangeAdd {
chAttrVals :: [AttrValue]
}
| ChangeDelete
| ChangeModify {
chMods :: [Modify]
}
| ChangeModDN
data Modify
= ModAdd {
modAttr :: Attribute
modAttrVals :: [AttrValue]
}
| ModDelete {
modAttr :: Attribute
modAttrVals :: [AttrValue]
}
| ModReplace {
modAttr :: Attribute
modAttrVals :: [AttrValue]
}
type DN = String
type Attribute = String
type Value = String
type AttrValue = (Attribute, Value)
Documentation
parseLDIFStr :: String -> Either ParseError LDIFSource
Parse string as LDIF content and return LDIF or ParseError
parseLDIFFile :: String -> IO (Either ParseError LDIF)Source
Read and parse provided file and return LDIF or ParseError
data LDIF Source
Represents LDIF structure, it can be either simply LDIF data dump or | changes LDIF with LDAP operations
Constructors
LDIFContent
lcVersion :: Maybe String
lcEntries :: [Record]
LDIFChanges
lcVersion :: Maybe String
lcEntries :: [Record]
show/hide Instances
data Record Source
Represents one record or entry within LDIF file with DN and content
Constructors
AttrValRecord
recDN :: DN
recAttrVals :: [AttrValue]
ChangeRecord
recDN :: DN
recOp :: Change
show/hide Instances
data Change Source
Represents one LDAP operation within changes LDIF
Constructors
ChangeAdd
chAttrVals :: [AttrValue]
ChangeDelete
ChangeModify
chMods :: [Modify]
ChangeModDN
show/hide Instances
data Modify Source
Represents ChangeModify operations upon one entry within given DN
Constructors
ModAdd
modAttr :: Attribute
modAttrVals :: [AttrValue]
ModDelete
modAttr :: Attribute
modAttrVals :: [AttrValue]
ModReplace
modAttr :: Attribute
modAttrVals :: [AttrValue]
show/hide Instances
type DN = StringSource
type Attribute = StringSource
type Value = StringSource
type AttrValue = (Attribute, Value)Source
Produced by Haddock version 2.4.2