CloudMigrations: Move business logic out of api layer (#86406)

* move run migration to the cloudmigrationimpl layer

* add migration run list logic down a layer

* remove useless comments

* pull cms calls into their own service
This commit is contained in:
Michael Mandrus
2024-04-17 15:43:09 -04:00
committed by GitHub
parent 00256d3fdd
commit df4c8c3cbc
5 changed files with 217 additions and 158 deletions
@@ -42,7 +42,7 @@ func (s *NoopServiceImpl) GetMigrationStatus(ctx context.Context, id string, run
return nil, cloudmigration.ErrFeatureDisabledError
}
func (s *NoopServiceImpl) GetMigrationStatusList(ctx context.Context, id string) ([]*cloudmigration.CloudMigrationRun, error) {
func (s *NoopServiceImpl) GetMigrationRunList(ctx context.Context, id string) (*cloudmigration.CloudMigrationRunList, error) {
return nil, cloudmigration.ErrFeatureDisabledError
}
@@ -54,10 +54,6 @@ func (s *NoopServiceImpl) SaveMigrationRun(ctx context.Context, cmr *cloudmigrat
return -1, cloudmigration.ErrInternalNotImplementedError
}
func (s *NoopServiceImpl) GetMigrationDataJSON(ctx context.Context, id int64) ([]byte, error) {
func (s *NoopServiceImpl) RunMigration(context.Context, int64) (*cloudmigration.MigrateDataResponseDTO, error) {
return nil, cloudmigration.ErrFeatureDisabledError
}
func (s *NoopServiceImpl) ParseCloudMigrationConfig() (string, error) {
return "", cloudmigration.ErrFeatureDisabledError
}