Skip to content

Commit

Permalink
migraton file adding struct
Browse files Browse the repository at this point in the history
Signed-off-by: Yashvi Jain <Yashvi.jain@progress.com>
  • Loading branch information
Yashvi Jain authored and Yashvi Jain committed Jan 24, 2022
1 parent da193ea commit 6c73754
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion components/infra-proxy-service/server/migrations.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package server

import (
/*import (
"bytes"
"github.com/chef/automate/api/interservice/infra_proxy/migrations/response"
"github.com/chef/automate/api/interservice/infra_proxy/migrations/service"
Expand Down Expand Up @@ -85,3 +85,4 @@ func createMigrationId() (string, error) {
}
return uuid.String(), nil
}
*/
11 changes: 4 additions & 7 deletions components/infra-proxy-service/server/migrations/migrations.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package migrations

/*import (
import (
"bytes"
uuid "github.com/chef/automate/lib/uuid4"
log "github.com/sirupsen/logrus"
Expand All @@ -13,9 +13,7 @@ package migrations
"github.com/chef/automate/components/infra-proxy-service/server"
)

type Server struct {
s *server.Server
}
type Server server.Server

// Takes up file name from service.MigrationDataService_UploadFileServer.MigrationId and creates the file in the same directory
func saveFile(migrationId string, filename string, fileData bytes.Buffer) error {
Expand Down Expand Up @@ -70,9 +68,9 @@ func (s Server) UploadFile(stream service.MigrationDataService_UploadFileServer)
return err
}

res := &response.UploadFileResponse{
res := &response.UploadZipFileResponse{
MigrationId: migrationId,
Status: "Completed",
Success: true,
}

err = stream.SendAndClose(res)
Expand All @@ -92,4 +90,3 @@ func createMigrationId() (string, error) {
}
return uuid.String(), nil
}
*/

0 comments on commit 6c73754

Please sign in to comment.