Skip to content

Commit

Permalink
feature. implemenation for cloud settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ktkfree committed Mar 24, 2023
1 parent 6c8011d commit 4cdffe1
Show file tree
Hide file tree
Showing 17 changed files with 418 additions and 163 deletions.
95 changes: 80 additions & 15 deletions api/swagger/docs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Code generated by swaggo/swag. DO NOT EDIT
// Package swagger GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package swagger

import "github.com/swaggo/swag"
Expand Down Expand Up @@ -504,7 +505,7 @@ const docTemplate = `{
"JWT": []
}
],
"description": "Get CloudSetting",
"description": "Get CloudSettings",
"consumes": [
"application/json"
],
Expand All @@ -514,12 +515,15 @@ const docTemplate = `{
"tags": [
"CloudSettings"
],
"summary": "Get CloudSetting",
"summary": "Get CloudSettings",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.CloudSetting"
"type": "array",
"items": {
"$ref": "#/definitions/domain.CloudSetting"
}
}
}
}
Expand Down Expand Up @@ -569,7 +573,7 @@ const docTemplate = `{
"JWT": []
}
],
"description": "Get cloudSetting by cloudSettingId",
"description": "Get CloudSetting",
"consumes": [
"application/json"
],
Expand All @@ -579,7 +583,7 @@ const docTemplate = `{
"tags": [
"CloudSettings"
],
"summary": "Get cloudSetting by cloudSettingId",
"summary": "Get CloudSetting",
"responses": {
"200": {
"description": "OK",
Expand All @@ -589,6 +593,43 @@ const docTemplate = `{
}
}
},
"put": {
"security": [
{
"JWT": []
}
],
"description": "Update CloudSetting",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"CloudSettings"
],
"summary": "Update CloudSetting",
"parameters": [
{
"description": "Update cloud setting request",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.UpdateCloudSettingRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
}
}
},
"delete": {
"security": [
{
Expand Down Expand Up @@ -1066,6 +1107,9 @@ const docTemplate = `{
"domain.CloudSetting": {
"type": "object",
"properties": {
"clusters": {
"type": "integer"
},
"createdAt": {
"type": "string"
},
Expand All @@ -1092,6 +1136,9 @@ const docTemplate = `{
},
"updatedAt": {
"type": "string"
},
"updator": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -1178,13 +1225,12 @@ const docTemplate = `{
},
"domain.CreateCloudSettingRequest": {
"type": "object",
"required": [
"name",
"secretKey",
"secretKeyId"
],
"properties": {
"accessKey": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
Expand All @@ -1194,11 +1240,16 @@ const docTemplate = `{
"secretKey": {
"type": "string"
},
"type": {
"secretKeyId": {
"type": "string"
},
"updatedAt": {
"type": "string"
"type": {
"type": "string",
"enum": [
"AWS",
"AZZURE",
"GCP"
]
}
}
},
Expand Down Expand Up @@ -1357,6 +1408,20 @@ const docTemplate = `{
}
}
},
"domain.UpdateCloudSettingRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"secretKey": {
"type": "string"
},
"secretKeyId": {
"type": "string"
}
}
},
"domain.User": {
"type": "object",
"properties": {
Expand Down
92 changes: 78 additions & 14 deletions api/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
"JWT": []
}
],
"description": "Get CloudSetting",
"description": "Get CloudSettings",
"consumes": [
"application/json"
],
Expand All @@ -508,12 +508,15 @@
"tags": [
"CloudSettings"
],
"summary": "Get CloudSetting",
"summary": "Get CloudSettings",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.CloudSetting"
"type": "array",
"items": {
"$ref": "#/definitions/domain.CloudSetting"
}
}
}
}
Expand Down Expand Up @@ -563,7 +566,7 @@
"JWT": []
}
],
"description": "Get cloudSetting by cloudSettingId",
"description": "Get CloudSetting",
"consumes": [
"application/json"
],
Expand All @@ -573,7 +576,7 @@
"tags": [
"CloudSettings"
],
"summary": "Get cloudSetting by cloudSettingId",
"summary": "Get CloudSetting",
"responses": {
"200": {
"description": "OK",
Expand All @@ -583,6 +586,43 @@
}
}
},
"put": {
"security": [
{
"JWT": []
}
],
"description": "Update CloudSetting",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"CloudSettings"
],
"summary": "Update CloudSetting",
"parameters": [
{
"description": "Update cloud setting request",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domain.UpdateCloudSettingRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
}
}
},
"delete": {
"security": [
{
Expand Down Expand Up @@ -1060,6 +1100,9 @@
"domain.CloudSetting": {
"type": "object",
"properties": {
"clusters": {
"type": "integer"
},
"createdAt": {
"type": "string"
},
Expand All @@ -1086,6 +1129,9 @@
},
"updatedAt": {
"type": "string"
},
"updator": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -1172,13 +1218,12 @@
},
"domain.CreateCloudSettingRequest": {
"type": "object",
"required": [
"name",
"secretKey",
"secretKeyId"
],
"properties": {
"accessKey": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"description": {
"type": "string"
},
Expand All @@ -1188,11 +1233,16 @@
"secretKey": {
"type": "string"
},
"type": {
"secretKeyId": {
"type": "string"
},
"updatedAt": {
"type": "string"
"type": {
"type": "string",
"enum": [
"AWS",
"AZZURE",
"GCP"
]
}
}
},
Expand Down Expand Up @@ -1351,6 +1401,20 @@
}
}
},
"domain.UpdateCloudSettingRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"secretKey": {
"type": "string"
},
"secretKeyId": {
"type": "string"
}
}
},
"domain.User": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 4cdffe1

Please sign in to comment.