Skip to content

Commit

Permalink
Merge pull request #27 from cloud-barista/feature/add-gen-params
Browse files Browse the repository at this point in the history
Add : genFirestoreParams
  • Loading branch information
heedaeshin authored Aug 22, 2024
2 parents 42e091e + 22b48d5 commit 8e1078b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 404 deletions.
5 changes: 5 additions & 0 deletions websrc/controllers/gendata.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ type GenDataParams struct {
GCPCredential *multipart.FileHeader `form:"gcpCredential" swaggerignore:"true"`
ProjectID string `json:"projectid" form:"projectid"`
}
type GenFirestoreParams struct {
Region string `json:"region" form:"region"`
GCPCredential *multipart.FileHeader `form:"gcpCredential" swaggerignore:"true"`
ProjectID string `json:"projectid" form:"projectid"`
}

func genData(params GenDataParams, logger *logrus.Logger) error {
if params.CheckSQL == "on" {
Expand Down
2 changes: 1 addition & 1 deletion websrc/controllers/generateHandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ func GenerateDynamoDBPostHandler(ctx echo.Context) error {
// @Tags [Test Data Generation]
// @Accept multipart/form-data
// @Produce json
// @Param RequestBody formData GenDataParams true "Parameters required to generate test data"
// @Param GenFirestoreParams formData GenFirestoreParams true "Parameters required to generate test data"
// @Param gcpCredential 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"
Expand Down
155 changes: 0 additions & 155 deletions websrc/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,171 +77,16 @@ const docTemplate = `{
],
"summary": "Generate test data on GCP Firestore",
"parameters": [
{
"type": "string",
"name": "accessKey",
"in": "formData"
},
{
"type": "string",
"name": "bucket",
"in": "formData"
},
{
"type": "string",
"name": "checkCSV",
"in": "formData"
},
{
"type": "string",
"name": "checkGIF",
"in": "formData"
},
{
"type": "string",
"name": "checkJSON",
"in": "formData"
},
{
"type": "string",
"name": "checkPNG",
"in": "formData"
},
{
"type": "string",
"name": "checkSQL",
"in": "formData"
},
{
"type": "string",
"name": "checkServerJSON",
"in": "formData"
},
{
"type": "string",
"name": "checkServerSQL",
"in": "formData"
},
{
"type": "string",
"name": "checkTXT",
"in": "formData"
},
{
"type": "string",
"name": "checkXML",
"in": "formData"
},
{
"type": "string",
"name": "checkZIP",
"in": "formData"
},
{
"type": "string",
"name": "databaseName",
"in": "formData"
},
{
"type": "string",
"name": "endpoint",
"in": "formData"
},
{
"type": "string",
"name": "host",
"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": "provider",
"in": "formData"
},
{
"type": "string",
"name": "region",
"in": "formData"
},
{
"type": "string",
"name": "secretKey",
"in": "formData"
},
{
"type": "string",
"name": "sizeCSV",
"in": "formData"
},
{
"type": "string",
"name": "sizeGIF",
"in": "formData"
},
{
"type": "string",
"name": "sizeJSON",
"in": "formData"
},
{
"type": "string",
"name": "sizePNG",
"in": "formData"
},
{
"type": "string",
"name": "sizeSQL",
"in": "formData"
},
{
"type": "string",
"name": "sizeServerJSON",
"in": "formData"
},
{
"type": "string",
"name": "sizeServerSQL",
"in": "formData"
},
{
"type": "string",
"name": "sizeTXT",
"in": "formData"
},
{
"type": "string",
"name": "sizeXML",
"in": "formData"
},
{
"type": "string",
"name": "sizeZIP",
"in": "formData"
},
{
"type": "string",
"name": "username",
"in": "formData"
},
{
"type": "file",
"description": "Parameters required to generate test data",
Expand Down
155 changes: 0 additions & 155 deletions websrc/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,171 +70,16 @@
],
"summary": "Generate test data on GCP Firestore",
"parameters": [
{
"type": "string",
"name": "accessKey",
"in": "formData"
},
{
"type": "string",
"name": "bucket",
"in": "formData"
},
{
"type": "string",
"name": "checkCSV",
"in": "formData"
},
{
"type": "string",
"name": "checkGIF",
"in": "formData"
},
{
"type": "string",
"name": "checkJSON",
"in": "formData"
},
{
"type": "string",
"name": "checkPNG",
"in": "formData"
},
{
"type": "string",
"name": "checkSQL",
"in": "formData"
},
{
"type": "string",
"name": "checkServerJSON",
"in": "formData"
},
{
"type": "string",
"name": "checkServerSQL",
"in": "formData"
},
{
"type": "string",
"name": "checkTXT",
"in": "formData"
},
{
"type": "string",
"name": "checkXML",
"in": "formData"
},
{
"type": "string",
"name": "checkZIP",
"in": "formData"
},
{
"type": "string",
"name": "databaseName",
"in": "formData"
},
{
"type": "string",
"name": "endpoint",
"in": "formData"
},
{
"type": "string",
"name": "host",
"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": "provider",
"in": "formData"
},
{
"type": "string",
"name": "region",
"in": "formData"
},
{
"type": "string",
"name": "secretKey",
"in": "formData"
},
{
"type": "string",
"name": "sizeCSV",
"in": "formData"
},
{
"type": "string",
"name": "sizeGIF",
"in": "formData"
},
{
"type": "string",
"name": "sizeJSON",
"in": "formData"
},
{
"type": "string",
"name": "sizePNG",
"in": "formData"
},
{
"type": "string",
"name": "sizeSQL",
"in": "formData"
},
{
"type": "string",
"name": "sizeServerJSON",
"in": "formData"
},
{
"type": "string",
"name": "sizeServerSQL",
"in": "formData"
},
{
"type": "string",
"name": "sizeTXT",
"in": "formData"
},
{
"type": "string",
"name": "sizeXML",
"in": "formData"
},
{
"type": "string",
"name": "sizeZIP",
"in": "formData"
},
{
"type": "string",
"name": "username",
"in": "formData"
},
{
"type": "file",
"description": "Parameters required to generate test data",
Expand Down
Loading

0 comments on commit 8e1078b

Please sign in to comment.