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: node_sync.go
    path of file: ./repos/corteza/server/federation/service
    
    the code of the file until where you have to start completion: package service

import (
	"context"

	"github.com/cortezaproject/corteza/server/federation/types"
	"github.com/cortezaproject/corteza/server/pkg/actionlog"
	"github.com/cortezaproject/corteza/server/pkg/filter"
	"github.com/cortezaproject/corteza/server/store"
)

type (
	nodeSync struct {
		store     stor
    
func (svc nodeSync) LookupLastSuccessfulSync(ctx context.Context, nodeID uint64, syncType string) (ns *types.NodeSync, err error) {
	// todo - filter by sync-type does not work
	s, _, err := store.SearchFederationNodeSyncs(ctx, svc.store, types.NodeSyncFilter{
		NodeID:     nodeID,
		SyncType:   syncType,
		SyncStatus: types.NodeSyncStatusSuccess,
		Sorting: filter.Sorting{
			Sort: filter.SortExprSet{
				&filter.SortExpr{Column: "time_action", Descending: true},
			},
		},
		Paging: filter.Paging{Limit: 1},
	})

	if err != nil || len(s) == 0 {
		return nil, err
	}

	return s[0], nil
}