Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update : swagger router url #23

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions websrc/controllers/migrationGCPHandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
// @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]
// @Router /migration/gcp/linux [post]
func MigrationGCPToLinuxPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -102,7 +102,7 @@ func MigrationGCPToLinuxPostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/gcp/windows [post]
func MigrationGCPToWindowsPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -167,7 +167,7 @@ func MigrationGCPToWindowsPostHandler(ctx echo.Context) error {
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
// @Router /gcp/s3 [post]
// @Router /migration/gcp/s3 [post]
func MigrationGCPToS3PostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -238,7 +238,7 @@ func MigrationGCPToS3PostHandler(ctx echo.Context) error {
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
// @Router /gcp/ncp [post]
// @Router /migration/gcp/ncp [post]
func MigrationGCPToNCPPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down
14 changes: 7 additions & 7 deletions websrc/controllers/migrationHandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
// @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]
// @Router /migration/linux/s3 [post]
func MigrationLinuxToS3PostHandler(ctx echo.Context) error {
start := time.Now()

Expand Down Expand Up @@ -91,7 +91,7 @@ func MigrationLinuxToS3PostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/linux/gcp [post]
func MigrationLinuxToGCPPostHandler(ctx echo.Context) error {
start := time.Now()

Expand Down Expand Up @@ -160,7 +160,7 @@ func MigrationLinuxToGCPPostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/linux/ncp [post]
func MigrationLinuxToNCPPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -217,7 +217,7 @@ func MigrationLinuxToNCPPostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/windows/s3 [post]
func MigrationWindowsToS3PostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -278,7 +278,7 @@ func MigrationWindowsToS3PostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/windows/gcp [post]
func MigrationWindowsToGCPPostHandler(ctx echo.Context) error {
start := time.Now()

Expand Down Expand Up @@ -342,7 +342,7 @@ func MigrationWindowsToGCPPostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/windows/ncp [post]
func MigrationWindowsToNCPPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -397,7 +397,7 @@ func MigrationWindowsToNCPPostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/mysql [post]
func MigrationMySQLPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down
8 changes: 4 additions & 4 deletions websrc/controllers/migrationNCPHandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
// @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]
// @Router /migration/ncp/linux [post]
func MigrationNCPToLinuxPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -90,7 +90,7 @@ func MigrationNCPToLinuxPostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/ncp/windows [post]
func MigrationNCPToWindowsPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -145,7 +145,7 @@ func MigrationNCPToWindowsPostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/ncp/s3 [post]
func MigrationNCPToS3PostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -207,7 +207,7 @@ func MigrationNCPToS3PostHandler(ctx echo.Context) error {
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
// @Router /ncp/gcp [post]
// @Router /migration/ncp/gcp [post]
func MigrationNCPToGCPPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down
8 changes: 4 additions & 4 deletions websrc/controllers/migrationNoSqlHandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
// @Router /dynamodb/firestore [post]
// @Router /migration/dynamodb/firestore [post]
func MigrationDynamoDBToFirestorePostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -103,7 +103,7 @@ func MigrationDynamoDBToFirestorePostHandler(ctx echo.Context) error {
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
// @Router /dynamodb/mongodb [post]
// @Router /migration/dynamodb/mongodb [post]
func MigrationDynamoDBToMongoDBPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -162,7 +162,7 @@ func MigrationDynamoDBToMongoDBPostHandler(ctx echo.Context) error {
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
// @Router /firestore/dynamodb [post]
// @Router /migration/firestore/dynamodb [post]
func MigrationFirestoreToDynamoDBPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -231,7 +231,7 @@ func MigrationFirestoreToDynamoDBPostHandler(ctx echo.Context) error {
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
// @Router /firestore/mongodb [post]
// @Router /migration/firestore/mongodb [post]
func MigrationFirestoreToMongoDBPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down
8 changes: 4 additions & 4 deletions websrc/controllers/migrationS3Handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
// @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]
// @Router /migration/s3/linux [post]
func MigrationS3ToLinuxPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -89,7 +89,7 @@ func MigrationS3ToLinuxPostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/s3/windows [post]
func MigrationS3ToWindowsPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -144,7 +144,7 @@ func MigrationS3ToWindowsPostHandler(ctx echo.Context) error {
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
// @Router /s3/gcp [post]
// @Router /migration/s3/gcp [post]
func MigrationS3ToGCPPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down Expand Up @@ -213,7 +213,7 @@ func MigrationS3ToGCPPostHandler(ctx echo.Context) error {
// @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]
// @Router /migration/s3/ncp [post]
func MigrationS3ToNCPPostHandler(ctx echo.Context) error {

start := time.Now()
Expand Down
28 changes: 14 additions & 14 deletions websrc/controllers/migrationStructs.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ import "mime/multipart"
type MigrationForm struct {
Path string `form:"path"`

AWSRegion string `form:"awsRegion"`
AWSAccessKey string `form:"awsAccessKey"`
AWSSecretKey string `form:"awsSecretKey"`
AWSBucket string `form:"awsBucket"`
AWSRegion string `form:"awsRegion" json:"awsRegion"`
AWSAccessKey string `form:"awsAccessKey" json:"awsAccessKey"`
AWSSecretKey string `form:"awsSecretKey" json:"awsSecretKey"`
AWSBucket string `form:"awsBucket" json:"awsBucket"`

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"`

NCPRegion string `form:"ncpRegion"`
NCPAccessKey string `form:"ncpAccessKey"`
NCPSecretKey string `form:"ncpSecretKey"`
NCPEndPoint string `form:"ncpEndpoint"`
NCPBucket string `form:"ncpBucket"`
NCPRegion string `form:"ncpRegion" json:"ncpRegion"`
NCPAccessKey string `form:"ncpAccessKey" json:"ncpAccessKey"`
NCPSecretKey string `form:"ncpSecretKey" json:"ncpSecretKey"`
NCPEndPoint string `form:"ncpEndpoint" json:"ncpEndpoint"`
NCPBucket string `form:"ncpBucket" json:"ncpBucket"`

MongoHost string `form:"host"`
MongoPort string `form:"port"`
MongoUsername string `form:"username"`
MongoPassword string `form:"password"`
MongoDBName string `form:"databaseName"`
MongoHost string `form:"host" json:"host"`
MongoPort string `form:"port" json:"port"`
MongoUsername string `form:"username" json:"username"`
MongoPassword string `form:"password" json:"password"`
MongoDBName string `form:"databaseName" json:"databaseName"`
}
type GCPMigrationParams struct {
ProjectID string `form:"projectid" json:"projectid"`
Expand Down
Loading
Loading