@daocloud-proto/skoala 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,6 +20,7 @@ export enum HttpMethod {
20
20
  PUT = "PUT",
21
21
  PATCH = "PATCH",
22
22
  OPTIONS = "OPTIONS",
23
+ HEAD = "HEAD",
23
24
  }
24
25
 
25
26
  export enum Protocol {
@@ -56,6 +57,7 @@ export type HeaderRule = BaseHeaderRule
56
57
 
57
58
  export type APIInfo = {
58
59
  apiName?: string
60
+ apiGroup?: string
59
61
  fqdn?: string
60
62
  method?: HttpMethod[]
61
63
  requestPath?: string
@@ -5,9 +5,20 @@
5
5
  */
6
6
 
7
7
  import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
8
+ import * as SkoalaApiGeneralV1alpha1Insight from "../../general/v1alpha1/insight.pb"
8
9
  import * as SkoalaApiGeneralV1alpha1Resource from "../../general/v1alpha1/resource.pb"
9
10
  import * as SkoalaApiGeneralV1alpha1Service from "../../general/v1alpha1/service.pb"
10
11
 
12
+ export enum NacosConfigFileType {
13
+ CONFIG_TYPE_UNSPECIFIED = "CONFIG_TYPE_UNSPECIFIED",
14
+ text = "text",
15
+ json = "json",
16
+ xml = "xml",
17
+ yaml = "yaml",
18
+ html = "html",
19
+ properties = "properties",
20
+ }
21
+
11
22
  export enum NacosStatus {
12
23
  STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
13
24
  Running = "Running",
@@ -16,12 +27,38 @@ export enum NacosStatus {
16
27
  Scaling = "Scaling",
17
28
  }
18
29
 
30
+ export enum NacosConditionType {
31
+ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
32
+ FOLLOWER = "FOLLOWER",
33
+ LEADER = "LEADER",
34
+ }
35
+
36
+ export enum NacosConditionStatus {
37
+ STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
38
+ UNKNOWN = "UNKNOWN",
39
+ TRUE = "TRUE",
40
+ FALSE = "FALSE",
41
+ }
42
+
19
43
  export enum NacosConfigType {
20
44
  TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
21
45
  standalone = "standalone",
22
46
  cluster = "cluster",
23
47
  }
24
48
 
49
+ export enum CreateNacosConfigReqPolicy {
50
+ POLICY_TYPE_UNSPECIFIED = "POLICY_TYPE_UNSPECIFIED",
51
+ ABORT = "ABORT",
52
+ SKIP = "SKIP",
53
+ OVERWRITE = "OVERWRITE",
54
+ }
55
+
56
+ export enum NacosNodeStatue {
57
+ NODE_STATUE_UNSPECIFIED = "NODE_STATUE_UNSPECIFIED",
58
+ UP = "UP",
59
+ DOWN = "DOWN",
60
+ }
61
+
25
62
  export type ListNacosReq = {
26
63
  workspaceId?: string
27
64
  clusterName?: string
@@ -54,7 +91,6 @@ export type Nacos = {
54
91
  resources?: SkoalaApiGeneralV1alpha1Resource.ResourceRequirements
55
92
  condition?: NacosCondition[]
56
93
  volume?: Volume
57
- plugins?: Plugins
58
94
  createAt?: string
59
95
  }
60
96
 
@@ -63,12 +99,12 @@ export type NacosDatabase = {
63
99
  host?: string
64
100
  port?: string
65
101
  db?: string
66
- user?: string
102
+ username?: string
67
103
  }
68
104
 
69
105
  export type NacosCondition = {
70
- type?: string
71
- status?: string
106
+ type?: NacosConditionType
107
+ status?: NacosConditionStatus
72
108
  reason?: string
73
109
  message?: string
74
110
  instance?: string
@@ -94,24 +130,6 @@ export type UpdateNacosReq = {
94
130
  nacosName?: string
95
131
  namespaceName?: string
96
132
  config?: NacosConfig
97
- plugins?: Plugins
98
- }
99
-
100
- export type Plugins = {
101
- sentinel?: Sentinel
102
- }
103
-
104
- export type Sentinel = {
105
- enabled?: boolean
106
- image?: string
107
- replicas?: number
108
- resources?: SkoalaApiGeneralV1alpha1Resource.ResourceRequirements
109
- serviceType?: SkoalaApiGeneralV1alpha1Service.ServiceType
110
- port?: number
111
- nodePort?: number
112
- }
113
-
114
- export type UpdateNacosRes = {
115
133
  }
116
134
 
117
135
  export type CreateNacosReq = {
@@ -121,10 +139,6 @@ export type CreateNacosReq = {
121
139
  namespaceName?: string
122
140
  createNamespace?: boolean
123
141
  config?: NacosConfig
124
- plugins?: Plugins
125
- }
126
-
127
- export type CreateNacosRes = {
128
142
  }
129
143
 
130
144
  export type DeleteNacosReq = {
@@ -134,9 +148,6 @@ export type DeleteNacosReq = {
134
148
  namespaceName?: string
135
149
  }
136
150
 
137
- export type DeleteNacosRes = {
138
- }
139
-
140
151
  export type RestartNacosReq = {
141
152
  workspaceId?: string
142
153
  clusterName?: string
@@ -144,12 +155,12 @@ export type RestartNacosReq = {
144
155
  namespaceName?: string
145
156
  }
146
157
 
147
- export type RestartNacosRes = {
148
- }
149
-
150
158
  export type NacosConfig = {
151
159
  type?: NacosConfigType
152
160
  version?: string
161
+ imageRegistry?: string
162
+ imageRepository?: string
163
+ imageTag?: string
153
164
  replicas?: number
154
165
  resources?: SkoalaApiGeneralV1alpha1Resource.ResourceRequirements
155
166
  serviceType?: SkoalaApiGeneralV1alpha1Service.ServiceType
@@ -179,6 +190,9 @@ export type ListNacosServiceReq = {
179
190
  nacosName?: string
180
191
  namespaceName?: string
181
192
  nacosNamespace?: string
193
+ serviceName?: string
194
+ groupName?: string
195
+ isEmpty?: boolean
182
196
  page?: number
183
197
  pageSize?: number
184
198
  }
@@ -195,6 +209,8 @@ export type NacosServiceBrief = {
195
209
  healthyInstanceCount?: number
196
210
  ipCount?: number
197
211
  triggerFlag?: boolean
212
+ nacosNamespace?: string
213
+ insight?: SkoalaApiGeneralV1alpha1Insight.InsightBrief
198
214
  }
199
215
 
200
216
  export type NacosInstanceCluster = {
@@ -208,9 +224,13 @@ export type NacosInstanceCluster = {
208
224
  }
209
225
 
210
226
  export type NacosServiceDetail = {
227
+ name?: string
211
228
  groupName?: string
229
+ clusterCount?: number
230
+ healthyInstanceCount?: number
231
+ ipCount?: number
232
+ triggerFlag?: boolean
212
233
  metadata?: {[key: string]: string}
213
- name?: string
214
234
  protectThreshold?: number
215
235
  selector?: {[key: string]: string}
216
236
  }
@@ -228,6 +248,9 @@ export type NacosServiceInstance = {
228
248
  port?: number
229
249
  serviceName?: string
230
250
  weight?: number
251
+ pluginsHealthy?: boolean
252
+ nacosNamespace?: string
253
+ insight?: SkoalaApiGeneralV1alpha1Insight.InsightBrief
231
254
  }
232
255
 
233
256
  export type GetNacosServiceReq = {
@@ -245,14 +268,41 @@ export type GetNacosServiceRes = {
245
268
  service?: NacosServiceDetail
246
269
  }
247
270
 
248
- export type API = {
249
- isHosted?: boolean
250
- registry?: string
251
- serviceName?: string
271
+ export type GetNacosServiceInsightReq = {
272
+ workspaceId?: string
273
+ clusterName?: string
274
+ nacosName?: string
275
+ namespaceName?: string
252
276
  nacosNamespace?: string
253
277
  nacosGroupName?: string
254
- dataType?: string
255
- detail?: string
278
+ nacosService?: string
279
+ }
280
+
281
+ export type GetNacosServiceInsightRes = {
282
+ insight?: SkoalaApiGeneralV1alpha1Insight.ServiceInsightDetail
283
+ }
284
+
285
+ export type UpdateNacosServiceReq = {
286
+ workspaceId?: string
287
+ clusterName?: string
288
+ nacosName?: string
289
+ namespaceName?: string
290
+ nacosNamespace?: string
291
+ nacosGroupName?: string
292
+ nacosService?: string
293
+ protectThreshold?: number
294
+ metadata?: string
295
+ selector?: string
296
+ }
297
+
298
+ export type DeleteNacosServiceReq = {
299
+ workspaceId?: string
300
+ clusterName?: string
301
+ nacosName?: string
302
+ namespaceName?: string
303
+ nacosNamespace?: string
304
+ nacosGroupName?: string
305
+ nacosService?: string
256
306
  }
257
307
 
258
308
  export type GetNacosServiceAPIReq = {
@@ -266,7 +316,7 @@ export type GetNacosServiceAPIReq = {
266
316
  }
267
317
 
268
318
  export type GetNacosServiceAPIRes = {
269
- api?: API
319
+ api?: SkoalaApiGeneralV1alpha1Common.API
270
320
  }
271
321
 
272
322
  export type CreateNacosServiceAPIReq = {
@@ -277,14 +327,10 @@ export type CreateNacosServiceAPIReq = {
277
327
  nacosNamespace?: string
278
328
  nacosGroupName?: string
279
329
  nacosService?: string
280
- dataType?: string
330
+ dataType?: SkoalaApiGeneralV1alpha1Common.APIDataType
281
331
  detail?: string
282
332
  }
283
333
 
284
- export type CreateNacosServiceAPIRes = {
285
- api?: API
286
- }
287
-
288
334
  export type UpdateNacosServiceAPIReq = {
289
335
  workspaceId?: string
290
336
  clusterName?: string
@@ -293,14 +339,11 @@ export type UpdateNacosServiceAPIReq = {
293
339
  nacosNamespace?: string
294
340
  nacosGroupName?: string
295
341
  nacosService?: string
296
- dataType?: string
342
+ apiId?: number
343
+ dataType?: SkoalaApiGeneralV1alpha1Common.APIDataType
297
344
  detail?: string
298
345
  }
299
346
 
300
- export type UpdateNacosServiceAPIRes = {
301
- api?: API
302
- }
303
-
304
347
  export type DeleteNacosServiceAPIReq = {
305
348
  workspaceId?: string
306
349
  clusterName?: string
@@ -309,10 +352,7 @@ export type DeleteNacosServiceAPIReq = {
309
352
  nacosNamespace?: string
310
353
  nacosGroupName?: string
311
354
  nacosService?: string
312
- }
313
-
314
- export type DeleteNacosServiceAPIRes = {
315
- success?: boolean
355
+ apiId?: number
316
356
  }
317
357
 
318
358
  export type ListNacosServiceInstanceReq = {
@@ -333,6 +373,62 @@ export type ListNacosServiceInstanceRes = {
333
373
  pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
334
374
  }
335
375
 
376
+ export type GetNacosServiceInstanceReq = {
377
+ workspaceId?: string
378
+ clusterName?: string
379
+ nacosName?: string
380
+ namespaceName?: string
381
+ nacosNamespace?: string
382
+ nacosGroupName?: string
383
+ nacosClusterName?: string
384
+ nacosService?: string
385
+ ip?: string
386
+ port?: number
387
+ ephemeral?: boolean
388
+ nacosInstanceId?: string
389
+ }
390
+
391
+ export type GetNacosServiceInstanceRes = {
392
+ instance?: NacosServiceInstance
393
+ }
394
+
395
+ export type GetNacosServiceInstanceInsightReq = {
396
+ workspaceId?: string
397
+ clusterName?: string
398
+ nacosName?: string
399
+ namespaceName?: string
400
+ nacosNamespace?: string
401
+ nacosGroupName?: string
402
+ nacosClusterName?: string
403
+ nacosService?: string
404
+ ip?: string
405
+ port?: number
406
+ ephemeral?: boolean
407
+ nacosInstanceId?: string
408
+ }
409
+
410
+ export type GetNacosServiceInstanceInsightRes = {
411
+ insight?: SkoalaApiGeneralV1alpha1Insight.InstanceInsightDetail
412
+ }
413
+
414
+ export type UpdateNacosServiceInstanceReq = {
415
+ workspaceId?: string
416
+ clusterName?: string
417
+ nacosName?: string
418
+ namespaceName?: string
419
+ nacosNamespace?: string
420
+ nacosGroupName?: string
421
+ nacosClusterName?: string
422
+ nacosService?: string
423
+ ip?: string
424
+ port?: number
425
+ ephemeral?: boolean
426
+ weight?: number
427
+ enabled?: boolean
428
+ metadata?: string
429
+ nacosInstanceId?: string
430
+ }
431
+
336
432
  export type NacosServiceSubscriber = {
337
433
  addrStr?: string
338
434
  agent?: string
@@ -388,12 +484,9 @@ export type CreateNacosNamespaceReq = {
388
484
  clusterName?: string
389
485
  namespaceName?: string
390
486
  nacosName?: string
391
- nacosNamespaceShowName?: string
392
- nacosNamespaceDesc?: string
393
- }
394
-
395
- export type CreateNacosNamespaceRes = {
396
- success?: boolean
487
+ nacosNamespace?: string
488
+ namespaceShowName?: string
489
+ namespaceDesc?: string
397
490
  }
398
491
 
399
492
  export type UpdateNacosNamespaceReq = {
@@ -402,12 +495,8 @@ export type UpdateNacosNamespaceReq = {
402
495
  namespaceName?: string
403
496
  nacosName?: string
404
497
  nacosNamespace?: string
405
- nacosNamespaceShowName?: string
406
- nacosNamespaceDesc?: string
407
- }
408
-
409
- export type UpdateNacosNamespaceRes = {
410
- success?: boolean
498
+ namespaceShowName?: string
499
+ namespaceDesc?: string
411
500
  }
412
501
 
413
502
  export type DeleteNacosNamespaceReq = {
@@ -418,10 +507,6 @@ export type DeleteNacosNamespaceReq = {
418
507
  nacosNamespace?: string
419
508
  }
420
509
 
421
- export type DeleteNacosNamespaceRes = {
422
- success?: boolean
423
- }
424
-
425
510
  export type GetNacosNamespaceReq = {
426
511
  workspaceId?: string
427
512
  clusterName?: string
@@ -459,7 +544,7 @@ export type NacosConfigBrief = {
459
544
  id?: string
460
545
  md5?: string
461
546
  tenant?: string
462
- type?: string
547
+ type?: NacosConfigFileType
463
548
  }
464
549
 
465
550
  export type ListNacosConfigReq = {
@@ -468,11 +553,10 @@ export type ListNacosConfigReq = {
468
553
  namespaceName?: string
469
554
  nacosName?: string
470
555
  nacosNamespace?: string
471
- nacosConfigDataId?: string
472
- nacosConfigGroup?: string
473
- nacosConfigAppName?: string
474
- nacosConfigTags?: string
475
- nacosConfigSearch?: string
556
+ dataId?: string
557
+ group?: string
558
+ appName?: string
559
+ tags?: string
476
560
  page?: number
477
561
  pageSize?: number
478
562
  }
@@ -488,8 +572,8 @@ export type GetNacosConfigReq = {
488
572
  namespaceName?: string
489
573
  nacosName?: string
490
574
  nacosNamespace?: string
491
- nacosConfigDataId?: string
492
- nacosConfigGroup?: string
575
+ dataId?: string
576
+ group?: string
493
577
  }
494
578
 
495
579
  export type GetNacosConfigRes = {
@@ -508,7 +592,7 @@ export type GetNacosConfigRes = {
508
592
  modifyTime?: string
509
593
  schema?: string
510
594
  tenant?: string
511
- type?: string
595
+ type?: NacosConfigFileType
512
596
  use?: string
513
597
  }
514
598
 
@@ -534,8 +618,8 @@ export type ListNacosConfigHistoryReq = {
534
618
  namespaceName?: string
535
619
  nacosName?: string
536
620
  nacosNamespace?: string
537
- nacosConfigDataId?: string
538
- nacosConfigGroup?: string
621
+ dataId?: string
622
+ group?: string
539
623
  page?: number
540
624
  pageSize?: number
541
625
  }
@@ -551,9 +635,9 @@ export type GetNacosConfigHistoryReq = {
551
635
  namespaceName?: string
552
636
  nacosName?: string
553
637
  nacosNamespace?: string
554
- nacosConfigDataId?: string
555
- nacosConfigGroup?: string
556
- nacosConfigHistoryNid?: string
638
+ dataId?: string
639
+ group?: string
640
+ historyNid?: string
557
641
  }
558
642
 
559
643
  export type GetNacosConfigHistoryRes = {
@@ -578,11 +662,20 @@ export type ListNacosConfigListenerReq = {
578
662
  namespaceName?: string
579
663
  nacosName?: string
580
664
  nacosNamespace?: string
581
- nacosConfigDataId?: string
582
- nacosConfigGroup?: string
665
+ dataId?: string
666
+ group?: string
667
+ ip?: string
668
+ }
669
+
670
+ export type ListNacosConfigListenerBrief = {
671
+ dataId?: string
672
+ group?: string
673
+ ip?: string
674
+ md5?: string
583
675
  }
584
676
 
585
677
  export type ListNacosConfigListenerRes = {
678
+ items?: ListNacosConfigListenerBrief[]
586
679
  }
587
680
 
588
681
  export type CreateNacosConfigReq = {
@@ -591,45 +684,52 @@ export type CreateNacosConfigReq = {
591
684
  namespaceName?: string
592
685
  nacosName?: string
593
686
  nacosNamespace?: string
594
- nacosConfigDataId?: string
595
- nacosConfigGroup?: string
596
- nacosConfigContent?: string
597
- nacosConfigDesc?: string
598
- nacosConfigConfigTags?: string
599
- nacosConfigType?: string
600
- nacosConfigAppName?: string
687
+ dataId?: string
688
+ group?: string
689
+ content?: string
690
+ desc?: string
691
+ configTags?: string
692
+ type?: NacosConfigFileType
693
+ appName?: string
694
+ import?: boolean
695
+ policy?: CreateNacosConfigReqPolicy
696
+ file?: Uint8Array
601
697
  }
602
698
 
603
- export type CreateNacosConfigRes = {
604
- success?: boolean
699
+ export type UpdateNacosConfigReq = {
700
+ workspaceId?: string
701
+ clusterName?: string
702
+ namespaceName?: string
703
+ nacosName?: string
704
+ nacosNamespace?: string
705
+ dataId?: string
706
+ group?: string
707
+ content?: string
708
+ appName?: string
709
+ desc?: string
710
+ configTags?: string
711
+ type?: NacosConfigFileType
712
+ id?: string
713
+ md5?: string
714
+ createTime?: string
715
+ modifyTime?: string
716
+ createUser?: string
717
+ createIp?: string
718
+ use?: string
719
+ effect?: string
720
+ schema?: string
605
721
  }
606
722
 
607
- export type UpdateNacosConfigReq = {
723
+ export type RollbackNacosConfigReq = {
608
724
  workspaceId?: string
609
725
  clusterName?: string
610
726
  namespaceName?: string
611
727
  nacosName?: string
612
728
  nacosNamespace?: string
613
- nacosConfigDataId?: string
614
- nacosConfigGroup?: string
615
- nacosConfigContent?: string
616
- nacosConfigAppName?: string
617
- nacosConfigDesc?: string
618
- nacosConfigConfigTags?: string
619
- nacosConfigType?: string
620
- nacosConfigId?: string
621
- nacosConfigMd5?: string
622
- nacosConfigCreateTime?: string
623
- nacosConfigModifyTime?: string
624
- nacosConfigCreateUser?: string
625
- nacosConfigCreateIp?: string
626
- nacosConfigUse?: string
627
- nacosConfigEffect?: string
628
- nacosConfigSchema?: string
629
- }
630
-
631
- export type UpdateNacosConfigRes = {
632
- success?: boolean
729
+ dataId?: string
730
+ group?: string
731
+ content?: string
732
+ appName?: string
633
733
  }
634
734
 
635
735
  export type DeleteNacosConfigReq = {
@@ -638,12 +738,46 @@ export type DeleteNacosConfigReq = {
638
738
  namespaceName?: string
639
739
  nacosName?: string
640
740
  nacosNamespace?: string
641
- nacosConfigDataId?: string
642
- nacosConfigGroup?: string
741
+ dataId?: string
742
+ group?: string
743
+ delType?: string
744
+ ids?: string
745
+ }
746
+
747
+ export type ListNodeReq = {
748
+ workspaceId?: string
749
+ clusterName?: string
750
+ namespaceName?: string
751
+ nacosName?: string
752
+ }
753
+
754
+ export type ListNodeRes = {
755
+ items?: NacosNode[]
756
+ }
757
+
758
+ export type LeaveNodeReq = {
759
+ workspaceId?: string
760
+ clusterName?: string
761
+ namespaceName?: string
762
+ nacosName?: string
643
763
  }
644
764
 
645
- export type DeleteNacosConfigRes = {
646
- success?: boolean
765
+ export type ReportNodeReq = {
766
+ workspaceId?: string
767
+ clusterName?: string
768
+ namespaceName?: string
769
+ nacosName?: string
770
+ node?: NacosNode
771
+ }
772
+
773
+ export type NacosNode = {
774
+ address?: string
775
+ ip?: string
776
+ port?: number
777
+ state?: NacosNodeStatue
778
+ metadata?: string
779
+ abilities?: string
780
+ failAccessCnt?: number
647
781
  }
648
782
 
649
783
  export type CheckNacosConfigReq = {
@@ -652,8 +786,8 @@ export type CheckNacosConfigReq = {
652
786
  namespaceName?: string
653
787
  nacosName?: string
654
788
  nacosNamespace?: string
655
- nacosConfigDataId?: string
656
- nacosConfigGroup?: string
789
+ dataId?: string
790
+ group?: string
657
791
  }
658
792
 
659
793
  export type CheckNacosConfigRes = {
@@ -672,6 +806,6 @@ export type CheckNacosConfigRes = {
672
806
  modifyTime?: string
673
807
  schema?: string
674
808
  tenant?: string
675
- type?: string
809
+ type?: NacosConfigFileType
676
810
  use?: string
677
811
  }