ldap

package
v0.0.0-...-ea1faf4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShadowExpire = "shadowExpire"
)

Variables

View Source
var (
	AttrShadowExpireOption = AttributesOption(ShadowExpire)

	ScopeBaseObjectOption   = scopeOption(0)
	ScopeSingleLevelOption  = scopeOption(1)
	ScopeWholeSubtreeOption = scopeOption(2)

	DerefAliasesNeverOption       = aliasesOption(0)
	DerefAliasesInSearchingOption = aliasesOption(1)
	DerefAliasesFindingBaseObj    = aliasesOption(2)
	DerefAliasesAlways            = aliasesOption(3)
)

Functions

This section is empty.

Types

type Client

type Client interface {
	GetUser(string, ...Option) (Entity, error)
	GetUsers([]string, ...Option) (Result, error)
	GetGroups([]string, ...Option) (Result, error)
	GetGroupUsers([]string, ...Option) (Result, error)
	Search(string, ...Option) (Result, error)
	Signin(string, string) error
	Password(string, string, string) error
	Close() error
}

Client ****************************************************************************************************************************************

type Context

type Context struct {
	*base.SimpleBindRequest
	Alias       int
	Attrs       []string
	BaseDN      string
	Scope       int
	UserFilter  string
	GroupFilter string
}

Context ****************************************************************************************************************************************

func (*Context) ApplyOptions

func (o *Context) ApplyOptions(opts []Option, defa ...Option) (opt *Context)

ApplyOptions ****************************************************************************************************************************************

func (*Context) GetUserDN

func (o *Context) GetUserDN(user string) string

GetUserDN ****************************************************************************************************************************************

type Entity

type Entity interface {
	Attr(string) string
	AttrInt(string) (int64, error)
	Attrs(string) []string
	DN() string
	IsValid() bool
}

Entity ****************************************************************************************************************************************

type Option

type Option func(*Context)

Option ****************************************************************************************************************************************

func AttributesOption

func AttributesOption(attrs ...string) Option

AttributesOption ****************************************************************************************************************************************

func BaseDNOption

func BaseDNOption(dn string) Option

BaseDNOption ****************************************************************************************************************************************

func BindRequestOption

func BindRequestOption(user, pswd string) Option

BindRequestOption ****************************************************************************************************************************************

func GroupFilterOption

func GroupFilterOption(filter string) Option

GroupFilterOption ****************************************************************************************************************************************

func UserFilterOption

func UserFilterOption(filter string) Option

UserFilterOption ****************************************************************************************************************************************

type Result

type Result interface {
	Len() int
	Index(int) Entity
}

Result ****************************************************************************************************************************************

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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