Skip to content

Commit bdf7db2

Browse files
committed
feat:Data Object Usage and Overview of Data Object Usage
1 parent 0f21f13 commit bdf7db2

File tree

5 files changed

+381
-24
lines changed

5 files changed

+381
-24
lines changed

api/dms/service/v1/statistic.go

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package v1
2+
3+
import base "github.com/actiontech/dms/pkg/dms-common/api/base/v1"
4+
5+
// swagger:parameters GetCBInstanceStatistic
6+
type GetCBInstanceStatisticReq struct {
7+
// project id
8+
// Required: true
9+
// in:path
10+
ProjectUid string `param:"project_uid" json:"project_uid" validate:"required"`
11+
}
12+
13+
// swagger:model GetCBInstanceStatisticReply
14+
type GetCBInstanceStatisticReply struct {
15+
// Generic reply
16+
base.GenericResp
17+
Data []*CbDbServiceStatistic `json:"data"`
18+
}
19+
20+
type CbDbServiceStatistic struct {
21+
Name string `json:"name"`
22+
Count int64 `json:"count"`
23+
Content []*CbDbServiceStatisticContent `json:"content"`
24+
}
25+
26+
type CbDbServiceStatisticContent struct {
27+
Schema string `json:"schema"`
28+
Table string `json:"table"`
29+
}
30+
31+
// swagger:parameters GetCBOperationStatistic
32+
type GetCBOperationStatisticReq struct {
33+
// project id
34+
// Required: true
35+
// in:path
36+
ProjectUid string `param:"project_uid" json:"project_uid" validate:"required"`
37+
}
38+
39+
// swagger:model GetCBOperationStatisticReply
40+
type GetCBOperationStatisticReply struct {
41+
// Generic reply
42+
base.GenericResp
43+
Data []*CbOperationStatistic `json:"data"`
44+
}
45+
46+
type CbOperationStatistic struct {
47+
OperationType string `json:"operation_type"`
48+
OperationCount int64 `json:"operation_count"`
49+
}

api/swagger.json

Lines changed: 179 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3315,6 +3315,72 @@
33153315
}
33163316
}
33173317
},
3318+
"/v1/dms/projects/{project_uid}/statistic/cb_instances": {
3319+
"get": {
3320+
"tags": [
3321+
"dms"
3322+
],
3323+
"summary": "Get cb instance statistic.",
3324+
"operationId": "GetCBInstanceStatistic",
3325+
"parameters": [
3326+
{
3327+
"type": "string",
3328+
"x-go-name": "ProjectUid",
3329+
"description": "project id",
3330+
"name": "project_uid",
3331+
"in": "path",
3332+
"required": true
3333+
}
3334+
],
3335+
"responses": {
3336+
"200": {
3337+
"description": "GetCBInstanceStatisticReply",
3338+
"schema": {
3339+
"$ref": "#/definitions/GetCBInstanceStatisticReply"
3340+
}
3341+
},
3342+
"default": {
3343+
"description": "GenericResp",
3344+
"schema": {
3345+
"$ref": "#/definitions/GenericResp"
3346+
}
3347+
}
3348+
}
3349+
}
3350+
},
3351+
"/v1/dms/projects/{project_uid}/statistic/cb_operations": {
3352+
"get": {
3353+
"tags": [
3354+
"dms"
3355+
],
3356+
"summary": "Get cb operation statistic.",
3357+
"operationId": "GetCBOperationStatistic",
3358+
"parameters": [
3359+
{
3360+
"type": "string",
3361+
"x-go-name": "ProjectUid",
3362+
"description": "project id",
3363+
"name": "project_uid",
3364+
"in": "path",
3365+
"required": true
3366+
}
3367+
],
3368+
"responses": {
3369+
"200": {
3370+
"description": "GetCBOperationStatisticReply",
3371+
"schema": {
3372+
"$ref": "#/definitions/GetCBOperationStatisticReply"
3373+
}
3374+
},
3375+
"default": {
3376+
"description": "GenericResp",
3377+
"schema": {
3378+
"$ref": "#/definitions/GenericResp"
3379+
}
3380+
}
3381+
}
3382+
}
3383+
},
33183384
"/v1/dms/projects/{project_uid}/unarchive": {
33193385
"put": {
33203386
"tags": [
@@ -4738,6 +4804,19 @@
47384804
},
47394805
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
47404806
},
4807+
"CBOperationLogTips": {
4808+
"type": "object",
4809+
"properties": {
4810+
"exec_result": {
4811+
"type": "array",
4812+
"items": {
4813+
"type": "string"
4814+
},
4815+
"x-go-name": "ExecResult"
4816+
}
4817+
},
4818+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
4819+
},
47414820
"CancelDataExportWorkflowPayload": {
47424821
"type": "object",
47434822
"required": [
@@ -4754,6 +4833,57 @@
47544833
},
47554834
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
47564835
},
4836+
"CbDbServiceStatistic": {
4837+
"type": "object",
4838+
"properties": {
4839+
"content": {
4840+
"type": "array",
4841+
"items": {
4842+
"$ref": "#/definitions/CbDbServiceStatisticContent"
4843+
},
4844+
"x-go-name": "Content"
4845+
},
4846+
"count": {
4847+
"type": "integer",
4848+
"format": "int64",
4849+
"x-go-name": "Count"
4850+
},
4851+
"name": {
4852+
"type": "string",
4853+
"x-go-name": "Name"
4854+
}
4855+
},
4856+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
4857+
},
4858+
"CbDbServiceStatisticContent": {
4859+
"type": "object",
4860+
"properties": {
4861+
"schema": {
4862+
"type": "string",
4863+
"x-go-name": "Schema"
4864+
},
4865+
"table": {
4866+
"type": "string",
4867+
"x-go-name": "Table"
4868+
}
4869+
},
4870+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
4871+
},
4872+
"CbOperationStatistic": {
4873+
"type": "object",
4874+
"properties": {
4875+
"operation_count": {
4876+
"type": "integer",
4877+
"format": "int64",
4878+
"x-go-name": "OperationCount"
4879+
},
4880+
"operation_type": {
4881+
"type": "string",
4882+
"x-go-name": "OperationType"
4883+
}
4884+
},
4885+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
4886+
},
47574887
"CheckDBServiceIsConnectableReply": {
47584888
"type": "object",
47594889
"properties": {
@@ -5328,6 +5458,30 @@
53285458
},
53295459
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
53305460
},
5461+
"GetCBInstanceStatisticReply": {
5462+
"type": "object",
5463+
"properties": {
5464+
"code": {
5465+
"description": "code",
5466+
"type": "integer",
5467+
"format": "int64",
5468+
"x-go-name": "Code"
5469+
},
5470+
"data": {
5471+
"type": "array",
5472+
"items": {
5473+
"$ref": "#/definitions/CbDbServiceStatistic"
5474+
},
5475+
"x-go-name": "Data"
5476+
},
5477+
"message": {
5478+
"description": "message",
5479+
"type": "string",
5480+
"x-go-name": "Message"
5481+
}
5482+
},
5483+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
5484+
},
53315485
"GetCBOperationLogTipsReply": {
53325486
"type": "object",
53335487
"properties": {
@@ -5338,7 +5492,31 @@
53385492
"x-go-name": "Code"
53395493
},
53405494
"data": {
5341-
"$ref": "#/definitions/cBOperationLogTips"
5495+
"$ref": "#/definitions/CBOperationLogTips"
5496+
},
5497+
"message": {
5498+
"description": "message",
5499+
"type": "string",
5500+
"x-go-name": "Message"
5501+
}
5502+
},
5503+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
5504+
},
5505+
"GetCBOperationStatisticReply": {
5506+
"type": "object",
5507+
"properties": {
5508+
"code": {
5509+
"description": "code",
5510+
"type": "integer",
5511+
"format": "int64",
5512+
"x-go-name": "Code"
5513+
},
5514+
"data": {
5515+
"type": "array",
5516+
"items": {
5517+
"$ref": "#/definitions/CbOperationStatistic"
5518+
},
5519+
"x-go-name": "Data"
53425520
},
53435521
"message": {
53445522
"description": "message",
@@ -9062,19 +9240,6 @@
90629240
}
90639241
},
90649242
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
9065-
},
9066-
"cBOperationLogTips": {
9067-
"type": "object",
9068-
"properties": {
9069-
"exec_result": {
9070-
"type": "array",
9071-
"items": {
9072-
"type": "string"
9073-
},
9074-
"x-go-name": "ExecResult"
9075-
}
9076-
},
9077-
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
90789243
}
90799244
},
90809245
"responses": {

0 commit comments

Comments
 (0)