From a973f69d182c161d6c30ad3376f43335f20b7c41 Mon Sep 17 00:00:00 2001 From: Keepers Date: Thu, 27 Jul 2023 00:29:56 -0600 Subject: [PATCH] rename export interface (#3916) to better match current standards #### Type of change - [x] :broom: Tech Debt/Cleanup --- src/internal/m365/export.go | 6 +++--- src/internal/m365/mock/connector.go | 2 +- src/internal/m365/onedrive/export.go | 4 ++-- src/internal/m365/onedrive/export_test.go | 2 +- src/internal/operations/export.go | 2 +- src/internal/operations/inject/inject.go | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/internal/m365/export.go b/src/internal/m365/export.go index 3840d377b..085881803 100644 --- a/src/internal/m365/export.go +++ b/src/internal/m365/export.go @@ -17,8 +17,8 @@ import ( "github.com/alcionai/corso/src/pkg/selectors" ) -// ExportRestoreCollections exports data from the specified collections -func (ctrl *Controller) ExportRestoreCollections( +// ProduceExportCollections exports data from the specified collections +func (ctrl *Controller) ProduceExportCollections( ctx context.Context, backupVersion int, sels selectors.Selector, @@ -42,7 +42,7 @@ func (ctrl *Controller) ExportRestoreCollections( switch sels.Service { case selectors.ServiceOneDrive: - expCollections, err = onedrive.ExportRestoreCollections( + expCollections, err = onedrive.ProduceExportCollections( ctx, backupVersion, exportCfg, diff --git a/src/internal/m365/mock/connector.go b/src/internal/m365/mock/connector.go index 64bc8deda..5510d2f9a 100644 --- a/src/internal/m365/mock/connector.go +++ b/src/internal/m365/mock/connector.go @@ -74,7 +74,7 @@ func (ctrl Controller) ConsumeRestoreCollections( func (ctrl Controller) CacheItemInfo(dii details.ItemInfo) {} -func (ctrl Controller) ExportRestoreCollections( +func (ctrl Controller) ProduceExportCollections( _ context.Context, _ int, _ selectors.Selector, diff --git a/src/internal/m365/onedrive/export.go b/src/internal/m365/onedrive/export.go index bf68ede8d..9868a9b71 100644 --- a/src/internal/m365/onedrive/export.go +++ b/src/internal/m365/onedrive/export.go @@ -131,9 +131,9 @@ func getItemName( return "", clues.New("invalid item id").WithClues(ctx) } -// ExportRestoreCollections will create the export collections for the +// ProduceExportCollections will create the export collections for the // given restore collections. -func ExportRestoreCollections( +func ProduceExportCollections( ctx context.Context, backupVersion int, exportCfg control.ExportConfig, diff --git a/src/internal/m365/onedrive/export_test.go b/src/internal/m365/onedrive/export_test.go index b28b5f3a5..ce707885f 100644 --- a/src/internal/m365/onedrive/export_test.go +++ b/src/internal/m365/onedrive/export_test.go @@ -447,7 +447,7 @@ func (suite *ExportUnitSuite) TestExportRestoreCollections() { } exportCfg := control.ExportConfig{} - ecs, err := ExportRestoreCollections(ctx, int(version.Backup), exportCfg, control.Options{}, dcs, nil, fault.New(true)) + ecs, err := ProduceExportCollections(ctx, int(version.Backup), exportCfg, control.Options{}, dcs, nil, fault.New(true)) assert.NoError(t, err, "export collections error") assert.Len(t, ecs, 1, "num of collections") diff --git a/src/internal/operations/export.go b/src/internal/operations/export.go index dc4823935..772ba44f2 100644 --- a/src/internal/operations/export.go +++ b/src/internal/operations/export.go @@ -343,7 +343,7 @@ func exportRestoreCollections( close(complete) }() - expCollections, err := ec.ExportRestoreCollections( + expCollections, err := ec.ProduceExportCollections( ctx, backupVersion, sel, diff --git a/src/internal/operations/inject/inject.go b/src/internal/operations/inject/inject.go index 0a5e8581c..5a30fe8a3 100644 --- a/src/internal/operations/inject/inject.go +++ b/src/internal/operations/inject/inject.go @@ -59,7 +59,7 @@ type ( } ExportConsumer interface { - ExportRestoreCollections( + ProduceExportCollections( ctx context.Context, backupVersion int, selector selectors.Selector,