func (s *LDAPGroupSyncer) Sync() ([]*userv1.Group, []error) {
	openshiftGroups := []*userv1.Group{}
	var errors []error
	ldapGroupUIDs, err := s.GroupLister.ListGroups()
	if err != nil {
		errors = append(errors, err)
		return nil, errors
	}
	for _, ldapGroupUID := range ldapGroupUIDs {
		memberEntries, err := s.GroupMemberExtractor.ExtractMembers(ldapGroupUID)
		if err != nil {
			s.Log.Error(err, "Error determining LDAP group membership for group", "LDAP Group UID", ldapGroupUID)
			errors = append(errors, err)
			continue
		}
		usernames, err := s.determineUsernames(memberEntries)
		if err != nil {
			s.Log.Error(err, "Error determining usernames for LDAP group", "LDAP Group UID", ldapGroupUID)
			errors = append(errors, err)
			continue
		}
		openshiftGroup, err := s.makeOpenShiftGroup(ldapGroupUID, usernames)
		if err != nil {
			if ldapquery.IsQueryOutOfBoundsError(err) {
				s.Log.Error(err, "LDAP Query is out of bounds")
				continue
			}
			s.Log.Error(err, "Error building OpenShift group for LDAP group", "LDAP Group UID", ldapGroupUID)
			errors = append(errors, err)
			continue
		}
		openshiftGroups = append(openshiftGroups, openshiftGroup)
		if !s.DryRun {
			s.Log.Info(fmt.Sprintf("group/%s", openshiftGroup.Name))
			if err := s.updateOpenShiftGroup(openshiftGroup); err != nil {
				s.Log.Error(err, "Error updating OpenShift group for LDAP group", "OpenShift group", openshiftGroup.Name, "LDAP group", ldapGroupUID)
				errors = append(errors, err)
				continue
			}
		}
	}
	return openshiftGroups, errors
}
Sync allows the LDAPGroupSyncer to be a GroupSyncer
package syncgroups
import (
	"context"
	"fmt"
	"net"
	"time"
	"gopkg.in/ldap.v2"
	kapierrors "k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/types"
	"github.com/go-logr/logr"
	userv1 "github.com/openshift/api/user/v1"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"github.com/openshift/library-go/pkg/security/ldapquery"
	"github.com/redhat-cop/group-sync-operator/pkg/provider/ldap/helpers/interfaces"
)
type GroupSyncer interface {
	Sync() (groupsAffected []*userv1.Group, errors []error)
}
type LDAPGroupSyncer struct {
	GroupLister interfaces.LDAPGroupLister
	GroupMemberExtractor interfaces.LDAPMemberExtractor
	UserNameMapper interfaces.LDAPUserNameMapper
	GroupNameMapper interfaces.LDAPGroupNameMapper
	Client client.Client
	Host string
	DryRun bool
	Log logr.Logger
}
var _ GroupSyncer = &LDAPGroupSyncer{}