modulepackage
0.0.0-20200320164324-fd88d9b715b3
Repository: https://github.com/go-ldap/ldif.git
Documentation: pkg.go.dev
# README
ldif
Utilities for working with ldif data. This implements most of RFC 2849.
Change Entries
Support for moddn / modrdn changes is missing (in Unmarshal and Marshal) - github.com/go-ldap/ldap/v3 does not support it currently
Controls
Only simple controls without control value are supported, currently just Manage DSA IT - oid: 2.16.840.1.113730.3.4.2
URLs
URL schemes in an LDIF like jpegPhoto;binary:< file:///usr/share/photos/someone.jpg are only supported for the "file" scheme like in the example above
# Functions
Dump writes the given entries to the io.Writer.
Marshal returns an LDIF string from the given LDIF.
Parse wraps Unmarshal to parse an LDIF from a string.
ParseWithControls wraps Unmarshal to parse an LDIF from a string, controls are added to change records.
ToLDIF puts the given arguments in an LDIF struct and returns it.
Unmarshal parses the LDIF from the given io.Reader into the LDIF struct.
# Variables
ErrMixed is the error, that we cannot mix change records and content records in one LDIF.
# Structs
Entry is one entry in the LDIF.
The LDIF struct is used for parsing an LDIF.
The ParseError holds the error message and the line in the ldif where the error occurred.