ldap

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.8.4

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

type Mapping

type Mapping struct {
	From map[string][]string `json:"from"`
	To   MappingTo           `json:"to"`
	// contains filtered or unexported fields
}

Mapping ...

type MappingTo

type MappingTo struct {
	IsStaff     bool     `json:"isStaff"`
	Groups      []string `json:"groups"`
	Permissions []string `json:"permissions"`
}

MappingTo ...

type Mappings

type Mappings struct {
	Mappings []Mapping
	// Attributes is a list of all unique attributes that appear in mappings
	// that needs to be retrieved from server to make comparison.
	Attributes []string
}

Mappings ...

func NewMappings

func NewMappings(r io.Reader) (*Mappings, error)

NewMappings ...

func NewMappingsFromFile

func NewMappingsFromFile(p string) (*Mappings, error)

NewMappingsFromFile reads json file and allocates new Mappings based on the output.

func (*Mappings) Map

func (m *Mappings) Map(attrs []*ldap.EntryAttribute) (*MappingTo, bool)

Map search groups and permissions that given LDAP entry match.

Jump to

Keyboard shortcuts

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