rename export interface (#3916)
to better match current standards
#### Type of change
- [x] 🧹 Tech Debt/Cleanup
This commit is contained in:
parent
578a720c67
commit
a973f69d18
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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")
|
||||||
|
|||||||
@ -343,7 +343,7 @@ func exportRestoreCollections(
|
|||||||
close(complete)
|
close(complete)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
expCollections, err := ec.ExportRestoreCollections(
|
expCollections, err := ec.ProduceExportCollections(
|
||||||
ctx,
|
ctx,
|
||||||
backupVersion,
|
backupVersion,
|
||||||
sel,
|
sel,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user