directory

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes map[string][]string

Attributes represents a list of LDAP named attributes.

type Directory

type Directory interface {
	// BaseDN returns the LDAP object represented by the given DN. If no object found,
	// it returns nil.
	// If the given DN is empty, it returns the root object.
	BaseDN(dn string) Object
}

Directory contains all current LDAP object tree, accessible using a base DN.

type Object

type Object interface {
	// DN returns the DN of the current object
	DN() string
	// Attributes returns the list of attributes of the current object.
	Attributes() Attributes
	// Search searches sub objects based on the given scope and filter.
	Search(scope gldap.Scope, filter string) ([]Object, error)

	// Bind returns true if the current object is able to authenticate and the password is correct.
	// It returns false if the password is wrong and optional.None if it cannot be authenticated.
	Bind(password string) (bool, error)
	// CanSearchOn returns true if the current object is able to perform a search on the given DN.
	CanSearchOn(dn string) bool
}

Object represents an LDAP object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL