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
+10 -11
View File
@@ -7,16 +7,15 @@ import (
type Service interface {
CreateToken(context.Context) (CreateAccessTokenResponse, error)
ValidateToken(context.Context, CloudMigration) error
// migration
GetMigration(context.Context, int64) (*CloudMigration, error)
GetMigrationList(context.Context) (*CloudMigrationListResponse, error)
CreateMigration(context.Context, CloudMigrationRequest) (*CloudMigrationResponse, error)
GetMigrationDataJSON(context.Context, int64) ([]byte, error)
UpdateMigration(context.Context, int64, CloudMigrationRequest) (*CloudMigrationResponse, error)
GetMigrationStatus(context.Context, string, string) (*CloudMigrationRun, error)
GetMigrationStatusList(context.Context, string) ([]*CloudMigrationRun, error)
DeleteMigration(context.Context, int64) (*CloudMigration, error)
SaveMigrationRun(context.Context, *CloudMigrationRun) (int64, error)
ParseCloudMigrationConfig() (string, error)
CreateMigration(context.Context, CloudMigrationRequest) (*CloudMigrationResponse, error)
GetMigration(context.Context, int64) (*CloudMigration, error)
DeleteMigration(context.Context, int64) (*CloudMigration, error)
UpdateMigration(context.Context, int64, CloudMigrationRequest) (*CloudMigrationResponse, error)
GetMigrationList(context.Context) (*CloudMigrationListResponse, error)
RunMigration(context.Context, int64) (*MigrateDataResponseDTO, error)
SaveMigrationRun(context.Context, *CloudMigrationRun) (int64, error)
GetMigrationStatus(context.Context, string, string) (*CloudMigrationRun, error)
GetMigrationRunList(context.Context, string) (*CloudMigrationRunList, error)
}