client

package
v0.1.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FieldRegistry = newFieldRegistry()

FieldRegistry is designed to look and feel like an enum from another language like Python.

Example: Accessing constants

FieldRegistry.AccountExpires
FieldRegistry.BadPasswordCount

Example: Utility methods

FieldRegistry.List()
FieldRegistry.Parse("givenName")

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New() Client

func (*Client) Search

func (c *Client) Search(cfg *Config, baseDN string, filters map[*Field][]string) ([]*Entry, error)

func (*Client) UpdateEntry

func (c *Client) UpdateEntry(cfg *Config, baseDN string, filters map[*Field][]string, newValues map[*Field][]string) error

func (*Client) UpdatePassword

func (c *Client) UpdatePassword(cfg *Config, baseDN string, filters map[*Field][]string, newPassword string) error

UpdatePassword uses a Modify call under the hood instead of LDAP change password function. This allows AD and OpenLDAP secret engines to use the same api without changes to the interface.

type Config

type Config struct {
	*ldaputil.ConfigEntry
	LastBindPassword         string    `json:"last_bind_password"`
	LastBindPasswordRotation time.Time `json:"last_bind_password_rotation"`
}

type Entry

type Entry struct {
	*ldap.Entry
	// contains filtered or unexported fields
}

func NewEntry

func NewEntry(ldapEntry *ldap.Entry) *Entry

Entry is an LDAP-specific construct to make knowing and grabbing fields more convenient, while retaining all original information.

func (*Entry) Get

func (e *Entry) Get(field *Field) ([]string, bool)

func (*Entry) GetJoined

func (e *Entry) GetJoined(field *Field) (string, bool)

type Field

type Field struct {
	// contains filtered or unexported fields
}

func (*Field) String

func (f *Field) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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