Documentation ¶
Index ¶
- Variables
- func ConnectLdap()
- func Setup()
- type Attribute
- type LDAP_CONFIG
- func (lc *LDAP_CONFIG) Add(username, mail, uidNumber, gidNumber, password string) error
- func (lc *LDAP_CONFIG) Auth(username, password string) (success bool, err error)
- func (lc *LDAP_CONFIG) Close()
- func (lc *LDAP_CONFIG) Connect() (err error)
- func (lc *LDAP_CONFIG) Search(SearchFilter string) (results []LDAP_RESULT, err error)
- func (lc *LDAP_CONFIG) Search_User(username string) (user LDAP_RESULT, err error)
- type LDAP_RESULT
Constants ¶
This section is empty.
Variables ¶
View Source
var Conn *ldap.Conn
Functions ¶
func ConnectLdap ¶
func ConnectLdap()
Types ¶
type LDAP_CONFIG ¶
type LDAP_CONFIG struct { Addr string `json:"addr"` BaseDn string `json:"baseDn"` UserDn string `json:"userDn"` BindDn string `json:"bindDn` BindPass string `json:"bindPass"` AuthFilter string `json:"authFilter"` Attributes []string `json:"attributes"` TLS bool `json:"tls"` StartTLS bool `json:"startTLS"` }
func GetLdap ¶
func GetLdap() LDAP_CONFIG
func (*LDAP_CONFIG) Add ¶
func (lc *LDAP_CONFIG) Add(username, mail, uidNumber, gidNumber, password string) error
func (*LDAP_CONFIG) Auth ¶
func (lc *LDAP_CONFIG) Auth(username, password string) (success bool, err error)
func (*LDAP_CONFIG) Close ¶
func (lc *LDAP_CONFIG) Close()
func (*LDAP_CONFIG) Connect ¶
func (lc *LDAP_CONFIG) Connect() (err error)
func (*LDAP_CONFIG) Search ¶
func (lc *LDAP_CONFIG) Search(SearchFilter string) (results []LDAP_RESULT, err error)
func (*LDAP_CONFIG) Search_User ¶
func (lc *LDAP_CONFIG) Search_User(username string) (user LDAP_RESULT, err error)
type LDAP_RESULT ¶
Click to show internal directories.
Click to hide internal directories.