ldap

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Ping() error
	GetEntry(dn string, entry any) error
	CreateOrUpdateEntry(entry any) (created bool, err error)
	DeleteEntry(dn string, cascading bool) error
}

Client is an goldap directory client.

type ClientBuilder

type ClientBuilder interface {
	WithClient(client client.Client) ClientBuilder
	WithScheme(scheme *runtime.Scheme) ClientBuilder
	WithDirectory(directory *ldapv1alpha1.LDAPDirectory) ClientBuilder
	Build(ctx context.Context) (Client, error)
}

func NewClientBuilder

func NewClientBuilder() ClientBuilder

func NewFakeClientBuilder

func NewFakeClientBuilder(m *mock.Mock) ClientBuilder

type Entry

type Entry interface {
	*OrganizationalUnit | *Group | *User
}

type Group

type Group struct {
	// DistinguishedName is the unique identifier for this group within the directory.
	DistinguishedName string
	// Name is the common name for this group.
	Name string
	// Description is an optional description of this group.
	Description string
	// Members is a list of distinguished names representing the members of this group.
	Members []string
}

Group represents a group of names in the directory. Groups are used to manage permissions and may contain users, other groups, or organizational units. Members of a group can be granted access to resources or permissions based on their group membership.

type OrganizationalUnit

type OrganizationalUnit struct {
	// DistinguishedName is the unique identifier for this organizational unit within the directory.
	DistinguishedName string
	// Name is the common name for this organizational unit.
	Name string
	// Description is an optional description of this organizational unit.
	Description string
}

OrganizationalUnit represents an organizational unit in the directory. Organizational units are containers that can hold users, groups, and other organizational units, allowing for a hierarchy of these objects.

type User

type User struct {
	// DistinguishedName is the unique identifier for this user within the directory.
	DistinguishedName string
	// Username is the username (uid) for this user.
	Username string
	// Name is the full name of this user (commonName).
	Name string
	// Surname is the surname of this user.
	Surname string
	// Email is an optional email address of this user.
	Email string
	// Password is an optional password for this user.
	Password string
}

User represents a user in the directory. Users are individual account entities that may log into a system, be assigned permissions, and be included in groups.

Jump to

Keyboard shortcuts

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