-
Notifications
You must be signed in to change notification settings - Fork 71
/
model.go
1268 lines (1103 loc) · 39.8 KB
/
model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2020 Baidu, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
// model.go - definitions of the request arguments and results data structure model
package rds
import (
"github.com/baidubce/bce-sdk-go/model"
)
type CreateRdsArgs struct {
ClientToken string `json:"-"`
Billing Billing `json:"billing"`
PurchaseCount int `json:"purchaseCount,omitempty"`
InstanceName string `json:"instanceName,omitempty"`
Engine string `json:"engine"`
EngineVersion string `json:"engineVersion"`
Category string `json:"category,omitempty"`
CpuCount int `json:"cpuCount"`
MemoryCapacity float64 `json:"memoryCapacity"`
VolumeCapacity int `json:"volumeCapacity"`
DiskIoType string `json:"diskIoType"`
ZoneNames []string `json:"zoneNames,omitempty"`
VpcId string `json:"vpcId,omitempty"`
IsDirectPay bool `json:"isDirectPay,omitempty"`
Subnets []SubnetMap `json:"subnets,omitempty"`
Tags []model.TagModel `json:"tags,omitempty"`
AutoRenewTimeUnit string `json:"autoRenewTimeUnit,omitempty"`
AutoRenewTime int `json:"autoRenewTime,omitempty"`
BgwGroupId string `json:"bgwGroupId,omitempty"`
BgwGroupExclusive bool `json:"bgwGroupExclusive,omitempty"`
CharacterSetName string `json:"characterSetName,omitempty"`
LowerCaseTableNames int `json:"lowerCaseTableNames,omitempty"`
ParameterTemplateId string `json:"parameterTemplateId,omitempty"`
Ovip string `json:"ovip,omitempty"`
EntryPort string `json:"entryPort,omitempty"`
ReplicationType string `json:"replicationType,omitempty"`
ResourceGroupId string `json:"resourceGroupId,omitempty"`
InitialDataReference *InitialData `json:"initialDataReference,omitempty"`
Data []RecoveryToSourceInstanceModel `json:"data,omitempty"`
}
type Billing struct {
PaymentTiming string `json:"paymentTiming"`
Reservation Reservation `json:"reservation,omitempty"`
}
type Reservation struct {
ReservationLength int `json:"reservationLength,omitempty"`
ReservationTimeUnit string `json:"reservationTimeUnit,omitempty"`
}
type SubnetMap struct {
ZoneName string `json:"zoneName"`
SubnetId string `json:"subnetId"`
}
type InitialData struct {
InstanceId string `json:"instanceId,omitempty"`
ReferenceType string `json:"referenceType,omitempty"`
Datetime string `json:"datetime,omitempty"`
SnapshotId string `json:"snapshotId,omitempty"`
}
type RecoveryToSourceInstanceModel struct {
RestoreMode string `json:"restoreMode,omitempty"`
DbName string `json:"dbName,omitempty"`
NewDbname string `json:"newDbname,omitempty"`
Tables []Table `json:"tables,omitempty"`
}
type Table struct {
TableName string `json:"tableName,omitempty"`
NewTablename string `json:"newTablename,omitempty"`
}
type CreateResult struct {
InstanceIds []string `json:"instanceIds"`
OrderId string `json:"orderId"`
}
type CreateReadReplicaArgs struct {
ClientToken string `json:"-"`
Billing Billing `json:"billing"`
PurchaseCount int `json:"purchaseCount,omitempty"`
SourceInstanceId string `json:"sourceInstanceId"`
InstanceName string `json:"instanceName,omitempty"`
CpuCount int `json:"cpuCount"`
MemoryCapacity float64 `json:"memoryCapacity"`
VolumeCapacity int `json:"volumeCapacity"`
ZoneNames []string `json:"zoneNames,omitempty"`
VpcId string `json:"vpcId,omitempty"`
IsDirectPay bool `json:"isDirectPay,omitempty"`
Subnets []SubnetMap `json:"subnets,omitempty"`
Tags []model.TagModel `json:"tags,omitempty"`
DiskIoType string `json:"diskIoType,omitempty"`
Ovip string `json:"ovip,omitempty"`
EntryPort string `json:"entryPort,omitempty"`
ResourceGroupId string `json:"resourceGroupId,omitempty"`
}
type CreateRdsProxyArgs struct {
ClientToken string `json:"-"`
Billing Billing `json:"billing"`
SourceInstanceId string `json:"sourceInstanceId"`
InstanceName string `json:"instanceName,omitempty"`
NodeAmount int `json:"nodeAmount"`
ZoneNames []string `json:"zoneNames,omitempty"`
VpcId string `json:"vpcId,omitempty"`
IsDirectPay bool `json:"isDirectPay,omitempty"`
Subnets []SubnetMap `json:"subnets,omitempty"`
Tags []model.TagModel `json:"tags,omitempty"`
Ovip string `json:"ovip,omitempty"`
EntryPort string `json:"entryPort,omitempty"`
ResourceGroupId string `json:"resourceGroupId,omitempty"`
}
type ListRdsArgs struct {
Marker string
MaxKeys int
}
type Instance struct {
InstanceId string `json:"instanceId"`
InstanceName string `json:"instanceName"`
Engine string `json:"engine"`
EngineVersion string `json:"engineVersion"`
RdsMinorVersion string `json:"rdsMinorVersion"`
CharacterSetName string `json:"characterSetName"`
InstanceClass string `json:"instanceClass"`
AllocatedMemoryInMB int `json:"allocatedMemoryInMB"`
AllocatedMemoryInGB float64 `json:"allocatedMemoryInGB"`
AllocatedStorageInGB int `json:"allocatedStorageInGB"`
Category string `json:"category"`
InstanceStatus string `json:"instanceStatus"`
CpuCount int `json:"cpuCount"`
MemoryCapacity float64 `json:"memoryCapacity"`
VolumeCapacity int `json:"volumeCapacity"`
TotalStorageInGB int `json:"totalStorageInGB"`
NodeAmount int `json:"nodeAmount"`
UsedStorage float64 `json:"usedStorage"`
PublicAccessStatus string `json:"publicAccessStatus"`
InstanceCreateTime string `json:"instanceCreateTime"`
InstanceExpireTime string `json:"instanceExpireTime"`
Endpoint Endpoint `json:"endpoint"`
SyncMode string `json:"syncMode"`
BackupPolicy BackupPolicy `json:"backupPolicy"`
Region string `json:"region"`
InstanceType string `json:"instanceType"`
SourceInstanceId string `json:"sourceInstanceId"`
SourceRegion string `json:"sourceRegion"`
ZoneNames []string `json:"zoneNames"`
VpcId string `json:"vpcId"`
Subnets []Subnet `json:"subnets"`
Topology Topology `json:"topology"`
Task string `json:"task"`
PaymentTiming string `json:"paymentTiming"`
BgwGroupId string `json:"bgwGroupId"`
ReadReplicaNum int `json:"readReplicaNum"`
ReadReplica []string `json:"readReplica"`
LockMode string `json:"lockMode"`
EipStatus string `json:"eipStatus"`
SuperUserFlag string `json:"superUserFlag"`
ReplicationType string `json:"replicationType"`
Azone string `json:"azone"`
ApplicationType string `json:"applicationType"`
OnlineStatus int `json:"onlineStatus"`
IsSingle bool `json:"isSingle"`
NodeType string `json:"nodeType"`
DiskIoType string `json:"diskIoType"`
GroupId string `json:"groupId"`
GroupName string `json:"groupName"`
DiskType string `json:"diskType"`
CdsType string `json:"cdsType"`
MaintainStartTime string `json:"maintainStartTime"`
MaintainDuration int `json:"maintainDuration"`
HaStrategy int `json:"haStrategy"`
VpcName string `json:"vpcName"`
Tags []model.TagModel `json:"tags"`
ResourceGroupId string `json:"resourceGroupId"`
ResourceGroupName string `json:"resourceGroupName"`
RoGroupList []RoGroup `json:"roGroupList"`
RoGroupAbnormal bool `json:"roGroupAbnormal"`
}
type RoGroup struct {
RoGroupId string `json:"roGroupId"`
RoGroupName string `json:"roGroupName"`
RoGroupEndpoint InstanceDict `json:"roGroupEndpoint"`
VpcId string `json:"vpcId"`
SubnetId string `json:"subnetId"`
EipStatus string `json:"eipStatus"`
RoGroupAppList []AppList `json:"roGroupAppList"`
VpcVo SimpleVpcVo `json:"vpcVo"`
SubnetVo SubnetVo `json:"subnetVo"`
}
type InstanceDict struct {
Address string `json:"address"`
Port int `json:"port"`
VnetIp string `json:"vnetIp"`
InetIp string `json:"inetIp"`
}
type AppList struct {
AppId string `json:"appId"`
AppName string `json:"appName"`
Weight int `json:"weight"`
RoGroupId string `json:"roGroupId"`
SourceAppId string `json:"sourceAppId"`
Status string `json:"status"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
AppStatus string `json:"appStatus"`
AppIdShort string `json:"appIdShort"`
}
type SimpleVpcVo struct {
VpcId string `json:"vpcId"`
ShortId string `json:"shortId"`
Name string `json:"name"`
Cidr string `json:"cidr"`
Status int `json:"status"`
CreateTime string `json:"createTime"`
Description string `json:"description"`
DefaultVpc bool `json:"defaultVpc"`
Ipv6Cidr string `json:"ipv6Cidr"`
AuxiliaryCidr []string `json:"auxiliaryCidr"`
Relay bool `json:"relay"`
}
type SubnetVo struct {
SubnetId string `json:"subnetId"`
Name string `json:"name"`
Az string `json:"az"`
Cidr string `json:"cidr"`
Ipv6Cidr string `json:"ipv6Cidr"`
VpcId string `json:"vpcId"`
VpcShortId string `json:"vpcShortId"`
}
type ListRdsResult struct {
Marker string `json:"marker"`
MaxKeys int `json:"maxKeys"`
IsTruncated bool `json:"isTruncated"`
NextMarker string `json:"nextMarker"`
Instances []Instance `json:"instances"`
}
type Subnet struct {
Name string `json:"name"`
SubnetId string `json:"subnetId"`
ZoneName string `json:"zoneName"`
Cidr string `json:"cidr"`
VpcId string `json:"vpcId"`
}
type Endpoint struct {
Address string `json:"address"`
Port int `json:"port"`
VnetIp string `json:"vnetIp"`
InetIp string `json:"inetIp"`
}
type BackupPolicy struct {
BackupDays string `json:"backupDays"`
BackupTime string `json:"backupTime"`
Persistent bool `json:"persistent"`
ExpireInDays int `json:"expireInDays"`
FreeSpaceInGB int `json:"freeSpaceInGb"`
}
type Topology struct {
Rdsproxy []string `json:"rdsproxy"`
Master []string `json:"master"`
ReadReplica []string `json:"readReplica"`
}
type ResizeRdsArgs struct {
CpuCount int `json:"cpuCount"`
MemoryCapacity float64 `json:"memoryCapacity"`
VolumeCapacity int `json:"volumeCapacity"`
NodeAmount int `json:"nodeAmount,omitempty"`
IsDirectPay bool `json:"isDirectPay,omitempty"`
AllocatedMemoryInMB string `json:"allocatedMemoryInMB,omitempty"`
IsEnhanced bool `json:"isEnhanced,omitempty"`
EffectiveTime string `json:"effectiveTime,omitempty"`
MasterAzone string `json:"masterAzone,omitempty"`
BackupAzone string `json:"backupAzone,omitempty"`
DiskIoType string `json:"diskIoType,omitempty"`
SubnetId string `json:"subnetId,omitempty"`
EdgeSubnetId string `json:"edgeSubnetId,omitempty"`
Subnets []SubnetMap `json:"subnets,omitempty"`
}
type CreateAccountArgs struct {
ClientToken string `json:"-"`
AccountName string `json:"accountName"`
Password string `json:"password"`
AccountType string `json:"accountType,omitempty"`
DatabasePrivileges []DatabasePrivilege `json:"databasePrivileges,omitempty"`
Desc string `json:"desc,omitempty"`
Type string `json:"type,omitempty"`
}
type DatabasePrivilege struct {
DbName string `json:"dbName"`
AuthType string `json:"authType"`
}
type Account struct {
AccountName string `json:"accountName"`
Status string `json:"status"`
Type string `json:"type"`
AccountType string `json:"accountType"`
DatabasePrivileges []DatabasePrivilege `json:"databasePrivileges"`
Desc string `json:"desc"`
}
type ListAccountResult struct {
Accounts []Account `json:"accounts"`
}
type ModifyAccountDesc struct {
Remark string `json:"remark"`
}
type UpdateAccountPrivileges struct {
DatabasePrivileges []DatabasePrivilege `json:"privileges"`
}
type UpdatePasswordArgs struct {
Password string `json:"password"`
}
type UpdateInstanceNameArgs struct {
InstanceName string `json:"instanceName"`
}
type ModifySyncModeArgs struct {
SyncMode string `json:"syncMode"`
}
type ModifyEndpointArgs struct {
Address string `json:"address"`
}
type ModifyPublicAccessArgs struct {
PublicAccess bool `json:"publicAccess"`
}
type ModifyBackupPolicyArgs struct {
BackupDays string `json:"backupDays"`
BackupTime string `json:"backupTime"`
Persistent bool `json:"persistent"`
ExpireInDays int `json:"expireInDays"`
}
type GetBackupListArgs struct {
Marker string
MaxKeys int
}
type Snapshot struct {
SnapshotId string `json:"backupId"`
SnapshotSizeInBytes int64 `json:"backupSize"`
SnapshotType string `json:"backupType"`
SnapshotStatus string `json:"backupStatus"`
SnapshotStartTime string `json:"backupStartTime"`
SnapshotEndTime string `json:"backupEndTime"`
DownloadUrl string `json:"downloadUrl"`
DownloadExpires string `json:"downloadExpires"`
}
type BackupDetail struct {
BackupSize int `json:"backupSize"`
BackupStatus string `json:"backupStatus"`
BackupId string `json:"backupId"`
BackupEndTime string `json:"backupEndTime"`
DownloadUrl string `json:"downloadUrl"`
BackupType string `json:"backupType"`
BackupStartTime string `json:"backupStartTime"`
DownloadExpires string `json:"downloadExpires"`
}
type GetBackupListResult struct {
Marker string `json:"marker"`
MaxKeys int `json:"maxKeys"`
IsTruncated bool `json:"isTruncated"`
NextMarker string `json:"nextMarker"`
Backups []BackupDetail `json:"backups"`
}
type GetBinlogListResult struct {
Binlogs []Binlog `json:"binlogs"`
}
type GetBinlogInfoResult struct {
Binlog BinlogInfo `json:"binlog"`
}
type BinlogInfo struct {
DownloadUrl string `json:"downloadUrl"`
DownloadExpires string `json:"downloadExpires"`
}
type Binlog struct {
BinlogId string `json:"binlogId"`
BinlogSizeInBytes int64 `json:"binlogSize"`
BinlogStatus string `json:"binlogStatus"`
BinlogStartTime string `json:"binlogStartTime"`
BinlogEndTime string `json:"binlogEndTime"`
}
type RecoveryByDatetimeArgs struct {
Datetime string `json:"dateTime"`
Data []RecoveryData `json:"data"`
}
type RecoveryBySnapshotArgs struct {
SnapshotId string `json:"snapshotId"`
Data []RecoveryData `json:"data"`
}
type RecoveryData struct {
DbName string `json:"dbName"`
NewDbname string `json:"newDbname"`
RestoreMode string `json:"restoreMode"`
Tables []TableData `json:"tables"`
}
type TableData struct {
TableName string `json:"tableName"`
NewTablename string `json:"newTablename"`
}
type GetZoneListResult struct {
Zones []ZoneName `json:"zones"`
}
type ZoneName struct {
ZoneNames []string `json:"zoneNames"`
}
type ListSubnetsArgs struct {
VpcId string `json:"vpcId"`
ZoneName string `json:"zoneName"`
}
type ListSubnetsResult struct {
Subnets []Subnet `json:"subnets"`
}
type GetSecurityIpsResult struct {
Etag string `json:"etag"`
SecurityIps []string `json:"securityIps"`
}
type UpdateSecurityIpsArgs struct {
SecurityIps []string `json:"securityIps"`
}
type ListParametersResult struct {
Etag string `json:"etag"`
Parameters []Parameter `json:"parameters"`
}
type Parameter struct {
Name string `json:"name"`
DefaultValue string `json:"defaultValue"`
Value string `json:"value"`
PendingValue string `json:"pendingValue"`
Type string `json:"type"`
Dynamic string `json:"dynamic"`
Modifiable string `json:"modifiable"`
AllowedValues string `json:"allowedValues"`
Desc string `json:"desc"`
}
type UpdateParameterArgs struct {
Parameters []KVParameter `json:"parameters"`
}
type KVParameter struct {
Name string `json:"name"`
Value string `json:"value"`
}
type ParameterHistoryResult struct {
Parameters []ParameterHistory `json:"parameters"`
}
type ParameterHistory struct {
Name string `json:"name"`
BeforeValue string `json:"beforeValue"`
AfterValue string `json:"afterValue"`
Status string `json:"status"`
UpdateTime string `json:"updateTime"`
}
type AutoRenewArgs struct {
InstanceIds []string `json:"instanceIds"`
AutoRenewTimeUnit string `json:"autoRenewTimeUnit"`
AutoRenewTime int `json:"autoRenewTime"`
}
type SlowLogDownloadTaskListResult struct {
Slowlogs []Slowlog `json:"slowlogs"`
}
type SlowLogDownloadDetail struct {
Slowlogs []SlowlogDetail `json:"slowlogs"`
}
type Slowlog struct {
SlowlogId string `json:"slowlogId"`
SlowlogSizeInBytes int `json:"slowlogSizeInBytes"`
SlowlogStartTime string `json:"slowlogStartTime"`
SlowlogEndTime string `json:"slowlogEndTime"`
}
type SlowlogDetail struct {
Url string `json:"url"`
DownloadExpires string `json:"downloadExpires"`
}
type MaintainTimeArgs struct {
MaintainStartTime string `json:"maintainStartTime"`
MaintainDuration int `json:"maintainDuration"`
}
type DiskAutoResizeArgs struct {
FreeSpaceThreshold int `json:"freeSpaceThreshold,omitempty"`
DiskMaxLimit int `json:"diskMaxLimit,omitempty"`
}
type AutoResizeConfigResult struct {
AutoResizeDisk int `json:"autoResizeDisk"`
FreeSpaceThreshold int `json:"freeSpaceThreshold"`
DiskMaxLimit int `json:"diskMaxLimit"`
ExtendStepPercent int `json:"extendStepPercent"`
}
type EnableAutoExpansionResult struct {
SupportEnableDiskAutoResize int `json:"supportEnableDiskAutoResize"`
}
type AzoneMigration struct {
MasterAzone string `json:"master_azone"`
BackupAzone string `json:"backup_azone"`
ZoneNames []string `json:"zoneNames"`
Subnets []SubnetMap `json:"subnets"`
EffectiveTime string `json:"effectiveTime"`
}
type UpdateDatabasePortArgs struct {
EntryPort int `json:"entryPort"`
}
type ListDatabasesResult struct {
Databases []Database `json:"databases"`
}
type Database struct {
DbName string `json:"dbName"`
CharacterSetName string `json:"characterSetName"`
Remark string `json:"remark"`
DbStatus string `json:"dbStatus"`
AccountPrivileges []AccountPrivilege `json:"accountPrivileges"`
}
type AccountPrivilege struct {
AccountName string `json:"accountName"`
AuthType string `json:"authType"`
}
type ModifyDatabaseDesc struct {
Remark string `json:"remark"`
}
type CreateDatabaseArgs struct {
CharacterSetName string `json:"characterSetName"`
DbName string `json:"dbName"`
Remark string `json:"remark"`
AccountPrivileges []AccountPrivilege `json:"accountPrivileges"`
}
type TaskListArgs struct {
PageSize string `json:"pageSize,omitempty"`
PageNo string `json:"pageNo,omitempty"`
InstanceId string `json:"instanceId,omitempty"`
InstanceName string `json:"instanceName,omitempty"`
TaskId int `json:"taskId,omitempty"`
TaskType string `json:"taskType,omitempty"`
TaskStatus string `json:"taskStatus,omitempty"`
StartTime string `json:"startTime,omitempty"`
EndTime string `json:"endTime,omitempty"`
}
type TaskListResult struct {
Tasks []Task `json:"tasks"`
Count int `json:"count"`
}
type Task struct {
TaskId int `json:"taskId"`
TaskType string `json:"taskType"`
TaskName string `json:"taskName"`
InstanceId string `json:"instanceId"`
InstanceName string `json:"instanceName"`
UserId string `json:"userId"`
Region string `json:"region"`
TaskStatus string `json:"taskStatus"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
FinishTime string `json:"finishTime"`
CancelFlag int `json:"cancelFlag"`
Progress []ProgressItem `json:"progress"`
}
type ProgressItem struct {
Step string `json:"step"`
Status string `json:"status"`
Description string `json:"description"`
}
type RecyclerListResult struct {
NextMarker string `json:"nextMarker"`
Marker string `json:"marker"`
MaxKeys int `json:"maxKeys"`
IsTruncated bool `json:"isTruncated"`
Instances []Instance `json:"instances"`
InstanceType string `json:"instanceType"`
ZoneNames []string `json:"zoneNames"`
PaymentTiming string `json:"paymentTiming"`
}
type RecyclerRecoverArgs struct {
InstanceIds []string `json:"instanceIds"`
}
type InstanceGroupArgs struct {
Name string `json:"name"`
LeaderId string `json:"leaderId"`
}
type CreateInstanceGroupResult struct {
Result int `json:"result"`
}
type ListInstanceGroupArgs struct {
Manner string `json:"manner"`
Order string `json:"order,omitempty"`
OrderBy string `json:"orderBy,omitempty"`
PageNo int `json:"pageNo,omitempty"`
PageSize int `json:"pageSize,omitempty"`
}
type InstanceGroupListResult struct {
Result []InstanceGroup `json:"result"`
PageNo int `json:"pageNo"`
PageSize int `json:"pageSize"`
TotalCount int `json:"totalCount"`
}
type InstanceGroup struct {
GroupId string `json:"groupId"`
Name string `json:"name"`
Count int `json:"count"`
Leader GroupInstance `json:"leader"`
}
type GroupInstance struct {
InstanceIdShort string `json:"instanceIdShort"`
Region string `json:"region"`
Azone string `json:"azone"`
Status string `json:"status"`
LockMode string `json:"lockMode"`
Name string `json:"name"`
}
type InstanceGroupDetailResult struct {
Group InstanceGroupDetail `json:"group"`
}
type InstanceGroupDetail struct {
InstanceGroup
Fllowers []GroupInstance `json:"fllowers"`
}
type CheckGtidArgs struct {
InstanceId string `json:"instanceId"`
}
type CheckGtidResult struct {
Result bool `json:"result"`
}
type CheckPingArgs struct {
SourceId string `json:"sourceId"`
TargetId string `json:"targetId"`
}
type CheckPingResult struct {
Result bool `json:"result"`
}
type CheckDataArgs struct {
InstanceId string `json:"instanceId"`
}
type CheckDataResult struct {
Result bool `json:"result"`
}
type CheckVersionArgs struct {
LeaderId string `json:"leaderId"`
FollowerId string `json:"followerId"`
}
type CheckVersionResult struct {
Result bool `json:"result"`
}
type InstanceGroupNameArgs struct {
Name string `json:"name"`
}
type InstanceGroupAddArgs struct {
FollowerId string `json:"followerId"`
}
type InstanceGroupBatchAddArgs struct {
FollowerIds []string `json:"followerIds"`
Name string `json:"name"`
LeaderId string `json:"leaderId"`
}
type ForceChangeArgs struct {
LeaderId string `json:"leaderId"`
Force int `json:"force,omitempty"`
MaxBehind int `json:"maxBehind,omitempty"`
}
type ForceChangeResult struct {
BehindMaster int `json:"behind_master"`
}
type GroupLeaderChangeArgs struct {
LeaderId string `json:"leaderId"`
}
type MinorVersionListResult struct {
RdsMinorVersionList []RdsMinorVersion `json:"rdsMinorVersionList"`
}
type RdsMinorVersion struct {
DbVersion string `json:"dbVersion"`
MinorVersion string `json:"minorVersion"`
RdsMinorVersion string `json:"rdsMinorVersion"`
FeatureDescription string `json:"featureDescription"`
}
type UpgradeMinorVersionArgs struct {
TargetMinorVersion string `json:"targetMinorVersion"`
EffectiveTime string `json:"effectiveTime"`
}
type SlowSqlFlowStatusResult struct {
Enabled int `json:"enabled"`
}
type GetSlowSqlArgs struct {
Page int `json:"page,omitempty"`
PageSize int `json:"pageSize,omitempty"`
Sort string `json:"sort,omitempty"`
Schema string `json:"schema,omitempty"`
Digest string `json:"digest,omitempty"`
Start string `json:"start,omitempty"`
End string `json:"end,omitempty"`
}
type SlowSqlListResult struct {
Items []SlowSqlItem `json:"items"`
TotalCount int `json:"totalCount"`
}
type SlowSqlItem struct {
AffectedRows int64 `json:"affectedRows"`
ClientHost string `json:"clientHost"`
ClientIP string `json:"clientIP"`
Cluster string `json:"cluster"`
ConnectionId int64 `json:"connectionId"`
CurrentDB string `json:"currentDB"`
Digest string `json:"digest"`
Duration float32 `json:"duration"`
ExaminedRows int64 `json:"examinedRows"`
LockTime int64 `json:"lockTime"`
Node string `json:"node"`
NumRows int `json:"numRows"`
Sql string `json:"sql"`
SqlId string `json:"sqlId"`
Start string `json:"start"`
User string `json:"user"`
}
type SlowSqlExplainResult struct {
List []SlowSqlExplainItem `json:"list"`
}
type SlowSqlExplainItem struct {
ExplainId int64 `json:"explainId"`
Extra string `json:"extra"`
Filtered int64 `json:"filtered"`
Key string `json:"key"`
KeyLen string `json:"keyLen"`
Partitions string `json:"partitions"`
PossibleKeys string `json:"possibleKeys"`
Ref string `json:"ref"`
Rows int `json:"rows"`
SelectType string `json:"selectType"`
Table string `json:"table"`
Type string `json:"type"`
}
type SlowSqlDigestResult struct {
Items []SlowSqlDigestItem `json:"items"`
Summary SlowSqlDigestItem `json:"summary"`
TotalCount int `json:"totalCount"`
}
type SlowSqlDigestItem struct {
AvgExamRows int64 `json:"avgExamRows"`
AvgLockTime int64 `json:"avgLockTime"`
AvgNumRows int64 `json:"avgNumRows"`
AvgTime float64 `json:"avgTime"`
Digest string `json:"digest"`
ExecuteTimes int64 `json:"executeTimes"`
MaxExamRows int64 `json:"maxExamRows"`
MaxLockTime float64 `json:"maxLockTime"`
MaxNumRows int64 `json:"maxNumRows"`
MaxTime float64 `json:"maxTime"`
NormalSql string `json:"normalSql"`
Schema string `json:"schema"`
TotalExamRows int64 `json:"totalExamRows"`
TotalLockTime float64 `json:"totalLockTime"`
TotalNumRows int64 `json:"totalNumRows"`
TotalTime float64 `json:"totalTime"`
}
type GetSlowSqlDurationArgs struct {
Schema string `json:"schema,omitempty"`
Digest string `json:"digest,omitempty"`
Start string `json:"start,omitempty"`
End string `json:"end,omitempty"`
}
type SlowSqlDurationResult struct {
List []SlowSqlDurationItem `json:"list"`
}
type SlowSqlDurationItem struct {
End int64 `json:"end"`
Nums int64 `json:"nums"`
Percentage float64 `json:"percentage"`
Start int64 `json:"start"`
Title string `json:"title"`
}
type GetSlowSqlSourceArgs struct {
Schema string `json:"schema,omitempty"`
Digest string `json:"digest,omitempty"`
Start string `json:"start,omitempty"`
End string `json:"end,omitempty"`
}
type SlowSqlSourceResult struct {
List []SlowSqlSourceItem `json:"list"`
}
type SlowSqlSourceItem struct {
Nums int64 `json:"nums"`
Percentage float64 `json:"percentage"`
Host string `json:"host"`
Ip string `json:"ip"`
}
type SlowSqlSchemaResult struct {
List []SlowSqlSchemaItem `json:"list"`
}
type SlowSqlSchemaItem struct {
Schema string `json:"schema"`
Table string `json:"table"`
}
type SlowSqlTableResult struct {
List []SlowSqlTableItem `json:"list"`
}
type SlowSqlTableItem struct {
Schema string `json:"schema"`
Table string `json:"table"`
Charset string `json:"charset"`
Collation string `json:"collation"`
Column string `json:"column"`
Comment string `json:"comment"`
DefaultValue string `json:"defaultValue"`
Extra string `json:"extra"`
Key string `json:"key"`
Nullable string `json:"nullable"`
Position int64 `json:"position"`
Type string `json:"type"`
}
type GetSlowSqlIndexArgs struct {
SqlId string `json:"sqlId"`
Schema string `json:"schema"`
Table string `json:"table"`
Index string `json:"index,omitempty"`
}
type SlowSqlIndexResult struct {
List []SlowSqlIndexItem `json:"list"`
}
type SlowSqlIndexItem struct {
Schema string `json:"schema"`
Table string `json:"table"`
Collation string `json:"collation"`
Column string `json:"column"`
Comment string `json:"comment"`
Nullable string `json:"nullable"`
Type string `json:"type"`
Cardinality int64 `json:"cardinality"`
Index string `json:"index"`
NonUnique string `json:"nonUnique"`
Sequence string `json:"sequence"`
}
type GetSlowSqlTrendArgs struct {
Schema string `json:"schema,omitempty"`
Interval string `json:"interval,omitempty"`
Start string `json:"start,omitempty"`
End string `json:"end,omitempty"`
}
type SlowSqlTrendResult struct {
Interval int `json:"interval"`
Items []SlowSqlTrendItem `json:"items"`
}
type SlowSqlTrendItem struct {
Datetime string `json:"datetime"`
Times int64 `json:"times"`
}
type SlowSqlAdviceResult struct {
IndexAdvice []SlowSqlIndexAdviceItem `json:"indexAdvice"`
StatementAdvice []SlowSqlIndexAdviceItem `json:"statementAdvice"`
}
type SlowSqlIndexAdviceItem struct {
Advice string `json:"advice"`
Level string `json:"level"`
}
type DiskInfoResult struct {
Result DiskInfo `json:"result"`
}
type DiskInfo struct {
Grow float64 `json:"grow"`
UseDay float64 `json:"useDay"`
DiskFree float64 `json:"diskFree"`
DiskUse float64 `json:"diskUse"`
DiskQuota float64 `json:"diskQuota"`
}
type DbListResult struct {
Result DbInfo `json:"result"`
}
type DbInfo struct {
DbInfoItems []DbInfoItem `json:"dbList"`
}
type DbInfoItem struct {
Size string `json:"size"`
TableSchema string `json:"tableSchema"`
}
type GetTableListArgs struct {
DbName string `json:"dbName"`
PageNo int `json:"pageNo,omitempty"`
PageSize int `json:"pageSize,omitempty"`
OrderBy string `json:"orderBy,omitempty"`
Sort string `json:"sort,omitempty"`
SearchKey string `json:"searchKey,omitempty"`