Versions in this module Expand all Collapse all v0 v0.1.0 Jun 6, 2023 Changes in this version + const AddAttribute + const ApplicationAbandonRequest + const ApplicationAddRequest + const ApplicationAddResponse + const ApplicationBindRequest + const ApplicationBindResponse + const ApplicationCompareRequest + const ApplicationCompareResponse + const ApplicationDelRequest + const ApplicationDelResponse + const ApplicationExtendedRequest + const ApplicationExtendedResponse + const ApplicationModifyDNRequest + const ApplicationModifyDNResponse + const ApplicationModifyRequest + const ApplicationModifyResponse + const ApplicationSearchRequest + const ApplicationSearchResultDone + const ApplicationSearchResultEntry + const ApplicationSearchResultReference + const ApplicationUnbindRequest + const ControlTypePaging + const DeleteAttribute + const DerefAlways + const DerefFindingBaseObj + const DerefInSearching + const ErrorDebugging + const ErrorFilterCompile + const ErrorFilterDecompile + const ErrorNetwork + const FilterAnd + const FilterApproxMatch + const FilterEqualityMatch + const FilterExtensibleMatch + const FilterGreaterOrEqual + const FilterLessOrEqual + const FilterNot + const FilterOr + const FilterPresent + const FilterSubstrings + const FilterSubstringsAny + const FilterSubstringsFinal + const FilterSubstringsInitial + const LDAPBindAuthSASL + const LDAPBindAuthSimple + const LDAPResultAdminLimitExceeded + const LDAPResultAffectsMultipleDSAs + const LDAPResultAliasDereferencingProblem + const LDAPResultAliasProblem + const LDAPResultAttributeOrValueExists + const LDAPResultAuthMethodNotSupported + const LDAPResultBusy + const LDAPResultCompareFalse + const LDAPResultCompareTrue + const LDAPResultConfidentialityRequired + const LDAPResultConstraintViolation + const LDAPResultEntryAlreadyExists + const LDAPResultInappropriateAuthentication + const LDAPResultInappropriateMatching + const LDAPResultInsufficientAccessRights + const LDAPResultInvalidAttributeSyntax + const LDAPResultInvalidCredentials + const LDAPResultInvalidDNSyntax + const LDAPResultLoopDetect + const LDAPResultNamingViolation + const LDAPResultNoSuchAttribute + const LDAPResultNoSuchObject + const LDAPResultNotAllowedOnNonLeaf + const LDAPResultNotAllowedOnRDN + const LDAPResultObjectClassModsProhibited + const LDAPResultObjectClassViolation + const LDAPResultOperationsError + const LDAPResultOther + const LDAPResultProtocolError + const LDAPResultReferral + const LDAPResultSaslBindInProgress + const LDAPResultSizeLimitExceeded + const LDAPResultStrongAuthRequired + const LDAPResultSuccess + const LDAPResultTimeLimitExceeded + const LDAPResultUnavailable + const LDAPResultUnavailableCriticalExtension + const LDAPResultUndefinedAttributeType + const LDAPResultUnwillingToPerform + const MessageFinish + const MessageQuit + const MessageRequest + const MessageResponse + const NeverDerefAliases + const ReplaceAttribute + const ScopeBaseObject + const ScopeSingleLevel + const ScopeWholeSubtree + var ApplicationMap = map[uint8]string + var ControlTypeMap = map[string]string + var DerefMap = map[int]string + var FilterMap = map[uint8]string + var LDAPModifyAttributeMap = map[uint64]string + var LDAPResultCodeMap = map[LDAPResultCode]string + var ScopeMap = map[int]string + func CompileFilter(filter string) (*ber.Packet, error) + func DebugBinaryFile(fileName string) error + func DecompileFilter(packet *ber.Packet) (ret string, err error) + func GetFilterObjectClass(filter string) (string, error) + func HandleAbandonRequest(req *ber.Packet, boundDN string, fns map[string]Abandoner, conn net.Conn) error + func HandleSearchRequest(req *ber.Packet, controls *[]Control, messageID uint64, boundDN string, ...) (resultErr error) + func NewError(resultCode LDAPResultCode, err error) error + type Abandoner interface + Abandon func(boundDN string, conn net.Conn) error + type AddRequest struct + type Adder interface + Add func(boundDN string, req AddRequest, conn net.Conn) (LDAPResultCode, error) + type Attribute struct + type AttributeValueAssertion struct + type Binder interface + Bind func(bindDN, bindSimplePw string, conn net.Conn) (LDAPResultCode, error) + type Closer interface + Close func(boundDN string, conn net.Conn) error + type CompareRequest struct + type Comparer interface + Compare func(boundDN string, req CompareRequest, conn net.Conn) (LDAPResultCode, error) + type Conn struct + Debug debugging + func Dial(network, addr string) (*Conn, error) + func DialTLS(network, addr string, config *tls.Config) (*Conn, error) + func DialTLSDialer(network, addr string, config *tls.Config, dialer *net.Dialer) (*Conn, error) + func DialTimeout(network, addr string, timeout time.Duration) (*Conn, error) + func NewConn(conn net.Conn) *Conn + func (l *Conn) Bind(username, password string) error + func (l *Conn) Close() + func (l *Conn) Modify(modifyRequest *ModifyRequest) error + func (l *Conn) Ping() error + func (l *Conn) Search(searchRequest *SearchRequest) (*SearchResult, error) + func (l *Conn) SearchWithPaging(searchRequest *SearchRequest, pagingSize uint32) (*SearchResult, error) + func (l *Conn) StartTLS(config *tls.Config) error + func (l *Conn) Unbind() error + type Control interface + Encode func() *ber.Packet + GetControlType func() string + String func() string + func DecodeControl(packet *ber.Packet) Control + func FindControl(controls []Control, controlType string) Control + type ControlPaging struct + Cookie []byte + PagingSize uint32 + func NewControlPaging(pagingSize uint32) *ControlPaging + func (c *ControlPaging) Encode() *ber.Packet + func (c *ControlPaging) GetControlType() string + func (c *ControlPaging) SetCookie(cookie []byte) + func (c *ControlPaging) String() string + type ControlString struct + ControlType string + ControlValue string + Criticality bool + func NewControlString(controlType string, criticality bool, controlValue string) *ControlString + func (c *ControlString) Encode() *ber.Packet + func (c *ControlString) GetControlType() string + func (c *ControlString) String() string + type DeleteRequest struct + type Deleter interface + Delete func(boundDN, deleteDN string, conn net.Conn) (LDAPResultCode, error) + type Entry struct + Attributes []*EntryAttribute + DN string + func (e *Entry) GetAttributeValue(attribute string) string + func (e *Entry) GetAttributeValues(attribute string) []string + func (e *Entry) PrettyPrint(indent int) + func (e *Entry) Print() + type EntryAttribute struct + Name string + Values []string + func (e *EntryAttribute) PrettyPrint(indent int) + func (e *EntryAttribute) Print() + type Error struct + Err error + ResultCode LDAPResultCode + func (e *Error) Error() string + type ExtendedRequest struct + type Extender interface + Extended func(boundDN string, req ExtendedRequest, conn net.Conn) (LDAPResultCode, error) + type LDAPResultCode uint8 + func HandleAddRequest(req *ber.Packet, boundDN string, fns map[string]Adder, conn net.Conn) (resultCode LDAPResultCode) + func HandleBindRequest(req *ber.Packet, fns map[string]Binder, conn net.Conn) (resultCode LDAPResultCode) + func HandleCompareRequest(req *ber.Packet, boundDN string, fns map[string]Comparer, conn net.Conn) (resultCode LDAPResultCode) + func HandleDeleteRequest(req *ber.Packet, boundDN string, fns map[string]Deleter, conn net.Conn) (resultCode LDAPResultCode) + func HandleExtendedRequest(req *ber.Packet, boundDN string, fns map[string]Extender, conn net.Conn) (resultCode LDAPResultCode) + func HandleModifyDNRequest(req *ber.Packet, boundDN string, fns map[string]ModifyDNr, conn net.Conn) (resultCode LDAPResultCode) + func HandleModifyRequest(req *ber.Packet, boundDN string, fns map[string]Modifier, conn net.Conn) (resultCode LDAPResultCode) + func ServerApplyFilter(f *ber.Packet, entry *Entry) (bool, LDAPResultCode) + type Modifier interface + Modify func(boundDN string, req ModifyRequest, conn net.Conn) (LDAPResultCode, error) + type ModifyDNRequest struct + type ModifyDNr interface + ModifyDN func(boundDN string, req ModifyDNRequest, conn net.Conn) (LDAPResultCode, error) + type ModifyRequest struct + AddAttributes []PartialAttribute + DeleteAttributes []PartialAttribute + Dn string + ReplaceAttributes []PartialAttribute + func NewModifyRequest(dn string) *ModifyRequest + func (m *ModifyRequest) Add(attrType string, attrVals []string) + func (m *ModifyRequest) Delete(attrType string, attrVals []string) + func (m *ModifyRequest) Replace(attrType string, attrVals []string) + type PartialAttribute struct + AttrType string + AttrVals []string + type SearchRequest struct + Attributes []string + BaseDN string + Controls []Control + DerefAliases int + Filter string + Scope int + SizeLimit int + TimeLimit int + TypesOnly bool + func NewSearchRequest(BaseDN string, Scope, DerefAliases, SizeLimit, TimeLimit int, TypesOnly bool, ...) *SearchRequest + type SearchResult struct + Controls []Control + Entries []*Entry + Referrals []string + func (s *SearchResult) PrettyPrint(indent int) + func (s *SearchResult) Print() + type Searcher interface + Search func(boundDN string, req SearchRequest, conn net.Conn) (ServerSearchResult, error) + type Server struct + AbandonFns map[string]Abandoner + AddFns map[string]Adder + BindFns map[string]Binder + CloseFns map[string]Closer + CompareFns map[string]Comparer + DeleteFns map[string]Deleter + EnforceLDAP bool + ExtendedFns map[string]Extender + ModifyDNFns map[string]ModifyDNr + ModifyFns map[string]Modifier + Quit chan bool + SearchFns map[string]Searcher + StartTLS *tls.Config + Stats *Stats + UnbindFns map[string]Unbinder + func NewServer() *Server + func (server *Server) AbandonFunc(baseDN string, f Abandoner) + func (server *Server) AddFunc(baseDN string, f Adder) + func (server *Server) BindFunc(baseDN string, f Binder) + func (server *Server) CloseFunc(baseDN string, f Closer) + func (server *Server) CompareFunc(baseDN string, f Comparer) + func (server *Server) DeleteFunc(baseDN string, f Deleter) + func (server *Server) ExtendedFunc(baseDN string, f Extender) + func (server *Server) GetStats() Stats + func (server *Server) ListenAndServe(listenString string) error + func (server *Server) ListenAndServeTLS(listenString string, certFile string, keyFile string) error + func (server *Server) ModifyDNFunc(baseDN string, f ModifyDNr) + func (server *Server) ModifyFunc(baseDN string, f Modifier) + func (server *Server) QuitChannel(quit chan bool) + func (server *Server) SearchFunc(baseDN string, f Searcher) + func (server *Server) Serve(ln net.Listener) error + func (server *Server) SetStats(enable bool) + func (server *Server) UnbindFunc(baseDN string, f Unbinder) + type ServerSearchResult struct + Controls []Control + Entries []*Entry + Referrals []string + ResultCode LDAPResultCode + type Stats struct + Binds int + Conns int + Searches int + Unbinds int + type Unbinder interface + Unbind func(boundDN string, conn net.Conn) (LDAPResultCode, error)