Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Group
- type People
- type Peoples
- type PoolStats
- type Spec
- type Store
- func (s *Store) All(spec *Spec) (staffs Peoples)
- func (s *Store) AllGroup() (data []Group, err error)
- func (s *Store) Authenticate(uid, passwd string) (staff *People, err error)
- func (s *Store) Close()
- func (s *Store) Delete(uid string) (err error)
- func (s *Store) EraseGroup(name string) error
- func (s *Store) Get(uid string) (staff *People, err error)
- func (s *Store) GetByDN(dn string) (staff *People, err error)
- func (s *Store) GetGroup(name string) (group *Group, err error)
- func (s *Store) ModifyBySelf(uid, password string, staff *People) (err error)
- func (s *Store) PasswordChange(uid, oldPasswd, newPasswd string) (err error)
- func (s *Store) PasswordReset(uid, passwd string) (err error)
- func (s *Store) PoolStats() *PoolStats
- func (s *Store) Ready() error
- func (s *Store) Rename(oldUID, newUID string) (err error)
- func (s *Store) Save(staff *People) (isNew bool, err error)
- func (s *Store) SaveGroup(group *Group) error
Constants ¶
View Source
const ( TimeLayout = "20060102150405Z" DateLayout = "20060102" DefaultPageSize = 100 DefaultPoolSize = 10 )
consts
Variables ¶
View Source
var ( ErrEmptyAddr = errors.New("ldap addr is empty") ErrEmptyBase = errors.New("ldap base is empty") ErrEmptyCN = errors.New("ldap cn is empty") ErrEmptyDN = errors.New("ldap dn is empty") ErrEmptyFilter = errors.New("ldap filter is empty") ErrEmptyPwd = errors.New("ldap passwd is empty") ErrEmptyUID = errors.New("ldap uid is empty") ErrInvalidUID = errors.New("ldap uid is invalid") ErrLogin = errors.New("Incorrect Username/Password") ErrNotFound = errors.New("Not Found") ErrUnsupport = errors.New("Unsupported") )
nolint
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string `json:"addr"` Base string `json:"base"` Bind string `json:"bind"` Passwd string `json:"-"` Domain string `json:"domain"` PageSize int `json:"-"` }
Config LDAP config
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store ..
func (*Store) Authenticate ¶
Authenticate verify uid and password from one of sources, return valid DN and error
func (*Store) ModifyBySelf ¶
ModifyBySelf ...
func (*Store) PasswordChange ¶
PasswordChange ...
func (*Store) PasswordReset ¶
PasswordReset ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.