add more helpter functions

This commit is contained in:
2026-04-03 18:31:17 -04:00
parent ad21d50ce5
commit 1c1ba99080

View File

@@ -8,6 +8,18 @@ type LDAPSearch struct {
search *ldap.SearchResult search *ldap.SearchResult
} }
type LDAPEntry struct {
entry *ldap.Entry
}
func (s *LDAPSearch) EntryCount() int { func (s *LDAPSearch) EntryCount() int {
return len(s.search.Entries) return len(s.search.Entries)
} }
func (s *LDAPSearch) GetEntry(number int) *LDAPEntry {
return &LDAPEntry{s.search.Entries[number]}
}
func (e *LDAPEntry) GetRawAttributeValue(name string) []byte {
return e.entry.GetRawAttributeValue(name)
}