diff --git a/pkg/rdbms/mysql/mysql.go b/pkg/rdbms/mysql/mysql.go index 79e98bc..658f322 100644 --- a/pkg/rdbms/mysql/mysql.go +++ b/pkg/rdbms/mysql/mysql.go @@ -29,13 +29,30 @@ import ( // mysqlDBMS struct type MysqlDBMS struct { - provider models.Provider - db *sql.DB - ctx context.Context + provider models.Provider + db *sql.DB + tartgetProvider models.Provider + ctx context.Context } type MysqlDBOption func(*MysqlDBMS) +func (d *MysqlDBMS) GetProvdier() models.Provider { + return d.provider +} + +func (d *MysqlDBMS) SetProvdier(provider models.Provider) { + d.provider = provider +} + +func (d *MysqlDBMS) GetTargetProvdier() models.Provider { + return d.tartgetProvider +} + +func (d *MysqlDBMS) SetTargetProvdier(provider models.Provider) { + d.tartgetProvider = provider +} + func New(provider models.Provider, sqlDB *sql.DB, opts ...MysqlDBOption) *MysqlDBMS { dms := &MysqlDBMS{ provider: provider, @@ -143,6 +160,12 @@ func (d *MysqlDBMS) ShowCreateDBSql(dbName string, dbCreateSql *string) error { *dbCreateSql = addCollateIfMissing(*dbCreateSql) *dbCreateSql = EnsureCharsetAndCollate(*dbCreateSql, extractCharacterSet(*dbCreateSql), extractCollation(*dbCreateSql)) + // If the target provider is NCP, modify the SQL to use NCP's specific procedure + if d.tartgetProvider == models.NCP { + dbName, charSet, collate := extractDatabaseInfo(*dbCreateSql) + *dbCreateSql = fmt.Sprintf("CALL sys.ncp_create_db('%s', '%s', '%s');", dbName, charSet, collate) + } + return nil } @@ -154,6 +177,8 @@ func (d *MysqlDBMS) ShowCreateTableSql(dbName, tableName string, tableCreateSql if err := d.db.QueryRow(fmt.Sprintf("SHOW CREATE TABLE %s;", tableName)).Scan(&tableName, tableCreateSql); err != nil { return err } + *tableCreateSql = removeSequenceOption(*tableCreateSql) + *tableCreateSql = adjustColumnsToTimestamp(*tableCreateSql) *tableCreateSql = ReplaceCharsetAndCollate(*tableCreateSql) return nil } @@ -182,10 +207,10 @@ func (d *MysqlDBMS) GetInsert(dbName, tableName string, insertSql *[]string) err } defer selRows.Close() - data := []map[string]string{} + data := []map[string]sql.NullString{} for selRows.Next() { - values := make([]string, len(columns)) + values := make([]sql.NullString, len(columns)) valuePtrs := make([]interface{}, len(columns)) for i := range columns { valuePtrs[i] = &values[i] @@ -196,10 +221,9 @@ func (d *MysqlDBMS) GetInsert(dbName, tableName string, insertSql *[]string) err return err } - entry := make(map[string]string) + entry := make(map[string]sql.NullString) for i, column := range columns { - val := values[i] - entry[column] = val + entry[column] = values[i] } data = append(data, entry) @@ -207,11 +231,20 @@ func (d *MysqlDBMS) GetInsert(dbName, tableName string, insertSql *[]string) err for _, entry := range data { values := []string{} + escapedColumns := []string{} for _, column := range columns { - values = append(values, fmt.Sprintf("'%v'", entry[column])) + escapedColumn := escapeColumnName(column) + escapedColumns = append(escapedColumns, escapedColumn) + val := entry[column] + if val.Valid { + escapedValue := ReplaceEscapeString(val.String) + values = append(values, fmt.Sprintf("'%v'", escapedValue)) + } else { + values = append(values, "NULL") + } } - insertStatement := fmt.Sprintf("INSERT INTO %s (%s) VALUES (%s);", tableName, strings.Join(columns, ", "), strings.Join(values, ", ")) + insertStatement := fmt.Sprintf("INSERT INTO %s (%s) VALUES (%s);", tableName, strings.Join(escapedColumns, ", "), strings.Join(values, ", ")) *insertSql = append(*insertSql, insertStatement) } @@ -247,6 +280,24 @@ func ReplaceCharsetAndCollate(sql string) string { return sql } +func ReplaceEscapeString(input string) string { + return strings.ReplaceAll(input, "'", "''") +} + +func adjustColumnsToTimestamp(sql string) string { + // Use a regular expression to find all columns that use DEFAULT current_timestamp() + re := regexp.MustCompile("`[^`]+`\\s+[^,]+DEFAULT\\s+current_timestamp\\(\\)") + + // Replace these columns with TIMESTAMP DEFAULT current_timestamp() + modifiedSQL := re.ReplaceAllStringFunc(sql, func(match string) string { + // Retain the column name and change the rest of the definition to TIMESTAMP + columnName := strings.Split(match, " ")[0] // The first element is the column name + return fmt.Sprintf("%s TIMESTAMP DEFAULT current_timestamp()", columnName) + }) + + return modifiedSQL +} + // Extract database information func extractDatabaseInfo(sql string) (string, string, string) { dbName := extractDatabaseName(sql) @@ -284,3 +335,13 @@ func extractCollation(sql string) string { } return "" } + +// remove Sequence +func removeSequenceOption(sql string) string { + return strings.Replace(sql, " SEQUENCE=1", "", -1) +} + +// escape Reserve Word +func escapeColumnName(columnName string) string { + return fmt.Sprintf("`%s`", columnName) +} diff --git a/service/rdbc/rdbc.go b/service/rdbc/rdbc.go index e1e60c4..9a01f59 100644 --- a/service/rdbc/rdbc.go +++ b/service/rdbc/rdbc.go @@ -20,6 +20,7 @@ import ( "fmt" "strings" + "github.com/cloud-barista/mc-data-manager/models" "github.com/sirupsen/logrus" ) @@ -33,6 +34,10 @@ const ( // // Configure the interface to make it easier for other DBs to apply in the future type RDBMS interface { + GetProvdier() models.Provider + SetProvdier(provider models.Provider) + GetTargetProvdier() models.Provider + SetTargetProvdier(provider models.Provider) Exec(query string) error ListDB(dst *[]string) error DeleteDB(dbName string) error @@ -131,6 +136,7 @@ func (rdb *RDBController) Copy(dst *RDBController) error { for _, db := range dbList { sql = "" + rdb.client.SetTargetProvdier(dst.client.GetProvdier()) if err := rdb.Get(db, &sql); err != nil { rdb.logWrite("Error", "Get error", err) return err diff --git a/websrc/docs/docs.go b/websrc/docs/docs.go index a24c8e9..253229e 100644 --- a/websrc/docs/docs.go +++ b/websrc/docs/docs.go @@ -494,51 +494,13 @@ const docTemplate = `{ "summary": "Migrate data from AWS S3 to Linux", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -619,51 +581,13 @@ const docTemplate = `{ "summary": "Migrate data from AWS S3 to Windows", "parameters": [ { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -704,56 +628,13 @@ const docTemplate = `{ "summary": "Migrate data from DynamoDB to Firestore", "parameters": [ { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -788,102 +669,6 @@ const docTemplate = `{ "summary": "Migrate data from DynamoDB to MongoDB", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -925,102 +710,6 @@ const docTemplate = `{ "summary": "Migrate data from Firestore to DynamoDB", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -1062,102 +751,6 @@ const docTemplate = `{ "summary": "Migrate data from Firestore to MongoDB", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -1199,102 +792,6 @@ const docTemplate = `{ "summary": "Migrate data from GCP to AWS S3", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -1335,102 +832,6 @@ const docTemplate = `{ "summary": "Migrate data from GCP to Linux", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -1595,71 +996,28 @@ const docTemplate = `{ } } }, - "/migration/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": [ - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, + "/migration/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": [ { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -1746,106 +1104,13 @@ const docTemplate = `{ "summary": "Migrate data from MongoDB to DynamoDB", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -2003,99 +1268,13 @@ const docTemplate = `{ "summary": "Migrate data from NCP to GCP Cloud Storage", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } }, { "type": "file", @@ -2271,144 +1450,6 @@ const docTemplate = `{ "[Data Migration]" ], "summary": "Migrate data from Windows to GCP Cloud Storage", - "parameters": [ - { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required for migration", - "name": "gcpCredential", - "in": "formData" - } - ], - "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" - } - } - } - } - }, - "/migration/windows/ncp": { - "post": { - "description": "Migrate data stored in a Windows-based system to NCP Object Storage.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Data Migration]" - ], - "summary": "Migrate data from Windows to NCP Object Storage", "parameters": [ { "description": "Parameters required for migration", @@ -2642,10 +1683,7 @@ const docTemplate = `{ "databaseName": { "type": "string" }, - "gcpBucket": { - "type": "string" - }, - "gcpRegion": { + "endpoint": { "type": "string" }, "host": { diff --git a/websrc/docs/swagger.json b/websrc/docs/swagger.json index fb3d60d..2fdf48f 100644 --- a/websrc/docs/swagger.json +++ b/websrc/docs/swagger.json @@ -487,51 +487,13 @@ "summary": "Migrate data from AWS S3 to Linux", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -612,51 +574,13 @@ "summary": "Migrate data from AWS S3 to Windows", "parameters": [ { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -697,56 +621,13 @@ "summary": "Migrate data from DynamoDB to Firestore", "parameters": [ { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -781,102 +662,6 @@ "summary": "Migrate data from DynamoDB to MongoDB", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -918,102 +703,6 @@ "summary": "Migrate data from Firestore to DynamoDB", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -1055,102 +744,6 @@ "summary": "Migrate data from Firestore to MongoDB", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -1192,102 +785,6 @@ "summary": "Migrate data from GCP to AWS S3", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -1328,102 +825,6 @@ "summary": "Migrate data from GCP to Linux", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", "description": "Parameters required for migration", "name": "RequestBody", "in": "body", @@ -1588,71 +989,28 @@ } } }, - "/migration/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": [ - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, + "/migration/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": [ { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -1739,106 +1097,13 @@ "summary": "Migrate data from MongoDB to DynamoDB", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required to generate test data", - "name": "gcpCredential", - "in": "formData", - "required": true + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } } ], "responses": { @@ -1996,99 +1261,13 @@ "summary": "Migrate data from NCP to GCP Cloud Storage", "parameters": [ { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" + "description": "Parameters required for migration", + "name": "RequestBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.MigrateTask" + } }, { "type": "file", @@ -2264,144 +1443,6 @@ "[Data Migration]" ], "summary": "Migrate data from Windows to GCP Cloud Storage", - "parameters": [ - { - "type": "string", - "name": "awsAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "awsBucket", - "in": "formData" - }, - { - "type": "string", - "name": "awsRegion", - "in": "formData" - }, - { - "type": "string", - "name": "awsSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "databaseId", - "in": "formData" - }, - { - "type": "string", - "name": "databaseName", - "in": "formData" - }, - { - "type": "string", - "name": "gcpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "gcpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "host", - "in": "formData" - }, - { - "type": "string", - "name": "ncpAccessKey", - "in": "formData" - }, - { - "type": "string", - "name": "ncpBucket", - "in": "formData" - }, - { - "type": "string", - "name": "ncpEndpoint", - "in": "formData" - }, - { - "type": "string", - "name": "ncpRegion", - "in": "formData" - }, - { - "type": "string", - "name": "ncpSecretKey", - "in": "formData" - }, - { - "type": "string", - "name": "password", - "in": "formData" - }, - { - "type": "string", - "name": "path", - "in": "formData" - }, - { - "type": "string", - "name": "port", - "in": "formData" - }, - { - "type": "string", - "name": "projectId", - "in": "formData" - }, - { - "type": "string", - "name": "username", - "in": "formData" - }, - { - "type": "file", - "description": "Parameters required for migration", - "name": "gcpCredential", - "in": "formData" - } - ], - "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" - } - } - } - } - }, - "/migration/windows/ncp": { - "post": { - "description": "Migrate data stored in a Windows-based system to NCP Object Storage.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "[Data Migration]" - ], - "summary": "Migrate data from Windows to NCP Object Storage", "parameters": [ { "description": "Parameters required for migration", @@ -2635,10 +1676,7 @@ "databaseName": { "type": "string" }, - "gcpBucket": { - "type": "string" - }, - "gcpRegion": { + "endpoint": { "type": "string" }, "host": { diff --git a/websrc/docs/swagger.yaml b/websrc/docs/swagger.yaml index bec9fbf..b4fc6d2 100644 --- a/websrc/docs/swagger.yaml +++ b/websrc/docs/swagger.yaml @@ -100,9 +100,7 @@ definitions: type: string databaseName: type: string - gcpBucket: - type: string - gcpRegion: + endpoint: type: string host: type: string @@ -441,35 +439,12 @@ paths: - application/json description: Migrate data stored in AWS S3 to a Linux-based system. parameters: - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: projectId - type: string - - description: Parameters required to generate test data - in: formData - name: gcpCredential + - description: Parameters required for migration + in: body + name: RequestBody required: true - type: file + schema: + $ref: '#/definitions/controllers.MigrateTask' produces: - application/json responses: @@ -521,35 +496,12 @@ paths: - application/json description: Migrate data stored in AWS S3 to a Windows-based system. parameters: - - in: formData - name: databaseId - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: projectId - type: string - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - description: Parameters required to generate test data - in: formData - name: gcpCredential + - description: Parameters required for migration + in: body + name: RequestBody required: true - type: file + schema: + $ref: '#/definitions/controllers.MigrateTask' produces: - application/json responses: @@ -574,38 +526,12 @@ paths: - application/json description: Migrate data stored in AWS DynamoDB to Google Cloud Firestore. parameters: - - in: formData - name: databaseId - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: projectId - type: string - - in: formData - name: databaseName - type: string - - in: formData - name: host - type: string - - in: formData - name: password - type: string - - in: formData - name: port - type: string - - in: formData - name: username - type: string - - description: Parameters required to generate test data - in: formData - name: gcpCredential + - description: Parameters required for migration + in: body + name: RequestBody required: true - type: file + schema: + $ref: '#/definitions/controllers.MigrateTask' produces: - application/json responses: @@ -627,63 +553,6 @@ paths: - application/json description: Migrate data stored in AWS DynamoDB to Naver Cloud MongoDB. parameters: - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: databaseName - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: host - type: string - - in: formData - name: ncpAccessKey - type: string - - in: formData - name: ncpBucket - type: string - - in: formData - name: ncpEndpoint - type: string - - in: formData - name: ncpRegion - type: string - - in: formData - name: ncpSecretKey - type: string - - in: formData - name: password - type: string - - in: formData - name: path - type: string - - in: formData - name: port - type: string - - in: formData - name: projectId - type: string - - in: formData - name: username - type: string - description: Parameters required for migration in: body name: RequestBody @@ -711,63 +580,6 @@ paths: - application/json description: Migrate data stored in Google Cloud Firestore to AWS DynamoDB. parameters: - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: databaseName - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: host - type: string - - in: formData - name: ncpAccessKey - type: string - - in: formData - name: ncpBucket - type: string - - in: formData - name: ncpEndpoint - type: string - - in: formData - name: ncpRegion - type: string - - in: formData - name: ncpSecretKey - type: string - - in: formData - name: password - type: string - - in: formData - name: path - type: string - - in: formData - name: port - type: string - - in: formData - name: projectId - type: string - - in: formData - name: username - type: string - description: Parameters required for migration in: body name: RequestBody @@ -795,63 +607,6 @@ paths: - application/json description: Migrate data stored in Google Cloud Firestore to Naver Cloud MongoDB. parameters: - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: databaseName - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: host - type: string - - in: formData - name: ncpAccessKey - type: string - - in: formData - name: ncpBucket - type: string - - in: formData - name: ncpEndpoint - type: string - - in: formData - name: ncpRegion - type: string - - in: formData - name: ncpSecretKey - type: string - - in: formData - name: password - type: string - - in: formData - name: path - type: string - - in: formData - name: port - type: string - - in: formData - name: projectId - type: string - - in: formData - name: username - type: string - description: Parameters required for migration in: body name: RequestBody @@ -879,63 +634,6 @@ paths: - application/json description: Migrate data stored in GCP Cloud Storage to AWS S3. parameters: - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: databaseName - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: host - type: string - - in: formData - name: ncpAccessKey - type: string - - in: formData - name: ncpBucket - type: string - - in: formData - name: ncpEndpoint - type: string - - in: formData - name: ncpRegion - type: string - - in: formData - name: ncpSecretKey - type: string - - in: formData - name: password - type: string - - in: formData - name: path - type: string - - in: formData - name: port - type: string - - in: formData - name: projectId - type: string - - in: formData - name: username - type: string - description: Parameters required for migration in: body name: RequestBody @@ -963,63 +661,6 @@ paths: - application/json description: Migrate data stored in GCP Cloud Storage to a Linux-based system. parameters: - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: databaseName - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: host - type: string - - in: formData - name: ncpAccessKey - type: string - - in: formData - name: ncpBucket - type: string - - in: formData - name: ncpEndpoint - type: string - - in: formData - name: ncpRegion - type: string - - in: formData - name: ncpSecretKey - type: string - - in: formData - name: password - type: string - - in: formData - name: path - type: string - - in: formData - name: port - type: string - - in: formData - name: projectId - type: string - - in: formData - name: username - type: string - description: Parameters required for migration in: body name: RequestBody @@ -1137,38 +778,12 @@ paths: - application/json description: Migrate data stored in a Linux-based system to GCP Cloud Storage. parameters: - - in: formData - name: databaseName - type: string - - in: formData - name: host - type: string - - in: formData - name: password - type: string - - in: formData - name: port - type: string - - in: formData - name: username - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: projectId - type: string - - description: Parameters required to generate test data - in: formData - name: gcpCredential + - description: Parameters required for migration + in: body + name: RequestBody required: true - type: file + schema: + $ref: '#/definitions/controllers.MigrateTask' produces: - application/json responses: @@ -1223,68 +838,12 @@ paths: - application/json description: Migrate data stored in Naver Cloud MongoDB to AWS DynamoDB. parameters: - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: databaseName - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: host - type: string - - in: formData - name: ncpAccessKey - type: string - - in: formData - name: ncpBucket - type: string - - in: formData - name: ncpEndpoint - type: string - - in: formData - name: ncpRegion - type: string - - in: formData - name: ncpSecretKey - type: string - - in: formData - name: password - type: string - - in: formData - name: path - type: string - - in: formData - name: port - type: string - - in: formData - name: projectId - type: string - - in: formData - name: username - type: string - - description: Parameters required to generate test data - in: formData - name: gcpCredential + - description: Parameters required for migration + in: body + name: RequestBody required: true - type: file + schema: + $ref: '#/definitions/controllers.MigrateTask' produces: - application/json responses: @@ -1387,63 +946,12 @@ paths: - application/json description: Migrate data stored in NCP Object Storage to GCP Cloud Storage. parameters: - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: databaseName - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: host - type: string - - in: formData - name: ncpAccessKey - type: string - - in: formData - name: ncpBucket - type: string - - in: formData - name: ncpEndpoint - type: string - - in: formData - name: ncpRegion - type: string - - in: formData - name: ncpSecretKey - type: string - - in: formData - name: password - type: string - - in: formData - name: path - type: string - - in: formData - name: port - type: string - - in: formData - name: projectId - type: string - - in: formData - name: username - type: string + - description: Parameters required for migration + in: body + name: RequestBody + required: true + schema: + $ref: '#/definitions/controllers.MigrateTask' - description: Parameters required to generate test data in: formData name: gcpCredential @@ -1559,63 +1067,6 @@ paths: - application/json description: Migrate data stored in a Windows-based system to GCP Cloud Storage. parameters: - - in: formData - name: awsAccessKey - type: string - - in: formData - name: awsBucket - type: string - - in: formData - name: awsRegion - type: string - - in: formData - name: awsSecretKey - type: string - - in: formData - name: databaseId - type: string - - in: formData - name: databaseName - type: string - - in: formData - name: gcpBucket - type: string - - in: formData - name: gcpRegion - type: string - - in: formData - name: host - type: string - - in: formData - name: ncpAccessKey - type: string - - in: formData - name: ncpBucket - type: string - - in: formData - name: ncpEndpoint - type: string - - in: formData - name: ncpRegion - type: string - - in: formData - name: ncpSecretKey - type: string - - in: formData - name: password - type: string - - in: formData - name: path - type: string - - in: formData - name: port - type: string - - in: formData - name: projectId - type: string - - in: formData - name: username - type: string - description: Parameters required for migration in: body name: RequestBody