@daocloud-proto/skoala 0.13.0-4 → 0.14.0-10
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.
- package/api/general/v1alpha1/skoala.pb.ts +5 -0
- package/api/hosted/v1alpha1/api.pb.ts +6 -0
- package/api/hosted/v1alpha1/nacos.pb.ts +18 -0
- package/api/hosted/v1alpha1/sentinel.pb.ts +78 -0
- package/api/hosted/v1alpha1/virtualhost.pb.ts +14 -6
- package/api/skoala/v1alpha1/skoala.pb.ts +15 -0
- package/package.json +1 -1
|
@@ -105,10 +105,15 @@ export type RegistryServiceInfo = {
|
|
|
105
105
|
meshId?: string
|
|
106
106
|
meshName?: string
|
|
107
107
|
meshNamespaceName?: string
|
|
108
|
+
meshType?: string
|
|
109
|
+
meshStatus?: string
|
|
110
|
+
meshDeployType?: string
|
|
108
111
|
nacosNamespaceId?: string
|
|
109
112
|
nacosGroupName?: string
|
|
110
113
|
kubernetesClusterName?: string
|
|
111
114
|
kubernetesNamespaceName?: string
|
|
115
|
+
kubernetesPorts?: string[]
|
|
116
|
+
kubernetesLabels?: string[]
|
|
112
117
|
registryType?: RegistryServiceInfoRegistryType
|
|
113
118
|
}
|
|
114
119
|
|
|
@@ -101,6 +101,12 @@ export type AdvancedAPIConfig = {
|
|
|
101
101
|
requestHeadersPolicy?: HeaderPolicy
|
|
102
102
|
responseHeadersPolicy?: HeaderPolicy
|
|
103
103
|
jwtPolicy?: JWTPolicy
|
|
104
|
+
authPolicy?: AuthPolicy
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type AuthPolicy = {
|
|
108
|
+
context?: {[key: string]: string}
|
|
109
|
+
disabled?: boolean
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
export type JWTPolicy = {
|
|
@@ -845,4 +845,22 @@ export type GetNacosGrafanaReq = {
|
|
|
845
845
|
export type GetNacosGrafanaRes = {
|
|
846
846
|
url?: string
|
|
847
847
|
zhUrl?: string
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
export type NacosDashBoardReq = {
|
|
851
|
+
workspaceId?: string
|
|
852
|
+
isHosted?: boolean
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export type NacosDashBoardRessvcCount = {
|
|
856
|
+
count?: number
|
|
857
|
+
name?: string
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
export type NacosDashBoardRes = {
|
|
861
|
+
total?: number
|
|
862
|
+
health?: number
|
|
863
|
+
serviceCount?: number
|
|
864
|
+
configCount?: number
|
|
865
|
+
serviceRanking?: NacosDashBoardRessvcCount[]
|
|
848
866
|
}
|
|
@@ -23,6 +23,17 @@ export enum ControlBehavior {
|
|
|
23
23
|
WAITING_IN_QUEUE = "WAITING_IN_QUEUE",
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
export enum MachineType {
|
|
27
|
+
EMBEDDED = "EMBEDDED",
|
|
28
|
+
ALONE = "ALONE",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum ListClusterFlowClientStatus {
|
|
32
|
+
OFF = "OFF",
|
|
33
|
+
PENDING = "PENDING",
|
|
34
|
+
CONNECTED = "CONNECTED",
|
|
35
|
+
}
|
|
36
|
+
|
|
26
37
|
export enum DegradeRuleGrade {
|
|
27
38
|
SLOW_REQUEST_RATIO = "SLOW_REQUEST_RATIO",
|
|
28
39
|
ERROR_RATIO = "ERROR_RATIO",
|
|
@@ -103,6 +114,73 @@ export type ListResourceRes = {
|
|
|
103
114
|
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
104
115
|
}
|
|
105
116
|
|
|
117
|
+
export type ListClusterFlowServer = {
|
|
118
|
+
serverId?: string
|
|
119
|
+
port?: number
|
|
120
|
+
machineType?: MachineType
|
|
121
|
+
clientCount?: number
|
|
122
|
+
currentQps?: number
|
|
123
|
+
maxQps?: number
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export type ListClusterFlowClient = {
|
|
127
|
+
clientId?: string
|
|
128
|
+
connectStatus?: ListClusterFlowClientStatus
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type ListClusterFlow = {
|
|
132
|
+
server?: ListClusterFlowServer
|
|
133
|
+
client?: ListClusterFlowClient
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type ListClusterFlowReq = {
|
|
137
|
+
workspaceId?: string
|
|
138
|
+
clusterName?: string
|
|
139
|
+
namespaceName?: string
|
|
140
|
+
sentinelName?: string
|
|
141
|
+
appName?: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export type DeleteClusterFlowReq = {
|
|
145
|
+
workspaceId?: string
|
|
146
|
+
clusterName?: string
|
|
147
|
+
namespaceName?: string
|
|
148
|
+
sentinelName?: string
|
|
149
|
+
appName?: string
|
|
150
|
+
serverId?: string
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export type ListClusterFlowRes = {
|
|
154
|
+
items?: ListClusterFlow[]
|
|
155
|
+
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type ListTokenServerReq = {
|
|
159
|
+
workspaceId?: string
|
|
160
|
+
clusterName?: string
|
|
161
|
+
namespaceName?: string
|
|
162
|
+
sentinelName?: string
|
|
163
|
+
appName?: string
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type ListTokenServerRes = {
|
|
167
|
+
items?: string[]
|
|
168
|
+
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type TokenServerReq = {
|
|
172
|
+
workspaceId?: string
|
|
173
|
+
clusterName?: string
|
|
174
|
+
namespaceName?: string
|
|
175
|
+
sentinelName?: string
|
|
176
|
+
appName?: string
|
|
177
|
+
machineType?: MachineType
|
|
178
|
+
machineId?: string
|
|
179
|
+
port?: number
|
|
180
|
+
maxQps?: number
|
|
181
|
+
clients?: string[]
|
|
182
|
+
}
|
|
183
|
+
|
|
106
184
|
export type FlowRule = {
|
|
107
185
|
id?: string
|
|
108
186
|
app?: string
|
|
@@ -45,6 +45,18 @@ export type VirtualhostConfig = {
|
|
|
45
45
|
corsPolicy?: CorsPolicy
|
|
46
46
|
tlsPolicy?: VirtualhostTLSPolicy
|
|
47
47
|
jwtProviders?: JwtProvider[]
|
|
48
|
+
authPolicy?: AuthorizationPolicy
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type AuthorizationPolicy = {
|
|
52
|
+
disabled?: boolean
|
|
53
|
+
context?: {[key: string]: string}
|
|
54
|
+
authServer?: string
|
|
55
|
+
failOpen?: boolean
|
|
56
|
+
responseTimeout?: string
|
|
57
|
+
maxRequestBytes?: number
|
|
58
|
+
allowPartialMessage?: boolean
|
|
59
|
+
packAsBytes?: boolean
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
export type JwtProvider = {
|
|
@@ -101,6 +113,7 @@ export type VirtualhostInfo = {
|
|
|
101
113
|
secretNamespaceName?: string
|
|
102
114
|
healthCheckUrl?: string
|
|
103
115
|
enableJWT?: boolean
|
|
116
|
+
enableAuth?: boolean
|
|
104
117
|
namespaceName?: string
|
|
105
118
|
apiCount?: number
|
|
106
119
|
updatedAt?: string
|
|
@@ -130,6 +143,7 @@ export type GetVirtualhostRes = {
|
|
|
130
143
|
corsPolicy?: CorsPolicy
|
|
131
144
|
tlsPolicy?: VirtualhostTLSPolicy
|
|
132
145
|
jwtProviders?: JwtProvider[]
|
|
146
|
+
authorizationPolicy?: AuthorizationPolicy
|
|
133
147
|
}
|
|
134
148
|
|
|
135
149
|
export type UpdateVirtualhostReq = {
|
|
@@ -208,10 +222,4 @@ export type LocalRateLimitPolicy = {
|
|
|
208
222
|
export type TimeUnit = {
|
|
209
223
|
time?: number
|
|
210
224
|
unit?: TimeUnitUnit
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export type Authorization = {
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export type AuthPolicy = {
|
|
217
225
|
}
|
|
@@ -250,6 +250,9 @@ export class Nacos {
|
|
|
250
250
|
static CheckConfig(req: SkoalaApiHostedV1alpha1Nacos.CheckNacosConfigReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.CheckNacosConfigRes> {
|
|
251
251
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.CheckNacosConfigReq, SkoalaApiHostedV1alpha1Nacos.CheckNacosConfigRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/namespaces/${req["nacosNamespace"]}/configs/${req["dataId"]}/check?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName", "nacosNamespace", "dataId"])}`, {...initReq, method: "GET"})
|
|
252
252
|
}
|
|
253
|
+
static GetNacosDashBoard(req: SkoalaApiHostedV1alpha1Nacos.NacosDashBoardReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.NacosDashBoardRes> {
|
|
254
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.NacosDashBoardReq, SkoalaApiHostedV1alpha1Nacos.NacosDashBoardRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/nacos_dashboard?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
255
|
+
}
|
|
253
256
|
}
|
|
254
257
|
export class Sentinel {
|
|
255
258
|
static GetInsGovern(req: SkoalaApiHostedV1alpha1Sentinel.GetInsGovernReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.GetInsGovernRes> {
|
|
@@ -261,6 +264,18 @@ export class Sentinel {
|
|
|
261
264
|
static ListResource(req: SkoalaApiHostedV1alpha1Sentinel.ListResourceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.ListResourceRes> {
|
|
262
265
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.ListResourceReq, SkoalaApiHostedV1alpha1Sentinel.ListResourceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/resources?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName", "appName"])}`, {...initReq, method: "GET"})
|
|
263
266
|
}
|
|
267
|
+
static ListClusterFlow(req: SkoalaApiHostedV1alpha1Sentinel.ListClusterFlowReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.ListClusterFlowRes> {
|
|
268
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.ListClusterFlowReq, SkoalaApiHostedV1alpha1Sentinel.ListClusterFlowRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/cluster-flows?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName", "appName"])}`, {...initReq, method: "GET"})
|
|
269
|
+
}
|
|
270
|
+
static ListTokenServer(req: SkoalaApiHostedV1alpha1Sentinel.ListTokenServerReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.ListTokenServerRes> {
|
|
271
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.ListTokenServerReq, SkoalaApiHostedV1alpha1Sentinel.ListTokenServerRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/token-servers?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName", "appName"])}`, {...initReq, method: "GET"})
|
|
272
|
+
}
|
|
273
|
+
static CreateOrUpdateTokenServer(req: SkoalaApiHostedV1alpha1Sentinel.TokenServerReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
274
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.TokenServerReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/token-servers`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
275
|
+
}
|
|
276
|
+
static DeleteClusterFlow(req: SkoalaApiHostedV1alpha1Sentinel.DeleteClusterFlowReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
277
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.DeleteClusterFlowReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/cluster-flows/${req["serverId"]}`, {...initReq, method: "DELETE"})
|
|
278
|
+
}
|
|
264
279
|
static CreateFlowRule(req: SkoalaApiHostedV1alpha1Sentinel.CreateFlowRuleReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
265
280
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.CreateFlowRuleReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/flow-rules`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
266
281
|
}
|