diff --git a/websrc/controllers/generateHandlers.go b/websrc/controllers/generateHandlers.go index d4345e3..b4bddad 100644 --- a/websrc/controllers/generateHandlers.go +++ b/websrc/controllers/generateHandlers.go @@ -27,16 +27,17 @@ import ( ) // GenerateLinuxPostHandler godoc -// @Summary Generate test data on on-premise Linux -// @Description Generate test data on on-premise Linux. -// @Tags [Test Data Generation] On-premise Linux -// @Accept json -// @Produce json -// @Param RequestBody body GenDataParams true "Parameters required to generate test data" -// @Success 200 {object} models.BasicResponse "Successfully generated test data" -// @Failure 400 {object} models.BasicResponse "Invalid Request" -// @Failure 500 {object} models.BasicResponse "Internal Server Error" -// @Router /generate/linux [post] +// +// @Summary Generate test data on on-premise Linux +// @Description Generate test data on on-premise Linux. +// @Tags [Test Data Generation] +// @Accept json +// @Produce json +// @Param RequestBody body GenDataParams true "Parameters required to generate test data" +// @Success 200 {object} models.BasicResponse "Successfully generated test data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /generate/linux [post] func GenerateLinuxPostHandler(ctx echo.Context) error { start := time.Now() @@ -67,16 +68,17 @@ func GenerateLinuxPostHandler(ctx echo.Context) error { } // GenerateWindowsPostHandler godoc -// @Summary Generate test data on on-premise Windows -// @Description Generate test data on on-premise Windows. -// @Tags [Test Data Generation] On-premise Windows -// @Accept json -// @Produce json -// @Param RequestBody body GenDataParams true "Parameters required to generate test data" -// @Success 200 {object} models.BasicResponse "Successfully generated test data" -// @Failure 400 {object} models.BasicResponse "Invalid Request" -// @Failure 500 {object} models.BasicResponse "Internal Server Error" -// @Router /generate/windows [post] +// +// @Summary Generate test data on on-premise Windows +// @Description Generate test data on on-premise Windows. +// @Tags [Test Data Generation] +// @Accept json +// @Produce json +// @Param RequestBody body GenDataParams true "Parameters required to generate test data" +// @Success 200 {object} models.BasicResponse "Successfully generated test data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /generate/windows [post] func GenerateWindowsPostHandler(ctx echo.Context) error { start := time.Now() @@ -114,15 +116,16 @@ type GenerateS3PostHandlerResponseBody struct { } // GenerateS3PostHandler godoc -// @Summary Generate test data on AWS S3 -// @Description Generate test data on AWS S3. -// @Tags [Test Data Generation] AWS S3 -// @Accept json -// @Produce json -// @Param RequestBody body GenDataParams true "Parameters required to generate test data" -// @Success 200 {object} models.BasicResponse "Successfully generated test data" -// @Failure 500 {object} models.BasicResponse "Internal Server Error" -// @Router /generate/s3 [post] +// +// @Summary Generate test data on AWS S3 +// @Description Generate test data on AWS S3. +// @Tags [Test Data Generation] +// @Accept json +// @Produce json +// @Param RequestBody body GenDataParams true "Parameters required to generate test data" +// @Success 200 {object} models.BasicResponse "Successfully generated test data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /generate/s3 [post] func GenerateS3PostHandler(ctx echo.Context) error { start := time.Now() @@ -174,16 +177,17 @@ func GenerateS3PostHandler(ctx echo.Context) error { } // GenerateGCPPostHandler godoc -// @Summary Generate test data on GCP Cloud Storage -// @Description Generate test data on GCP Cloud Storage. -// @Tags [Test Data Generation] GCP Cloud Storage -// @Accept json -// @Produce json -// @Param RequestBody body GenDataParams true "Parameters required to generate test data" -// @Param CredentialGCP formData file true "Parameters required to generate test data" -// @Success 200 {object} models.BasicResponse "Successfully generated test data" -// @Failure 500 {object} models.BasicResponse "Internal Server Error" -// @Router /generate/gcp [post] +// +// @Summary Generate test data on GCP Cloud Storage +// @Description Generate test data on GCP Cloud Storage. +// @Tags [Test Data Generation] +// @Accept json +// @Produce json +// @Param RequestBody body GenDataParams true "Parameters required to generate test data" +// @Param CredentialGCP formData file true "Parameters required to generate test data" +// @Success 200 {object} models.BasicResponse "Successfully generated test data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /generate/gcp [post] func GenerateGCPPostHandler(ctx echo.Context) error { start := time.Now() @@ -251,15 +255,16 @@ func GenerateGCPPostHandler(ctx echo.Context) error { } // GenerateNCPPostHandler godoc -// @Summary Generate test data on NCP Object Storage -// @Description Generate test data on NCP Object Storage. -// @Tags [Test Data Generation] NCP Object Storage -// @Accept json -// @Produce json -// @Param RequestBody body GenDataParams true "Parameters required to generate test data" -// @Success 200 {object} models.BasicResponse "Successfully generated test data" -// @Failure 500 {object} models.BasicResponse "Internal Server Error" -// @Router /generate/ncp [post] +// +// @Summary Generate test data on NCP Object Storage +// @Description Generate test data on NCP Object Storage. +// @Tags [Test Data Generation] +// @Accept json +// @Produce json +// @Param RequestBody body GenDataParams true "Parameters required to generate test data" +// @Success 200 {object} models.BasicResponse "Successfully generated test data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /generate/ncp [post] func GenerateNCPPostHandler(ctx echo.Context) error { start := time.Now() @@ -311,15 +316,16 @@ func GenerateNCPPostHandler(ctx echo.Context) error { } // GenerateMySQLPostHandler godoc -// @Summary Generate test data on MySQL -// @Description Generate test data on MySQL. -// @Tags [Test Data Generation] MySQL -// @Accept json -// @Produce json -// @Param RequestBody body GenDataParams true "Parameters required to generate test data" -// @Success 200 {object} models.BasicResponse "Successfully generated test data" -// @Failure 500 {object} models.BasicResponse "Internal Server Error" -// @Router /generate/mysql [post] +// +// @Summary Generate test data on MySQL +// @Description Generate test data on MySQL. +// @Tags [Test Data Generation] +// @Accept json +// @Produce json +// @Param RequestBody body GenDataParams true "Parameters required to generate test data" +// @Success 200 {object} models.BasicResponse "Successfully generated test data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /generate/mysql [post] func GenerateMySQLPostHandler(ctx echo.Context) error { start := time.Now() @@ -403,15 +409,16 @@ func GenerateMySQLPostHandler(ctx echo.Context) error { } // GenerateDynamoDBPostHandler godoc -// @Summary Generate test data on AWS DynamoDB -// @Description Generate test data on AWS DynamoDB. -// @Tags [Test Data Generation] AWS DynamoDB -// @Accept json -// @Produce json -// @Param RequestBody body GenDataParams true "Parameters required to generate test data" -// @Success 200 {object} models.BasicResponse "Successfully generated test data" -// @Failure 500 {object} models.BasicResponse "Internal Server Error" -// @Router /generate/dynamodb [post] +// +// @Summary Generate test data on AWS DynamoDB +// @Description Generate test data on AWS DynamoDB. +// @Tags [Test Data Generation] +// @Accept json +// @Produce json +// @Param RequestBody body GenDataParams true "Parameters required to generate test data" +// @Success 200 {object} models.BasicResponse "Successfully generated test data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /generate/dynamodb [post] func GenerateDynamoDBPostHandler(ctx echo.Context) error { start := time.Now() @@ -470,16 +477,17 @@ func GenerateDynamoDBPostHandler(ctx echo.Context) error { } // GenerateFirestorePostHandler godoc -// @Summary Generate test data on GCP Firestore -// @Description Generate test data on GCP Firestore. -// @Tags [Test Data Generation] GCP Firestore -// @Accept json -// @Produce json -// @Param RequestBody body GenDataParams true "Parameters required to generate test data" -// @Param CredentialGCP formData file true "Parameters required to generate test data" -// @Success 200 {object} models.BasicResponse "Successfully generated test data" -// @Failure 500 {object} models.BasicResponse "Internal Server Error" -// @Router /generate/firestore [post] +// +// @Summary Generate test data on GCP Firestore +// @Description Generate test data on GCP Firestore. +// @Tags [Test Data Generation] +// @Accept json +// @Produce json +// @Param RequestBody body GenDataParams true "Parameters required to generate test data" +// @Param CredentialGCP formData file true "Parameters required to generate test data" +// @Success 200 {object} models.BasicResponse "Successfully generated test data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /generate/firestore [post] func GenerateFirestorePostHandler(ctx echo.Context) error { start := time.Now() @@ -553,15 +561,16 @@ func GenerateFirestorePostHandler(ctx echo.Context) error { } // GenerateMongoDBPostHandler godoc -// @Summary Generate test data on NCP MongoDB -// @Description Generate test data on NCP MongoDB. -// @Tags [Test Data Generation] NCP MongoDB -// @Accept json -// @Produce json -// @Param RequestBody body GenDataParams true "Parameters required to generate test data" -// @Success 200 {object} models.BasicResponse "Successfully generated test data" -// @Failure 500 {object} models.BasicResponse "Internal Server Error" -// @Router /generate/mongodb [post] +// +// @Summary Generate test data on NCP MongoDB +// @Description Generate test data on NCP MongoDB. +// @Tags [Test Data Generation] +// @Accept json +// @Produce json +// @Param RequestBody body GenDataParams true "Parameters required to generate test data" +// @Success 200 {object} models.BasicResponse "Successfully generated test data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /generate/mongodb [post] func GenerateMongoDBPostHandler(ctx echo.Context) error { start := time.Now() diff --git a/websrc/controllers/migrationGCPHandlers.go b/websrc/controllers/migrationGCPHandlers.go index d4e64fe..e8e5fea 100644 --- a/websrc/controllers/migrationGCPHandlers.go +++ b/websrc/controllers/migrationGCPHandlers.go @@ -24,10 +24,18 @@ import ( "github.com/labstack/echo/v4" ) -// Object Storage - -// FROM Google Cloud Storage - +// MigrationGCPToLinuxPostHandler godoc +// +// @Summary Migrate data from GCP to Linux +// @Description Migrate data stored in GCP Cloud Storage to a Linux-based system. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /gcp/linux [post] func MigrationGCPToLinuxPostHandler(ctx echo.Context) error { start := time.Now() @@ -81,6 +89,18 @@ func MigrationGCPToLinuxPostHandler(ctx echo.Context) error { }) } +// MigrationGCPToWindowsPostHandler godoc +// +// @Summary Migrate data from GCP to Windows +// @Description Migrate data stored in GCP Cloud Storage to a Windows-based system. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /gcp/windows [post] func MigrationGCPToWindowsPostHandler(ctx echo.Context) error { start := time.Now() @@ -134,6 +154,17 @@ func MigrationGCPToWindowsPostHandler(ctx echo.Context) error { }) } +// MigrationGCPToS3PostHandler godoc +// +// @Summary Migrate data from GCP to AWS S3 +// @Description Migrate data stored in GCP Cloud Storage to AWS S3. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /gcp/s3 [post] func MigrationGCPToS3PostHandler(ctx echo.Context) error { start := time.Now() @@ -193,6 +224,17 @@ func MigrationGCPToS3PostHandler(ctx echo.Context) error { }) } +// MigrationGCPToNCPPostHandler godoc +// +// @Summary Migrate data from GCP to NCP Object Storage +// @Description Migrate data stored in GCP Cloud Storage to NCP Object Storage. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /gcp/ncp [post] func MigrationGCPToNCPPostHandler(ctx echo.Context) error { start := time.Now() diff --git a/websrc/controllers/migrationHandlers.go b/websrc/controllers/migrationHandlers.go index c5f9003..78c6204 100644 --- a/websrc/controllers/migrationHandlers.go +++ b/websrc/controllers/migrationHandlers.go @@ -24,6 +24,18 @@ import ( "github.com/labstack/echo/v4" ) +// MigrationLinuxToS3PostHandler godoc +// +// @Summary Migrate data from Linux to AWS S3 +// @Description Migrate data stored in a Linux-based system to AWS S3. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /linux/s3 [post] func MigrationLinuxToS3PostHandler(ctx echo.Context) error { start := time.Now() @@ -67,6 +79,18 @@ func MigrationLinuxToS3PostHandler(ctx echo.Context) error { }) } +// MigrationLinuxToGCPPostHandler godoc +// +// @Summary Migrate data from Linux to GCP Cloud Storage +// @Description Migrate data stored in a Linux-based system to GCP Cloud Storage. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /linux/gcp [post] func MigrationLinuxToGCPPostHandler(ctx echo.Context) error { start := time.Now() @@ -124,6 +148,18 @@ func MigrationLinuxToGCPPostHandler(ctx echo.Context) error { }) } +// MigrationLinuxToNCPPostHandler godoc +// +// @Summary Migrate data from Linux to NCP Object Storage +// @Description Migrate data stored in a Linux-based system to NCP Object Storage. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /linux/ncp [post] func MigrationLinuxToNCPPostHandler(ctx echo.Context) error { start := time.Now() @@ -169,6 +205,18 @@ func MigrationLinuxToNCPPostHandler(ctx echo.Context) error { }) } +// MigrationWindowsToS3PostHandler godoc +// +// @Summary Migrate data from Windows to AWS S3 +// @Description Migrate data stored in a Windows-based system to AWS S3. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /windows/s3 [post] func MigrationWindowsToS3PostHandler(ctx echo.Context) error { start := time.Now() @@ -217,6 +265,18 @@ func MigrationWindowsToS3PostHandler(ctx echo.Context) error { }) } +// MigrationWindowsToGCPPostHandler godoc +// +// @Summary Migrate data from Windows to GCP Cloud Storage +// @Description Migrate data stored in a Windows-based system to GCP Cloud Storage. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /windows/gcp [post] func MigrationWindowsToGCPPostHandler(ctx echo.Context) error { start := time.Now() @@ -269,6 +329,18 @@ func MigrationWindowsToGCPPostHandler(ctx echo.Context) error { }) } +// MigrationWindowsToNCPPostHandler godoc +// +// @Summary Migrate data from Windows to NCP Object Storage +// @Description Migrate data stored in a Windows-based system to NCP Object Storage. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /windows/ncp [post] func MigrationWindowsToNCPPostHandler(ctx echo.Context) error { start := time.Now() @@ -313,8 +385,17 @@ func MigrationWindowsToNCPPostHandler(ctx echo.Context) error { }) } -// SQL Database - +// MigrationMySQLPostHandler godoc +// +// @Summary Migrate data from MySQL to MySQL +// @Description Migrate data from one MySQL database to another MySQL database. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationMySQLForm true "Parameters required for MySQL migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /mysql [post] func MigrationMySQLPostHandler(ctx echo.Context) error { start := time.Now() diff --git a/websrc/controllers/migrationNCPHandlers.go b/websrc/controllers/migrationNCPHandlers.go index 0742b58..dc4e76d 100644 --- a/websrc/controllers/migrationNCPHandlers.go +++ b/websrc/controllers/migrationNCPHandlers.go @@ -24,10 +24,18 @@ import ( "github.com/labstack/echo/v4" ) -// Object Storage - -// FROM Naver Object Storage - +// MigrationNCPToLinuxPostHandler godoc +// +// @Summary Migrate data from NCP to Linux +// @Description Migrate data stored in NCP Object Storage to a Linux-based system. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /ncp/linux [post] func MigrationNCPToLinuxPostHandler(ctx echo.Context) error { start := time.Now() @@ -71,6 +79,18 @@ func MigrationNCPToLinuxPostHandler(ctx echo.Context) error { }) } +// MigrationNCPToWindowsPostHandler godoc +// +// @Summary Migrate data from NCP to Windows +// @Description Migrate data stored in NCP Object Storage to a Windows-based system. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /ncp/windows [post] func MigrationNCPToWindowsPostHandler(ctx echo.Context) error { start := time.Now() @@ -115,6 +135,17 @@ func MigrationNCPToWindowsPostHandler(ctx echo.Context) error { }) } +// MigrationNCPToS3PostHandler godoc +// +// @Summary Migrate data from NCP to AWS S3 +// @Description Migrate data stored in NCP Object Storage to AWS S3. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /ncp/s3 [post] func MigrationNCPToS3PostHandler(ctx echo.Context) error { start := time.Now() @@ -165,6 +196,17 @@ func MigrationNCPToS3PostHandler(ctx echo.Context) error { }) } +// MigrationNCPToGCPPostHandler godoc +// +// @Summary Migrate data from NCP to GCP Cloud Storage +// @Description Migrate data stored in NCP Object Storage to GCP Cloud Storage. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /ncp/gcp [post] func MigrationNCPToGCPPostHandler(ctx echo.Context) error { start := time.Now() diff --git a/websrc/controllers/migrationNoSqlHandlers.go b/websrc/controllers/migrationNoSqlHandlers.go index 530f2e1..7906a7a 100644 --- a/websrc/controllers/migrationNoSqlHandlers.go +++ b/websrc/controllers/migrationNoSqlHandlers.go @@ -24,8 +24,16 @@ import ( "github.com/labstack/echo/v4" ) -// AWS DynamoDB to others - +// MigrationDynamoDBToFirestorePostHandler godoc +// @Summary Migrate data from DynamoDB to Firestore +// @Description Migrate data stored in AWS DynamoDB to Google Cloud Firestore. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /dynamodb/firestore [post] func MigrationDynamoDBToFirestorePostHandler(ctx echo.Context) error { start := time.Now() @@ -84,6 +92,16 @@ func MigrationDynamoDBToFirestorePostHandler(ctx echo.Context) error { }) } +// MigrationDynamoDBToMongoDBPostHandler godoc +// @Summary Migrate data from DynamoDB to MongoDB +// @Description Migrate data stored in AWS DynamoDB to Naver Cloud MongoDB. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /dynamodb/mongodb [post] func MigrationDynamoDBToMongoDBPostHandler(ctx echo.Context) error { start := time.Now() @@ -132,8 +150,16 @@ func MigrationDynamoDBToMongoDBPostHandler(ctx echo.Context) error { }) } -// Google Cloud Firestore to others - +// MigrationFirestoreToDynamoDBPostHandler godoc +// @Summary Migrate data from Firestore to DynamoDB +// @Description Migrate data stored in Google Cloud Firestore to AWS DynamoDB. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /firestore/dynamodb [post] func MigrationFirestoreToDynamoDBPostHandler(ctx echo.Context) error { start := time.Now() @@ -192,6 +218,16 @@ func MigrationFirestoreToDynamoDBPostHandler(ctx echo.Context) error { }) } +// MigrationFirestoreToMongoDBPostHandler godoc +// @Summary Migrate data from Firestore to MongoDB +// @Description Migrate data stored in Google Cloud Firestore to Naver Cloud MongoDB. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /firestore/mongodb [post] func MigrationFirestoreToMongoDBPostHandler(ctx echo.Context) error { start := time.Now() @@ -250,8 +286,16 @@ func MigrationFirestoreToMongoDBPostHandler(ctx echo.Context) error { }) } -// Naver Cloud MongoDB to others - +// MigrationMongoDBToDynamoDBPostHandler godoc +// @Summary Migrate data from MongoDB to DynamoDB +// @Description Migrate data stored in Naver Cloud MongoDB to AWS DynamoDB. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /mongodb/dynamodb [post] func MigrationMongoDBToDynamoDBPostHandler(ctx echo.Context) error { start := time.Now() @@ -301,6 +345,16 @@ func MigrationMongoDBToDynamoDBPostHandler(ctx echo.Context) error { }) } +// MigrationMongoDBToFirestorePostHandler godoc +// @Summary Migrate data from MongoDB to Firestore +// @Description Migrate data stored in Naver Cloud MongoDB to Google Cloud Firestore. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /mongodb/firestore [post] func MigrationMongoDBToFirestorePostHandler(ctx echo.Context) error { start := time.Now() diff --git a/websrc/controllers/migrationS3Handlers.go b/websrc/controllers/migrationS3Handlers.go index 7d64fc2..5b0e77d 100644 --- a/websrc/controllers/migrationS3Handlers.go +++ b/websrc/controllers/migrationS3Handlers.go @@ -24,10 +24,17 @@ import ( "github.com/labstack/echo/v4" ) -// Object Storage - -// FROM AWS S3 - +// MigrationS3ToLinuxPostHandler godoc +// @Summary Migrate data from AWS S3 to Linux +// @Description Migrate data stored in AWS S3 to a Linux-based system. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /s3/linux [post] func MigrationS3ToLinuxPostHandler(ctx echo.Context) error { start := time.Now() @@ -72,6 +79,17 @@ func MigrationS3ToLinuxPostHandler(ctx echo.Context) error { }) } +// MigrationS3ToWindowsPostHandler godoc +// @Summary Migrate data from AWS S3 to Windows +// @Description Migrate data stored in AWS S3 to a Windows-based system. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 400 {object} models.BasicResponse "Invalid Request" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /s3/windows [post] func MigrationS3ToWindowsPostHandler(ctx echo.Context) error { start := time.Now() @@ -116,6 +134,16 @@ func MigrationS3ToWindowsPostHandler(ctx echo.Context) error { }) } +// MigrationS3ToGCPPostHandler godoc +// @Summary Migrate data from AWS S3 to GCP +// @Description Migrate data stored in AWS S3 to Google Cloud Storage. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /s3/gcp [post] func MigrationS3ToGCPPostHandler(ctx echo.Context) error { start := time.Now() @@ -175,6 +203,16 @@ func MigrationS3ToGCPPostHandler(ctx echo.Context) error { }) } +// MigrationS3ToNCPPostHandler godoc +// @Summary Migrate data from AWS S3 to NCP +// @Description Migrate data stored in AWS S3 to Naver Cloud Object Storage. +// @Tags [Data Migration] +// @Accept json +// @Produce json +// @Param RequestBody body MigrationForm true "Parameters required for migration" +// @Success 200 {object} models.BasicResponse "Successfully migrated data" +// @Failure 500 {object} models.BasicResponse "Internal Server Error" +// @Router /s3/ncp [post] func MigrationS3ToNCPPostHandler(ctx echo.Context) error { start := time.Now() diff --git a/websrc/controllers/migrationStructs.go b/websrc/controllers/migrationStructs.go index 5aeac97..bb9ba96 100644 --- a/websrc/controllers/migrationStructs.go +++ b/websrc/controllers/migrationStructs.go @@ -17,6 +17,8 @@ package controllers import "mime/multipart" +// MigrationForm represents the form data required for migration processes. +// @Description MigrationForm contains all the necessary fields for migrating data between different services. type MigrationForm struct { Path string `form:"path"` @@ -25,10 +27,7 @@ type MigrationForm struct { AWSSecretKey string `form:"awsSecretKey"` AWSBucket string `form:"awsBucket"` - ProjectID string `form:"projectid"` - GCPRegion string `form:"gcpRegion"` - GCPBucket string `form:"gcpBucket"` - GCPCredential *multipart.FileHeader `form:"gcpCredential"` + GCPParams GCPMigrationParams `json:"gcpParams"` NCPRegion string `form:"ncpRegion"` NCPAccessKey string `form:"ncpAccessKey"` @@ -42,6 +41,12 @@ type MigrationForm struct { MongoPassword string `form:"password"` MongoDBName string `form:"databaseName"` } +type GCPMigrationParams struct { + ProjectID string `form:"projectid" json:"projectid"` + GCPRegion string `form:"gcpRegion" json:"gcpRegion"` + GCPBucket string `form:"gcpBucket" json:"gcpBucket"` + GCPCredential *multipart.FileHeader `form:"gcpCredential" json:"-" swaggerignore:"true"` +} type MigrationMySQLParams struct { Source MySQLParams diff --git a/websrc/controllers/publicfunc.go b/websrc/controllers/publicfunc.go index d5e07e6..9454d77 100644 --- a/websrc/controllers/publicfunc.go +++ b/websrc/controllers/publicfunc.go @@ -215,7 +215,7 @@ func getGCPCOSC(logger *logrus.Logger, startTime time.Time, jobType string, para if jobType == "gen" { gcpOSC, err = osc.New(gcpfs.New(gc, gparam.ProjectID, gparam.Bucket, gparam.Region), osc.WithLogger(logger)) } else { - gcpOSC, err = osc.New(gcpfs.New(gc, mparam.ProjectID, mparam.GCPBucket, mparam.GCPRegion), osc.WithLogger(logger)) + gcpOSC, err = osc.New(gcpfs.New(gc, mparam.GCPParams.ProjectID, mparam.GCPParams.GCPBucket, mparam.GCPParams.GCPRegion), osc.WithLogger(logger)) } if err != nil { end := time.Now() @@ -328,7 +328,7 @@ func getFirestoreNRDBC(logger *logrus.Logger, startTime time.Time, jobType strin if jobType == "gen" { fc, err = config.NewFireStoreClient(credFileName, gparam.ProjectID) } else { - fc, err = config.NewFireStoreClient(credFileName, mparam.ProjectID) + fc, err = config.NewFireStoreClient(credFileName, mparam.GCPParams.ProjectID) } if err != nil { end := time.Now() @@ -342,7 +342,7 @@ func getFirestoreNRDBC(logger *logrus.Logger, startTime time.Time, jobType strin if jobType == "gen" { NRDBC, err = nrdbc.New(gcpfsdb.New(fc, gparam.Region), nrdbc.WithLogger(logger)) } else { - NRDBC, err = nrdbc.New(gcpfsdb.New(fc, mparam.GCPRegion), nrdbc.WithLogger(logger)) + NRDBC, err = nrdbc.New(gcpfsdb.New(fc, mparam.GCPParams.GCPRegion), nrdbc.WithLogger(logger)) } if err != nil { end := time.Now() diff --git a/websrc/docs/docs.go b/websrc/docs/docs.go index b4a166e..f663721 100644 --- a/websrc/docs/docs.go +++ b/websrc/docs/docs.go @@ -9,23 +9,991 @@ const docTemplate = `{ "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", - "contact": { - "name": "API Support", - "url": "http://cloud-barista.github.io", - "email": "contact-to-cloud-barista@googlegroups.com" + "contact": {}, + "version": "{{.Version}}" + }, + "host": "{{.Host}}", + "basePath": "{{.BasePath}}", + "paths": { + "/dynamodb/firestore": { + "post": { + "description": "Migrate data stored in AWS DynamoDB to Google Cloud Firestore.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from DynamoDB to Firestore", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/dynamodb/mongodb": { + "post": { + "description": "Migrate data stored in AWS DynamoDB to Naver Cloud MongoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from DynamoDB to MongoDB", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/firestore/dynamodb": { + "post": { + "description": "Migrate data stored in Google Cloud Firestore to AWS DynamoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Firestore to DynamoDB", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/firestore/mongodb": { + "post": { + "description": "Migrate data stored in Google Cloud Firestore to Naver Cloud MongoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Firestore to MongoDB", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/gcp/linux": { + "post": { + "description": "Migrate data stored in GCP Cloud Storage to a Linux-based system.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from GCP to Linux", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/gcp/ncp": { + "post": { + "description": "Migrate data stored in GCP Cloud Storage to NCP Object Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from GCP to NCP Object Storage", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/gcp/s3": { + "post": { + "description": "Migrate data stored in GCP Cloud Storage to AWS S3.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from GCP to AWS S3", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/gcp/windows": { + "post": { + "description": "Migrate data stored in GCP Cloud Storage to a Windows-based system.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from GCP to Windows", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/dynamodb": { + "post": { + "description": "Generate test data on AWS DynamoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on AWS DynamoDB", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/firestore": { + "post": { + "description": "Generate test data on GCP Firestore.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on GCP Firestore", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + }, + { + "type": "file", + "description": "Parameters required to generate test data", + "name": "CredentialGCP", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/gcp": { + "post": { + "description": "Generate test data on GCP Cloud Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on GCP Cloud Storage", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + }, + { + "type": "file", + "description": "Parameters required to generate test data", + "name": "CredentialGCP", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/linux": { + "post": { + "description": "Generate test data on on-premise Linux.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on on-premise Linux", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/mongodb": { + "post": { + "description": "Generate test data on NCP MongoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on NCP MongoDB", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/mysql": { + "post": { + "description": "Generate test data on MySQL.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on MySQL", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/ncp": { + "post": { + "description": "Generate test data on NCP Object Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on NCP Object Storage", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/s3": { + "post": { + "description": "Generate test data on AWS S3.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on AWS S3", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/windows": { + "post": { + "description": "Generate test data on on-premise Windows.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on on-premise Windows", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/linux/gcp": { + "post": { + "description": "Migrate data stored in a Linux-based system to GCP Cloud Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Linux to GCP Cloud Storage", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/linux/ncp": { + "post": { + "description": "Migrate data stored in a Linux-based system to NCP Object Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Linux to NCP Object Storage", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/linux/s3": { + "post": { + "description": "Migrate data stored in a Linux-based system to AWS S3.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Linux to AWS S3", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/mongodb/dynamodb": { + "post": { + "description": "Migrate data stored in Naver Cloud MongoDB to AWS DynamoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from MongoDB to DynamoDB", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/mongodb/firestore": { + "post": { + "description": "Migrate data stored in Naver Cloud MongoDB to Google Cloud Firestore.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from MongoDB to Firestore", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } }, - "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + "/mysql": { + "post": { + "description": "Migrate data from one MySQL database to another MySQL database.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from MySQL to MySQL", + "parameters": [ + { + "description": "Parameters required for MySQL migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationMySQLForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } }, - "version": "{{.Version}}" - }, - "host": "{{.Host}}", - "basePath": "{{.BasePath}}", - "paths": { - "/generate/dynamodb": { + "/ncp/gcp": { "post": { - "description": "Generate test data on AWS DynamoDB.", + "description": "Migrate data stored in NCP Object Storage to GCP Cloud Storage.", "consumes": [ "application/json" ], @@ -33,23 +1001,23 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Test Data Generation] AWS DynamoDB" + "[Data Migration]" ], - "summary": "Generate test data on AWS DynamoDB", + "summary": "Migrate data from NCP to GCP Cloud Storage", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -63,9 +1031,9 @@ const docTemplate = `{ } } }, - "/generate/firestore": { + "/ncp/linux": { "post": { - "description": "Generate test data on GCP Firestore.", + "description": "Migrate data stored in NCP Object Storage to a Linux-based system.", "consumes": [ "application/json" ], @@ -73,30 +1041,69 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Test Data Generation] GCP Firestore" + "[Data Migration]" ], - "summary": "Generate test data on GCP Firestore", + "summary": "Migrate data from NCP to Linux", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" } }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/ncp/s3": { + "post": { + "description": "Migrate data stored in NCP Object Storage to AWS S3.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from NCP to AWS S3", + "parameters": [ { - "type": "file", - "description": "Parameters required to generate test data", - "name": "CredentialGCP", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -110,9 +1117,9 @@ const docTemplate = `{ } } }, - "/generate/gcp": { + "/ncp/windows": { "post": { - "description": "Generate test data on GCP Cloud Storage.", + "description": "Migrate data stored in NCP Object Storage to a Windows-based system.", "consumes": [ "application/json" ], @@ -120,30 +1127,69 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Test Data Generation] GCP Cloud Storage" + "[Data Migration]" ], - "summary": "Generate test data on GCP Cloud Storage", + "summary": "Migrate data from NCP to Windows", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" } }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/s3/gcp": { + "post": { + "description": "Migrate data stored in AWS S3 to Google Cloud Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from AWS S3 to GCP", + "parameters": [ { - "type": "file", - "description": "Parameters required to generate test data", - "name": "CredentialGCP", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -157,9 +1203,9 @@ const docTemplate = `{ } } }, - "/generate/linux": { + "/s3/linux": { "post": { - "description": "Generate test data on on-premise Linux.", + "description": "Migrate data stored in AWS S3 to a Linux-based system.", "consumes": [ "application/json" ], @@ -167,23 +1213,23 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Test Data Generation] On-premise Linux" + "[Data Migration]" ], - "summary": "Generate test data on on-premise Linux", + "summary": "Migrate data from AWS S3 to Linux", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -203,9 +1249,9 @@ const docTemplate = `{ } } }, - "/generate/mongodb": { + "/s3/ncp": { "post": { - "description": "Generate test data on NCP MongoDB.", + "description": "Migrate data stored in AWS S3 to Naver Cloud Object Storage.", "consumes": [ "application/json" ], @@ -213,23 +1259,23 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Test Data Generation] NCP MongoDB" + "[Data Migration]" ], - "summary": "Generate test data on NCP MongoDB", + "summary": "Migrate data from AWS S3 to NCP", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -243,9 +1289,9 @@ const docTemplate = `{ } } }, - "/generate/mysql": { + "/s3/windows": { "post": { - "description": "Generate test data on MySQL.", + "description": "Migrate data stored in AWS S3 to a Windows-based system.", "consumes": [ "application/json" ], @@ -253,23 +1299,29 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Test Data Generation] MySQL" + "[Data Migration]" ], - "summary": "Generate test data on MySQL", + "summary": "Migrate data from AWS S3 to Windows", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -283,9 +1335,9 @@ const docTemplate = `{ } } }, - "/generate/ncp": { + "/windows/gcp": { "post": { - "description": "Generate test data on NCP Object Storage.", + "description": "Migrate data stored in a Windows-based system to GCP Cloud Storage.", "consumes": [ "application/json" ], @@ -293,23 +1345,29 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Test Data Generation] NCP Object Storage" + "[Data Migration]" ], - "summary": "Generate test data on NCP Object Storage", + "summary": "Migrate data from Windows to GCP Cloud Storage", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -323,9 +1381,9 @@ const docTemplate = `{ } } }, - "/generate/s3": { + "/windows/ncp": { "post": { - "description": "Generate test data on AWS S3.", + "description": "Migrate data stored in a Windows-based system to NCP Object Storage.", "consumes": [ "application/json" ], @@ -333,23 +1391,29 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Test Data Generation] AWS S3" + "[Data Migration]" ], - "summary": "Generate test data on AWS S3", + "summary": "Migrate data from Windows to NCP Object Storage", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -363,9 +1427,9 @@ const docTemplate = `{ } } }, - "/generate/windows": { + "/windows/s3": { "post": { - "description": "Generate test data on on-premise Windows.", + "description": "Migrate data stored in a Windows-based system to AWS S3.", "consumes": [ "application/json" ], @@ -373,23 +1437,23 @@ const docTemplate = `{ "application/json" ], "tags": [ - "[Test Data Generation] On-premise Windows" + "[Data Migration]" ], - "summary": "Generate test data on on-premise Windows", + "summary": "Migrate data from Windows to AWS S3", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -411,6 +1475,20 @@ const docTemplate = `{ } }, "definitions": { + "controllers.GCPMigrationParams": { + "type": "object", + "properties": { + "gcpBucket": { + "type": "string" + }, + "gcpRegion": { + "type": "string" + }, + "projectid": { + "type": "string" + } + } + }, "controllers.GenDataParams": { "type": "object", "properties": { @@ -515,6 +1593,101 @@ const docTemplate = `{ } } }, + "controllers.MigrationForm": { + "description": "MigrationForm contains all the necessary fields for migrating data between different services.", + "type": "object", + "properties": { + "awsAccessKey": { + "type": "string" + }, + "awsBucket": { + "type": "string" + }, + "awsRegion": { + "type": "string" + }, + "awsSecretKey": { + "type": "string" + }, + "databaseName": { + "type": "string" + }, + "gcpParams": { + "$ref": "#/definitions/controllers.GCPMigrationParams" + }, + "host": { + "type": "string" + }, + "ncpAccessKey": { + "type": "string" + }, + "ncpBucket": { + "type": "string" + }, + "ncpEndpoint": { + "type": "string" + }, + "ncpRegion": { + "type": "string" + }, + "ncpSecretKey": { + "type": "string" + }, + "password": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "controllers.MigrationMySQLForm": { + "type": "object", + "properties": { + "destDatabaseName": { + "type": "string" + }, + "destHost": { + "type": "string" + }, + "destPassword": { + "type": "string" + }, + "destPort": { + "type": "string" + }, + "destProvider": { + "type": "string" + }, + "destUsername": { + "type": "string" + }, + "srcDatabaseName": { + "type": "string" + }, + "srcHost": { + "type": "string" + }, + "srcPassword": { + "type": "string" + }, + "srcPort": { + "type": "string" + }, + "srcProvider": { + "type": "string" + }, + "srcUsername": { + "type": "string" + } + } + }, "models.BasicResponse": { "type": "object", "properties": { @@ -531,12 +1704,12 @@ const docTemplate = `{ // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ - Version: "latest", + Version: "", Host: "", - BasePath: "/", + BasePath: "", Schemes: []string{}, - Title: "CM-DataMold REST API", - Description: "CM-DataMold REST API", + Title: "", + Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", diff --git a/websrc/docs/swagger.json b/websrc/docs/swagger.json index 5bdda39..8da91b8 100644 --- a/websrc/docs/swagger.json +++ b/websrc/docs/swagger.json @@ -1,24 +1,988 @@ { "swagger": "2.0", "info": { - "description": "CM-DataMold REST API", - "title": "CM-DataMold REST API", - "contact": { - "name": "API Support", - "url": "http://cloud-barista.github.io", - "email": "contact-to-cloud-barista@googlegroups.com" - }, - "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "latest" + "contact": {} }, - "basePath": "/", "paths": { + "/dynamodb/firestore": { + "post": { + "description": "Migrate data stored in AWS DynamoDB to Google Cloud Firestore.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from DynamoDB to Firestore", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/dynamodb/mongodb": { + "post": { + "description": "Migrate data stored in AWS DynamoDB to Naver Cloud MongoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from DynamoDB to MongoDB", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/firestore/dynamodb": { + "post": { + "description": "Migrate data stored in Google Cloud Firestore to AWS DynamoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Firestore to DynamoDB", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/firestore/mongodb": { + "post": { + "description": "Migrate data stored in Google Cloud Firestore to Naver Cloud MongoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Firestore to MongoDB", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/gcp/linux": { + "post": { + "description": "Migrate data stored in GCP Cloud Storage to a Linux-based system.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from GCP to Linux", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/gcp/ncp": { + "post": { + "description": "Migrate data stored in GCP Cloud Storage to NCP Object Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from GCP to NCP Object Storage", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/gcp/s3": { + "post": { + "description": "Migrate data stored in GCP Cloud Storage to AWS S3.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from GCP to AWS S3", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/gcp/windows": { + "post": { + "description": "Migrate data stored in GCP Cloud Storage to a Windows-based system.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from GCP to Windows", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, "/generate/dynamodb": { "post": { - "description": "Generate test data on AWS DynamoDB.", + "description": "Generate test data on AWS DynamoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on AWS DynamoDB", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/firestore": { + "post": { + "description": "Generate test data on GCP Firestore.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on GCP Firestore", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + }, + { + "type": "file", + "description": "Parameters required to generate test data", + "name": "CredentialGCP", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/gcp": { + "post": { + "description": "Generate test data on GCP Cloud Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on GCP Cloud Storage", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + }, + { + "type": "file", + "description": "Parameters required to generate test data", + "name": "CredentialGCP", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/linux": { + "post": { + "description": "Generate test data on on-premise Linux.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on on-premise Linux", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/mongodb": { + "post": { + "description": "Generate test data on NCP MongoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on NCP MongoDB", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/mysql": { + "post": { + "description": "Generate test data on MySQL.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on MySQL", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/ncp": { + "post": { + "description": "Generate test data on NCP Object Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on NCP Object Storage", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/s3": { + "post": { + "description": "Generate test data on AWS S3.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on AWS S3", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/generate/windows": { + "post": { + "description": "Generate test data on on-premise Windows.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Test Data Generation]" + ], + "summary": "Generate test data on on-premise Windows", + "parameters": [ + { + "description": "Parameters required to generate test data", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.GenDataParams" + } + } + ], + "responses": { + "200": { + "description": "Successfully generated test data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/linux/gcp": { + "post": { + "description": "Migrate data stored in a Linux-based system to GCP Cloud Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Linux to GCP Cloud Storage", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/linux/ncp": { + "post": { + "description": "Migrate data stored in a Linux-based system to NCP Object Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Linux to NCP Object Storage", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/linux/s3": { + "post": { + "description": "Migrate data stored in a Linux-based system to AWS S3.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from Linux to AWS S3", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/mongodb/dynamodb": { + "post": { + "description": "Migrate data stored in Naver Cloud MongoDB to AWS DynamoDB.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from MongoDB to DynamoDB", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/mongodb/firestore": { + "post": { + "description": "Migrate data stored in Naver Cloud MongoDB to Google Cloud Firestore.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from MongoDB to Firestore", + "parameters": [ + { + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/mysql": { + "post": { + "description": "Migrate data from one MySQL database to another MySQL database.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from MySQL to MySQL", + "parameters": [ + { + "description": "Parameters required for MySQL migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationMySQLForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/ncp/gcp": { + "post": { + "description": "Migrate data stored in NCP Object Storage to GCP Cloud Storage.", "consumes": [ "application/json" ], @@ -26,23 +990,23 @@ "application/json" ], "tags": [ - "[Test Data Generation] AWS DynamoDB" + "[Data Migration]" ], - "summary": "Generate test data on AWS DynamoDB", + "summary": "Migrate data from NCP to GCP Cloud Storage", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -56,9 +1020,9 @@ } } }, - "/generate/firestore": { + "/ncp/linux": { "post": { - "description": "Generate test data on GCP Firestore.", + "description": "Migrate data stored in NCP Object Storage to a Linux-based system.", "consumes": [ "application/json" ], @@ -66,30 +1030,69 @@ "application/json" ], "tags": [ - "[Test Data Generation] GCP Firestore" + "[Data Migration]" ], - "summary": "Generate test data on GCP Firestore", + "summary": "Migrate data from NCP to Linux", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" } }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/ncp/s3": { + "post": { + "description": "Migrate data stored in NCP Object Storage to AWS S3.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from NCP to AWS S3", + "parameters": [ { - "type": "file", - "description": "Parameters required to generate test data", - "name": "CredentialGCP", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -103,9 +1106,9 @@ } } }, - "/generate/gcp": { + "/ncp/windows": { "post": { - "description": "Generate test data on GCP Cloud Storage.", + "description": "Migrate data stored in NCP Object Storage to a Windows-based system.", "consumes": [ "application/json" ], @@ -113,30 +1116,69 @@ "application/json" ], "tags": [ - "[Test Data Generation] GCP Cloud Storage" + "[Data Migration]" ], - "summary": "Generate test data on GCP Cloud Storage", + "summary": "Migrate data from NCP to Windows", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" + } + } + ], + "responses": { + "200": { + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", + "schema": { + "$ref": "#/definitions/models.BasicResponse" } }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + } + } + } + }, + "/s3/gcp": { + "post": { + "description": "Migrate data stored in AWS S3 to Google Cloud Storage.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "[Data Migration]" + ], + "summary": "Migrate data from AWS S3 to GCP", + "parameters": [ { - "type": "file", - "description": "Parameters required to generate test data", - "name": "CredentialGCP", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrationForm" + } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -150,9 +1192,9 @@ } } }, - "/generate/linux": { + "/s3/linux": { "post": { - "description": "Generate test data on on-premise Linux.", + "description": "Migrate data stored in AWS S3 to a Linux-based system.", "consumes": [ "application/json" ], @@ -160,23 +1202,23 @@ "application/json" ], "tags": [ - "[Test Data Generation] On-premise Linux" + "[Data Migration]" ], - "summary": "Generate test data on on-premise Linux", + "summary": "Migrate data from AWS S3 to Linux", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -196,9 +1238,9 @@ } } }, - "/generate/mongodb": { + "/s3/ncp": { "post": { - "description": "Generate test data on NCP MongoDB.", + "description": "Migrate data stored in AWS S3 to Naver Cloud Object Storage.", "consumes": [ "application/json" ], @@ -206,23 +1248,23 @@ "application/json" ], "tags": [ - "[Test Data Generation] NCP MongoDB" + "[Data Migration]" ], - "summary": "Generate test data on NCP MongoDB", + "summary": "Migrate data from AWS S3 to NCP", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -236,9 +1278,9 @@ } } }, - "/generate/mysql": { + "/s3/windows": { "post": { - "description": "Generate test data on MySQL.", + "description": "Migrate data stored in AWS S3 to a Windows-based system.", "consumes": [ "application/json" ], @@ -246,23 +1288,29 @@ "application/json" ], "tags": [ - "[Test Data Generation] MySQL" + "[Data Migration]" ], - "summary": "Generate test data on MySQL", + "summary": "Migrate data from AWS S3 to Windows", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -276,9 +1324,9 @@ } } }, - "/generate/ncp": { + "/windows/gcp": { "post": { - "description": "Generate test data on NCP Object Storage.", + "description": "Migrate data stored in a Windows-based system to GCP Cloud Storage.", "consumes": [ "application/json" ], @@ -286,23 +1334,29 @@ "application/json" ], "tags": [ - "[Test Data Generation] NCP Object Storage" + "[Data Migration]" ], - "summary": "Generate test data on NCP Object Storage", + "summary": "Migrate data from Windows to GCP Cloud Storage", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -316,9 +1370,9 @@ } } }, - "/generate/s3": { + "/windows/ncp": { "post": { - "description": "Generate test data on AWS S3.", + "description": "Migrate data stored in a Windows-based system to NCP Object Storage.", "consumes": [ "application/json" ], @@ -326,23 +1380,29 @@ "application/json" ], "tags": [ - "[Test Data Generation] AWS S3" + "[Data Migration]" ], - "summary": "Generate test data on AWS S3", + "summary": "Migrate data from Windows to NCP Object Storage", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", + "schema": { + "$ref": "#/definitions/models.BasicResponse" + } + }, + "400": { + "description": "Invalid Request", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -356,9 +1416,9 @@ } } }, - "/generate/windows": { + "/windows/s3": { "post": { - "description": "Generate test data on on-premise Windows.", + "description": "Migrate data stored in a Windows-based system to AWS S3.", "consumes": [ "application/json" ], @@ -366,23 +1426,23 @@ "application/json" ], "tags": [ - "[Test Data Generation] On-premise Windows" + "[Data Migration]" ], - "summary": "Generate test data on on-premise Windows", + "summary": "Migrate data from Windows to AWS S3", "parameters": [ { - "description": "Parameters required to generate test data", + "description": "Parameters required for migration", "name": "RequestBody", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/controllers.GenDataParams" + "$ref": "#/definitions/controllers.MigrationForm" } } ], "responses": { "200": { - "description": "Successfully generated test data", + "description": "Successfully migrated data", "schema": { "$ref": "#/definitions/models.BasicResponse" } @@ -404,6 +1464,20 @@ } }, "definitions": { + "controllers.GCPMigrationParams": { + "type": "object", + "properties": { + "gcpBucket": { + "type": "string" + }, + "gcpRegion": { + "type": "string" + }, + "projectid": { + "type": "string" + } + } + }, "controllers.GenDataParams": { "type": "object", "properties": { @@ -508,6 +1582,101 @@ } } }, + "controllers.MigrationForm": { + "description": "MigrationForm contains all the necessary fields for migrating data between different services.", + "type": "object", + "properties": { + "awsAccessKey": { + "type": "string" + }, + "awsBucket": { + "type": "string" + }, + "awsRegion": { + "type": "string" + }, + "awsSecretKey": { + "type": "string" + }, + "databaseName": { + "type": "string" + }, + "gcpParams": { + "$ref": "#/definitions/controllers.GCPMigrationParams" + }, + "host": { + "type": "string" + }, + "ncpAccessKey": { + "type": "string" + }, + "ncpBucket": { + "type": "string" + }, + "ncpEndpoint": { + "type": "string" + }, + "ncpRegion": { + "type": "string" + }, + "ncpSecretKey": { + "type": "string" + }, + "password": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "controllers.MigrationMySQLForm": { + "type": "object", + "properties": { + "destDatabaseName": { + "type": "string" + }, + "destHost": { + "type": "string" + }, + "destPassword": { + "type": "string" + }, + "destPort": { + "type": "string" + }, + "destProvider": { + "type": "string" + }, + "destUsername": { + "type": "string" + }, + "srcDatabaseName": { + "type": "string" + }, + "srcHost": { + "type": "string" + }, + "srcPassword": { + "type": "string" + }, + "srcPort": { + "type": "string" + }, + "srcProvider": { + "type": "string" + }, + "srcUsername": { + "type": "string" + } + } + }, "models.BasicResponse": { "type": "object", "properties": { diff --git a/websrc/docs/swagger.yaml b/websrc/docs/swagger.yaml index fc425a8..b96bb63 100644 --- a/websrc/docs/swagger.yaml +++ b/websrc/docs/swagger.yaml @@ -1,5 +1,13 @@ -basePath: / definitions: + controllers.GCPMigrationParams: + properties: + gcpBucket: + type: string + gcpRegion: + type: string + projectid: + type: string + type: object controllers.GenDataParams: properties: accessKey: @@ -69,6 +77,70 @@ definitions: username: type: string type: object + controllers.MigrationForm: + description: MigrationForm contains all the necessary fields for migrating data + between different services. + properties: + awsAccessKey: + type: string + awsBucket: + type: string + awsRegion: + type: string + awsSecretKey: + type: string + databaseName: + type: string + gcpParams: + $ref: '#/definitions/controllers.GCPMigrationParams' + host: + type: string + ncpAccessKey: + type: string + ncpBucket: + type: string + ncpEndpoint: + type: string + ncpRegion: + type: string + ncpSecretKey: + type: string + password: + type: string + path: + type: string + port: + type: string + username: + type: string + type: object + controllers.MigrationMySQLForm: + properties: + destDatabaseName: + type: string + destHost: + type: string + destPassword: + type: string + destPort: + type: string + destProvider: + type: string + destUsername: + type: string + srcDatabaseName: + type: string + srcHost: + type: string + srcPassword: + type: string + srcPort: + type: string + srcProvider: + type: string + srcUsername: + type: string + type: object models.BasicResponse: properties: Error: @@ -77,17 +149,224 @@ definitions: type: string type: object info: - contact: - email: contact-to-cloud-barista@googlegroups.com - name: API Support - url: http://cloud-barista.github.io - description: CM-DataMold REST API - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html - title: CM-DataMold REST API - version: latest + contact: {} paths: + /dynamodb/firestore: + post: + consumes: + - application/json + description: Migrate data stored in AWS DynamoDB to Google Cloud Firestore. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from DynamoDB to Firestore + tags: + - '[Data Migration]' + /dynamodb/mongodb: + post: + consumes: + - application/json + description: Migrate data stored in AWS DynamoDB to Naver Cloud MongoDB. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from DynamoDB to MongoDB + tags: + - '[Data Migration]' + /firestore/dynamodb: + post: + consumes: + - application/json + description: Migrate data stored in Google Cloud Firestore to AWS DynamoDB. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from Firestore to DynamoDB + tags: + - '[Data Migration]' + /firestore/mongodb: + post: + consumes: + - application/json + description: Migrate data stored in Google Cloud Firestore to Naver Cloud MongoDB. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from Firestore to MongoDB + tags: + - '[Data Migration]' + /gcp/linux: + post: + consumes: + - application/json + description: Migrate data stored in GCP Cloud Storage to a Linux-based system. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from GCP to Linux + tags: + - '[Data Migration]' + /gcp/ncp: + post: + consumes: + - application/json + description: Migrate data stored in GCP Cloud Storage to NCP Object Storage. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from GCP to NCP Object Storage + tags: + - '[Data Migration]' + /gcp/s3: + post: + consumes: + - application/json + description: Migrate data stored in GCP Cloud Storage to AWS S3. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from GCP to AWS S3 + tags: + - '[Data Migration]' + /gcp/windows: + post: + consumes: + - application/json + description: Migrate data stored in GCP Cloud Storage to a Windows-based system. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from GCP to Windows + tags: + - '[Data Migration]' /generate/dynamodb: post: consumes: @@ -113,7 +392,7 @@ paths: $ref: '#/definitions/models.BasicResponse' summary: Generate test data on AWS DynamoDB tags: - - '[Test Data Generation] AWS DynamoDB' + - '[Test Data Generation]' /generate/firestore: post: consumes: @@ -144,7 +423,7 @@ paths: $ref: '#/definitions/models.BasicResponse' summary: Generate test data on GCP Firestore tags: - - '[Test Data Generation] GCP Firestore' + - '[Test Data Generation]' /generate/gcp: post: consumes: @@ -175,7 +454,7 @@ paths: $ref: '#/definitions/models.BasicResponse' summary: Generate test data on GCP Cloud Storage tags: - - '[Test Data Generation] GCP Cloud Storage' + - '[Test Data Generation]' /generate/linux: post: consumes: @@ -205,7 +484,7 @@ paths: $ref: '#/definitions/models.BasicResponse' summary: Generate test data on on-premise Linux tags: - - '[Test Data Generation] On-premise Linux' + - '[Test Data Generation]' /generate/mongodb: post: consumes: @@ -231,7 +510,7 @@ paths: $ref: '#/definitions/models.BasicResponse' summary: Generate test data on NCP MongoDB tags: - - '[Test Data Generation] NCP MongoDB' + - '[Test Data Generation]' /generate/mysql: post: consumes: @@ -257,7 +536,7 @@ paths: $ref: '#/definitions/models.BasicResponse' summary: Generate test data on MySQL tags: - - '[Test Data Generation] MySQL' + - '[Test Data Generation]' /generate/ncp: post: consumes: @@ -283,7 +562,7 @@ paths: $ref: '#/definitions/models.BasicResponse' summary: Generate test data on NCP Object Storage tags: - - '[Test Data Generation] NCP Object Storage' + - '[Test Data Generation]' /generate/s3: post: consumes: @@ -309,7 +588,7 @@ paths: $ref: '#/definitions/models.BasicResponse' summary: Generate test data on AWS S3 tags: - - '[Test Data Generation] AWS S3' + - '[Test Data Generation]' /generate/windows: post: consumes: @@ -339,5 +618,487 @@ paths: $ref: '#/definitions/models.BasicResponse' summary: Generate test data on on-premise Windows tags: - - '[Test Data Generation] On-premise Windows' + - '[Test Data Generation]' + /linux/gcp: + post: + consumes: + - application/json + description: Migrate data stored in a Linux-based system to GCP Cloud Storage. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from Linux to GCP Cloud Storage + tags: + - '[Data Migration]' + /linux/ncp: + post: + consumes: + - application/json + description: Migrate data stored in a Linux-based system to NCP Object Storage. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from Linux to NCP Object Storage + tags: + - '[Data Migration]' + /linux/s3: + post: + consumes: + - application/json + description: Migrate data stored in a Linux-based system to AWS S3. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from Linux to AWS S3 + tags: + - '[Data Migration]' + /mongodb/dynamodb: + post: + consumes: + - application/json + description: Migrate data stored in Naver Cloud MongoDB to AWS DynamoDB. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from MongoDB to DynamoDB + tags: + - '[Data Migration]' + /mongodb/firestore: + post: + consumes: + - application/json + description: Migrate data stored in Naver Cloud MongoDB to Google Cloud Firestore. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from MongoDB to Firestore + tags: + - '[Data Migration]' + /mysql: + post: + consumes: + - application/json + description: Migrate data from one MySQL database to another MySQL database. + parameters: + - description: Parameters required for MySQL migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationMySQLForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from MySQL to MySQL + tags: + - '[Data Migration]' + /ncp/gcp: + post: + consumes: + - application/json + description: Migrate data stored in NCP Object Storage to GCP Cloud Storage. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from NCP to GCP Cloud Storage + tags: + - '[Data Migration]' + /ncp/linux: + post: + consumes: + - application/json + description: Migrate data stored in NCP Object Storage to a Linux-based system. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from NCP to Linux + tags: + - '[Data Migration]' + /ncp/s3: + post: + consumes: + - application/json + description: Migrate data stored in NCP Object Storage to AWS S3. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from NCP to AWS S3 + tags: + - '[Data Migration]' + /ncp/windows: + post: + consumes: + - application/json + description: Migrate data stored in NCP Object Storage to a Windows-based system. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from NCP to Windows + tags: + - '[Data Migration]' + /s3/gcp: + post: + consumes: + - application/json + description: Migrate data stored in AWS S3 to Google Cloud Storage. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from AWS S3 to GCP + tags: + - '[Data Migration]' + /s3/linux: + post: + consumes: + - application/json + description: Migrate data stored in AWS S3 to a Linux-based system. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from AWS S3 to Linux + tags: + - '[Data Migration]' + /s3/ncp: + post: + consumes: + - application/json + description: Migrate data stored in AWS S3 to Naver Cloud Object Storage. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from AWS S3 to NCP + tags: + - '[Data Migration]' + /s3/windows: + post: + consumes: + - application/json + description: Migrate data stored in AWS S3 to a Windows-based system. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from AWS S3 to Windows + tags: + - '[Data Migration]' + /windows/gcp: + post: + consumes: + - application/json + description: Migrate data stored in a Windows-based system to GCP Cloud Storage. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from Windows to GCP Cloud Storage + tags: + - '[Data Migration]' + /windows/ncp: + post: + consumes: + - application/json + description: Migrate data stored in a Windows-based system to NCP Object Storage. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from Windows to NCP Object Storage + tags: + - '[Data Migration]' + /windows/s3: + post: + consumes: + - application/json + description: Migrate data stored in a Windows-based system to AWS S3. + parameters: + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrationForm' + produces: + - application/json + responses: + "200": + description: Successfully migrated data + schema: + $ref: '#/definitions/models.BasicResponse' + "400": + description: Invalid Request + schema: + $ref: '#/definitions/models.BasicResponse' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/models.BasicResponse' + summary: Migrate data from Windows to AWS S3 + tags: + - '[Data Migration]' swagger: "2.0"