@daocloud-proto/skoala 0.2.0-60 → 0.2.0-66
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.
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export enum Status {
|
|
8
|
+
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
|
|
9
|
+
RUNNING = "RUNNING",
|
|
10
|
+
STARTING = "STARTING",
|
|
11
|
+
DESTROYING = "DESTROYING",
|
|
12
|
+
EXCEPTION = "EXCEPTION",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type Cluster = {
|
|
16
|
+
id?: string
|
|
17
|
+
name?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type ListClusterReq = {
|
|
21
|
+
workspaceId?: number
|
|
22
|
+
page?: number
|
|
23
|
+
size?: number
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ListClusterRes = {
|
|
27
|
+
clusters?: Cluster[]
|
|
28
|
+
page?: number
|
|
29
|
+
size?: number
|
|
30
|
+
total?: number
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type ListNamespaceReq = {
|
|
34
|
+
workspaceId?: number
|
|
35
|
+
clusterName?: string
|
|
36
|
+
page?: number
|
|
37
|
+
size?: number
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type ListNamespaceRes = {
|
|
41
|
+
namespaceNames?: string[]
|
|
42
|
+
page?: number
|
|
43
|
+
size?: number
|
|
44
|
+
total?: number
|
|
45
|
+
}
|
|
@@ -3,43 +3,177 @@
|
|
|
3
3
|
/*
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
|
|
7
|
+
import * as SkoalaApiGeneralV1alpha1Skoala from "../../general/v1alpha1/skoala.pb"
|
|
8
|
+
|
|
9
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
10
|
+
type OneOf<T> =
|
|
11
|
+
| { [k in keyof T]?: undefined }
|
|
12
|
+
| (
|
|
13
|
+
keyof T extends infer K ?
|
|
14
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
15
|
+
: never)
|
|
16
|
+
: never);
|
|
17
|
+
|
|
18
|
+
export enum LogLogLevel {
|
|
19
|
+
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
|
|
20
|
+
TRACE = "TRACE",
|
|
21
|
+
DEBUG = "DEBUG",
|
|
22
|
+
INFO = "INFO",
|
|
23
|
+
WARNING = "WARNING",
|
|
24
|
+
ERROR = "ERROR",
|
|
25
|
+
CRITICAL = "CRITICAL",
|
|
26
|
+
OFF = "OFF",
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type Node = {
|
|
30
|
+
total?: number
|
|
31
|
+
online?: number
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type Gateway = {
|
|
35
|
+
workspaceId?: number
|
|
36
|
+
clusterName?: string
|
|
37
|
+
namespaceName?: string
|
|
38
|
+
name?: string
|
|
39
|
+
createdAt?: string
|
|
40
|
+
updatedAt?: string
|
|
41
|
+
status?: SkoalaApiGeneralV1alpha1Skoala.Status
|
|
42
|
+
endpoints?: string[]
|
|
43
|
+
master?: Node
|
|
44
|
+
worker?: Node
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type ListAllGatewayReq = {
|
|
48
|
+
workspaceId?: number
|
|
49
|
+
page?: number
|
|
50
|
+
size?: number
|
|
51
|
+
filter?: string
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type ListClusterGatewayReq = {
|
|
55
|
+
workspaceId?: number
|
|
56
|
+
clusterName?: string
|
|
57
|
+
page?: number
|
|
58
|
+
size?: number
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type ListNamespaceGatewayReq = {
|
|
62
|
+
workspaceId?: number
|
|
63
|
+
clusterName?: string
|
|
64
|
+
namespaceName?: string
|
|
8
65
|
page?: number
|
|
66
|
+
size?: number
|
|
9
67
|
}
|
|
10
68
|
|
|
11
69
|
export type ListGatewayRes = {
|
|
70
|
+
gateways?: Gateway[]
|
|
71
|
+
page?: number
|
|
72
|
+
size?: number
|
|
73
|
+
total?: number
|
|
12
74
|
}
|
|
13
75
|
|
|
14
76
|
export type GetGatewayReq = {
|
|
15
|
-
workspaceId?:
|
|
77
|
+
workspaceId?: number
|
|
78
|
+
clusterName?: string
|
|
79
|
+
namespaceName?: string
|
|
16
80
|
gatewayName?: string
|
|
17
81
|
}
|
|
18
82
|
|
|
19
83
|
export type GetGatewayRes = {
|
|
84
|
+
gateways?: Gateway
|
|
20
85
|
}
|
|
21
86
|
|
|
22
|
-
export type
|
|
23
|
-
workspaceId?:
|
|
24
|
-
|
|
25
|
-
|
|
87
|
+
export type CreateGatewayReq = {
|
|
88
|
+
workspaceId?: number
|
|
89
|
+
name?: string
|
|
90
|
+
clusterName?: string
|
|
91
|
+
namespaceName?: string
|
|
92
|
+
config?: GatewayConfig
|
|
26
93
|
}
|
|
27
94
|
|
|
28
|
-
export type
|
|
95
|
+
export type CreateGatewayRes = {
|
|
96
|
+
gateway?: Gateway
|
|
29
97
|
}
|
|
30
98
|
|
|
31
|
-
export type
|
|
32
|
-
workspaceId?:
|
|
99
|
+
export type UpdateGatewayReq = {
|
|
100
|
+
workspaceId?: number
|
|
33
101
|
gatewayName?: string
|
|
102
|
+
clusterName?: string
|
|
103
|
+
namespaceName?: string
|
|
104
|
+
before?: GatewayConfig
|
|
105
|
+
after?: GatewayConfig
|
|
34
106
|
}
|
|
35
107
|
|
|
36
|
-
export type
|
|
108
|
+
export type UpdateGatewayRes = {
|
|
109
|
+
gateway?: Gateway
|
|
37
110
|
}
|
|
38
111
|
|
|
39
112
|
export type DeleteGatewayReq = {
|
|
40
|
-
workspaceId?:
|
|
113
|
+
workspaceId?: number
|
|
114
|
+
clusterName?: string
|
|
115
|
+
namespaceName?: string
|
|
41
116
|
gatewayName?: string
|
|
42
117
|
}
|
|
43
118
|
|
|
44
119
|
export type DeleteGatewayRes = {
|
|
120
|
+
gateway?: Gateway
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type GatewayConfig = {
|
|
124
|
+
normal?: NormalConfig
|
|
125
|
+
advanced?: AdvancedConfig
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
type BaseNormalConfig = {
|
|
130
|
+
masterCount?: number
|
|
131
|
+
workerCount?: number
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type NormalConfig = BaseNormalConfig
|
|
135
|
+
& OneOf<{ clusterIp: ClusterIP; nodePort: NodePort; loadBalancer: LoadBalancer; externalName: ExternalName }>
|
|
136
|
+
|
|
137
|
+
export type NodePort = {
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export type ClusterIP = {
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type LoadBalancer = {
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export type ExternalName = {
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
type BaseAdvancedConfig = {
|
|
151
|
+
log?: Log
|
|
152
|
+
resource?: Resource
|
|
153
|
+
enableGlobalRateLimit?: boolean
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type AdvancedConfig = BaseAdvancedConfig
|
|
157
|
+
& OneOf<{ rollingUpdate: RollingUpdate; recreate: string }>
|
|
158
|
+
|
|
159
|
+
export type Log = {
|
|
160
|
+
workerLogLevel?: LogLogLevel
|
|
161
|
+
podLogLevel?: number
|
|
162
|
+
enableDebugLog?: boolean
|
|
163
|
+
enableLogToInsight?: boolean
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type Quota = {
|
|
167
|
+
cpuRequests?: number
|
|
168
|
+
cpuLimits?: number
|
|
169
|
+
memoryRequests?: number
|
|
170
|
+
memoryLimits?: number
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export type Resource = {
|
|
174
|
+
master?: Quota
|
|
175
|
+
worker?: Quota
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export type RollingUpdate = {
|
|
45
179
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as fm from "../../../fetch.pb"
|
|
8
8
|
import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
9
|
+
import * as SkoalaApiGeneralV1alpha1Skoala from "../../general/v1alpha1/skoala.pb"
|
|
9
10
|
import * as SkoalaApiGeneralV1alpha1Version from "../../general/v1alpha1/version.pb"
|
|
10
11
|
import * as SkoalaApiHostedV1alpha1Gateway from "../../hosted/v1alpha1/gateway.pb"
|
|
11
12
|
import * as SkoalaApiHostedV1alpha1Nacos from "../../hosted/v1alpha1/nacos.pb"
|
|
@@ -17,15 +18,20 @@ export class Hive {
|
|
|
17
18
|
static GetVersion(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Version.GetVersionRes> {
|
|
18
19
|
return fm.fetchReq<GoogleProtobufEmpty.Empty, SkoalaApiGeneralV1alpha1Version.GetVersionRes>(`/apis/hive.skoala.io/v1alpha1/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
19
20
|
}
|
|
20
|
-
static List(req: SkoalaApiHostedV1alpha1Gateway.ListGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.ListGatewayRes> {
|
|
21
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.ListGatewayReq, SkoalaApiHostedV1alpha1Gateway.ListGatewayRes>(`/apis/hive.skoala.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
22
|
-
}
|
|
23
21
|
}
|
|
24
22
|
export class Sesame {
|
|
25
23
|
static GetVersion(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Version.GetVersionRes> {
|
|
26
24
|
return fm.fetchReq<GoogleProtobufEmpty.Empty, SkoalaApiGeneralV1alpha1Version.GetVersionRes>(`/apis/sesame.skoala.io/v1alpha1/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
27
25
|
}
|
|
28
26
|
}
|
|
27
|
+
export class Skoala {
|
|
28
|
+
static ListCluster(req: SkoalaApiGeneralV1alpha1Skoala.ListClusterReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListClusterRes> {
|
|
29
|
+
return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.ListClusterReq, SkoalaApiGeneralV1alpha1Skoala.ListClusterRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
30
|
+
}
|
|
31
|
+
static ListClusterNamespace(req: SkoalaApiGeneralV1alpha1Skoala.ListNamespaceReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListNamespaceRes> {
|
|
32
|
+
return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.ListNamespaceReq, SkoalaApiGeneralV1alpha1Skoala.ListNamespaceRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName"])}`, {...initReq, method: "GET"})
|
|
33
|
+
}
|
|
34
|
+
}
|
|
29
35
|
export class Registry {
|
|
30
36
|
static List(req: SkoalaApiIntegratedV1alpha1Registry.ListRegistryReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Registry.ListRegistryRes> {
|
|
31
37
|
return fm.fetchReq<SkoalaApiIntegratedV1alpha1Registry.ListRegistryReq, SkoalaApiIntegratedV1alpha1Registry.ListRegistryRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/registries?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
@@ -106,19 +112,25 @@ export class Sentinel {
|
|
|
106
112
|
}
|
|
107
113
|
}
|
|
108
114
|
export class Gateway {
|
|
109
|
-
static
|
|
110
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.
|
|
115
|
+
static ListAll(req: SkoalaApiHostedV1alpha1Gateway.ListAllGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.ListGatewayRes> {
|
|
116
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.ListAllGatewayReq, SkoalaApiHostedV1alpha1Gateway.ListGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/gateways?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
117
|
+
}
|
|
118
|
+
static ListClusterGateway(req: SkoalaApiHostedV1alpha1Gateway.ListClusterGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.ListGatewayRes> {
|
|
119
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.ListClusterGatewayReq, SkoalaApiHostedV1alpha1Gateway.ListGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/gateways?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName"])}`, {...initReq, method: "GET"})
|
|
120
|
+
}
|
|
121
|
+
static ListNamespaceGateway(req: SkoalaApiHostedV1alpha1Gateway.ListNamespaceGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.ListGatewayRes> {
|
|
122
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.ListNamespaceGatewayReq, SkoalaApiHostedV1alpha1Gateway.ListGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName"])}`, {...initReq, method: "GET"})
|
|
111
123
|
}
|
|
112
124
|
static Get(req: SkoalaApiHostedV1alpha1Gateway.GetGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GetGatewayRes> {
|
|
113
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GetGatewayReq, SkoalaApiHostedV1alpha1Gateway.GetGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/gateways/${req["gatewayName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
125
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.GetGatewayReq, SkoalaApiHostedV1alpha1Gateway.GetGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "gatewayName"])}`, {...initReq, method: "GET"})
|
|
114
126
|
}
|
|
115
127
|
static Create(req: SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.CreateGatewayRes> {
|
|
116
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq, SkoalaApiHostedV1alpha1Gateway.CreateGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/gateways`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
128
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq, SkoalaApiHostedV1alpha1Gateway.CreateGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
117
129
|
}
|
|
118
130
|
static Update(req: SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.UpdateGatewayRes> {
|
|
119
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq, SkoalaApiHostedV1alpha1Gateway.UpdateGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/gateways/${req["gatewayName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
131
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq, SkoalaApiHostedV1alpha1Gateway.UpdateGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
120
132
|
}
|
|
121
133
|
static Delete(req: SkoalaApiHostedV1alpha1Gateway.DeleteGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.DeleteGatewayRes> {
|
|
122
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.DeleteGatewayReq, SkoalaApiHostedV1alpha1Gateway.DeleteGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/gateways/${req["gatewayName"]}`, {...initReq, method: "DELETE"})
|
|
134
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.DeleteGatewayReq, SkoalaApiHostedV1alpha1Gateway.DeleteGatewayRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}`, {...initReq, method: "DELETE"})
|
|
123
135
|
}
|
|
124
136
|
}
|