Skip to content

Commit

Permalink
Merge pull request #329 from actiontech/2752-api-1
Browse files Browse the repository at this point in the history
fix:add status type
  • Loading branch information
LordofAvernus authored Nov 15, 2024
2 parents ea05346 + 5dd5b6c commit 449c098
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 6 deletions.
22 changes: 20 additions & 2 deletions api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -5693,6 +5693,12 @@
"x-go-name": "ConnectErrorMessage"
},
"connection_status": {
"type": "string",
"enum": [
"connect_success",
"connect_failed"
],
"x-go-enum-desc": "connect_success LastConnectionTestStatusSuccess\nconnect_failed LastConnectionTestStatusFailed",
"x-go-name": "ConnectionStatus"
},
"db_service_uid": {
Expand Down Expand Up @@ -7455,7 +7461,13 @@
"x-go-name": "LastConnectionTestErrorMessage"
},
"last_connection_test_status": {
"description": "DB connect test status",
"description": "DB connect test status\nconnect_success LastConnectionTestStatusSuccess\nconnect_failed LastConnectionTestStatusFailed",
"type": "string",
"enum": [
"connect_success",
"connect_failed"
],
"x-go-enum-desc": "connect_success LastConnectionTestStatusSuccess\nconnect_failed LastConnectionTestStatusFailed",
"x-go-name": "LastConnectionTestStatus"
},
"last_connection_test_time": {
Expand Down Expand Up @@ -7926,7 +7938,13 @@
"x-go-name": "LastConnectionTestErrorMessage"
},
"last_connection_test_status": {
"description": "DB connect test status",
"description": "DB connect test status\nconnect_success LastConnectionTestStatusSuccess\nconnect_failed LastConnectionTestStatusFailed",
"type": "string",
"enum": [
"connect_success",
"connect_failed"
],
"x-go-enum-desc": "connect_success LastConnectionTestStatusSuccess\nconnect_failed LastConnectionTestStatusFailed",
"x-go-name": "LastConnectionTestStatus"
},
"last_connection_test_time": {
Expand Down
31 changes: 29 additions & 2 deletions api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,13 @@ definitions:
type: string
x-go-name: ConnectErrorMessage
connection_status:
enum:
- connect_success
- connect_failed
type: string
x-go-enum-desc: |-
connect_success LastConnectionTestStatusSuccess
connect_failed LastConnectionTestStatusFailed
x-go-name: ConnectionStatus
db_service_uid:
type: string
Expand Down Expand Up @@ -2229,7 +2236,17 @@ definitions:
type: string
x-go-name: LastConnectionTestErrorMessage
last_connection_test_status:
description: DB connect test status
description: |-
DB connect test status
connect_success LastConnectionTestStatusSuccess
connect_failed LastConnectionTestStatusFailed
enum:
- connect_success
- connect_failed
type: string
x-go-enum-desc: |-
connect_success LastConnectionTestStatusSuccess
connect_failed LastConnectionTestStatusFailed
x-go-name: LastConnectionTestStatus
last_connection_test_time:
description: DB connection test time
Expand Down Expand Up @@ -2597,7 +2614,17 @@ definitions:
type: string
x-go-name: LastConnectionTestErrorMessage
last_connection_test_status:
description: DB connect test status
description: |-
DB connect test status
connect_success LastConnectionTestStatusSuccess
connect_failed LastConnectionTestStatusFailed
enum:
- connect_success
- connect_failed
type: string
x-go-enum-desc: |-
connect_success LastConnectionTestStatusSuccess
connect_failed LastConnectionTestStatusFailed
x-go-name: LastConnectionTestStatus
last_connection_test_time:
description: DB connection test time
Expand Down
4 changes: 2 additions & 2 deletions pkg/dms-common/api/dms/v1/db_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ type AuditPlanTypes struct {
type LastConnectionTestStatus string

const (
LastConnectionTestStatusSuccess = "connect_success"
LastConnectionTestStatusFailed = "connect_failed"
LastConnectionTestStatusSuccess LastConnectionTestStatus = "connect_success"
LastConnectionTestStatusFailed LastConnectionTestStatus = "connect_failed"
)

// A dms db Service
Expand Down

0 comments on commit 449c098

Please sign in to comment.