config.Conf.Ldap.BaseDN,// This is basedn, we will start searching from this node.
ldap.ScopeWholeSubtree,ldap.NeverDerefAliases,0,0,false,// Here several parameters are respectively scope, derefAliases, sizeLimit, timeLimit, typesOnly
"(&(objectClass=*))",// This is Filter for LDAP query
[]string{},// Here are the attributes returned by the query, provided as an array. If empty, all attributes are returned
nil,
)
// Search through ldap built-in search
sr,err:=common.LDAP.Search(searchRequest)
iferr!=nil{
returnret,err
}
// Refers to the entry that returns data. If it is greater than 0, the interface returns normally.
config.Conf.Ldap.BaseDN,// This is basedn, we will start searching from this node.
ldap.ScopeWholeSubtree,ldap.NeverDerefAliases,0,0,false,// Here several parameters are respectively scope, derefAliases, sizeLimit, timeLimit, typesOnly
"(&(objectClass=*))",// This is Filter for LDAP query
[]string{},// Here are the attributes returned by the query, provided as an array. If empty, all attributes are returned
nil,
)
// Search through ldap built-in search
sr,err:=common.LDAP.Search(searchRequest)
iferr!=nil{
returnret,err
}
// Refers to the entry that returns data. If it is greater than 0, the interface returns normally.
config.Conf.Ldap.BaseDN,// This is basedn, we will start searching from this node.
ldap.ScopeWholeSubtree,ldap.NeverDerefAliases,0,0,false,// Here several parameters are respectively scope, derefAliases, sizeLimit, timeLimit, typesOnly
fmt.Sprintf("(|(Member=%s)(uniqueMember=%s))",udn,udn),// This is Filter for LDAP query
[]string{},// Here are the attributes returned by the query, provided as an array. If empty, all attributes are returned
nil,
)
// Search through ldap built-in search
sr,err:=common.LDAP.Search(searchRequest)
iferr!=nil{
returnret,err
}
// Refers to the entry that returns data. If it is greater than 0, the interface returns normally.