rename export interface (#3916)

to better match current standards

#### Type of change

- [x] 🧹 Tech Debt/Cleanup
This commit is contained in:
Keepers 2023-07-27 00:29:56 -06:00 committed by GitHub
parent 578a720c67
commit a973f69d18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View File

@ -17,8 +17,8 @@ import (
"github.com/alcionai/corso/src/pkg/selectors" "github.com/alcionai/corso/src/pkg/selectors"
) )
// ExportRestoreCollections exports data from the specified collections // ProduceExportCollections exports data from the specified collections
func (ctrl *Controller) ExportRestoreCollections( func (ctrl *Controller) ProduceExportCollections(
ctx context.Context, ctx context.Context,
backupVersion int, backupVersion int,
sels selectors.Selector, sels selectors.Selector,
@ -42,7 +42,7 @@ func (ctrl *Controller) ExportRestoreCollections(
switch sels.Service { switch sels.Service {
case selectors.ServiceOneDrive: case selectors.ServiceOneDrive:
expCollections, err = onedrive.ExportRestoreCollections( expCollections, err = onedrive.ProduceExportCollections(
ctx, ctx,
backupVersion, backupVersion,
exportCfg, exportCfg,

View File

@ -74,7 +74,7 @@ func (ctrl Controller) ConsumeRestoreCollections(
func (ctrl Controller) CacheItemInfo(dii details.ItemInfo) {} func (ctrl Controller) CacheItemInfo(dii details.ItemInfo) {}
func (ctrl Controller) ExportRestoreCollections( func (ctrl Controller) ProduceExportCollections(
_ context.Context, _ context.Context,
_ int, _ int,
_ selectors.Selector, _ selectors.Selector,

View File

@ -131,9 +131,9 @@ func getItemName(
return "", clues.New("invalid item id").WithClues(ctx) 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. // given restore collections.
func ExportRestoreCollections( func ProduceExportCollections(
ctx context.Context, ctx context.Context,
backupVersion int, backupVersion int,
exportCfg control.ExportConfig, exportCfg control.ExportConfig,

View File

@ -447,7 +447,7 @@ func (suite *ExportUnitSuite) TestExportRestoreCollections() {
} }
exportCfg := control.ExportConfig{} 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.NoError(t, err, "export collections error")
assert.Len(t, ecs, 1, "num of collections") assert.Len(t, ecs, 1, "num of collections")

View File

@ -343,7 +343,7 @@ func exportRestoreCollections(
close(complete) close(complete)
}() }()
expCollections, err := ec.ExportRestoreCollections( expCollections, err := ec.ProduceExportCollections(
ctx, ctx,
backupVersion, backupVersion,
sel, sel,

View File

@ -59,7 +59,7 @@ type (
} }
ExportConsumer interface { ExportConsumer interface {
ExportRestoreCollections( ProduceExportCollections(
ctx context.Context, ctx context.Context,
backupVersion int, backupVersion int,
selector selectors.Selector, selector selectors.Selector,