You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: reader.go
    path of file: ./repos/arozos/src/mod/auth/ldap/ldapreader
    
    the code of the file until where you have to start completion: package ldapreader

import (
	"fmt"
	"strings"

	"github.com/go-ldap/ldap"
)

type LdapReader struct {
	username string
	password string
	server   string
	basedn   string
}

//NewOauthHandler xxx
func NewLDAPReader(username string, password string, server string, basedn string) *LdapReader {

	LDAPHandler := LdapReader{
		username: username,
		password: password,
		server:   server,
		basedn:   basedn,
	
    
func (handler *LdapReader) retrieveInformation(dn string, filter string, typeOfSearch int, username string, password string) ([]*ldap.Entry, error) {
	ldapURL, err := ldap.DialURL(fmt.Sprintf("ldap://%s:389", handler.server))
	if err != nil {
		return nil, err
	}
	defer ldapURL.Close()

	ldapURL.Bind(username, password)
	searchReq := ldap.NewSearchRequest(
		dn,
		typeOfSearch,
		ldap.NeverDerefAliases,
		0,
		0,
		false,
		filter,
		[]string{"uid", "memberOf", "cn", "sAMAccountName"},
		//[]string{},
		nil,
	)
	result, err := ldapURL.Search(searchReq)
	if err != nil {
		return nil, fmt.Errorf("search Error: %s", err)
	}

	if len(result.Entries) > 0 {
		return result.Entries, nil
	} else {
		return nil, fmt.Errorf("couldn't fetch search entries")
	}
}