(entry *ldap.Entry)
| 789 | } |
| 790 | |
| 791 | func getName(entry *ldap.Entry) string { |
| 792 | nameIds := []string{"cn", "ou", "dc", "name", "uid"} |
| 793 | objectName := "" |
| 794 | for _, nameId := range nameIds { |
| 795 | currentId := entry.GetAttributeValue(nameId) |
| 796 | |
| 797 | if currentId != "" { |
| 798 | objectName = currentId |
| 799 | break |
| 800 | } |
| 801 | } |
| 802 | |
| 803 | return objectName |
| 804 | } |
| 805 | |
| 806 | func getDN(entry *ldap.Entry) string { |
| 807 | dn := entry.DN |
no outgoing calls
no test coverage detected