@daocloud-proto/skoala 0.16.0 → 0.16.1-8
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.
|
@@ -12,11 +12,6 @@ export enum ListNamespaceReqGatewayStatus {
|
|
|
12
12
|
Unavailable = "Unavailable",
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export enum ListRegistryServiceReqRegistryType {
|
|
16
|
-
hosted = "hosted",
|
|
17
|
-
integrated = "integrated",
|
|
18
|
-
}
|
|
19
|
-
|
|
20
15
|
export enum RegistryServiceInfoRegistryType {
|
|
21
16
|
NACOS = "NACOS",
|
|
22
17
|
EUREKA = "EUREKA",
|
|
@@ -98,7 +93,7 @@ export type ListRegistryServiceReq = {
|
|
|
98
93
|
kubernetesNamespaceName?: string
|
|
99
94
|
registryName?: string
|
|
100
95
|
nacosNamespaceName?: string
|
|
101
|
-
|
|
96
|
+
isHosted?: boolean
|
|
102
97
|
serviceName?: string
|
|
103
98
|
page?: number
|
|
104
99
|
pageSize?: number
|
|
@@ -44,6 +44,12 @@ export enum RedirectResponseCode {
|
|
|
44
44
|
PERMANENT_REDIRECT = "PERMANENT_REDIRECT",
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
export enum CookieSameSitesameSite {
|
|
48
|
+
Strict = "Strict",
|
|
49
|
+
Lax = "Lax",
|
|
50
|
+
None = "None",
|
|
51
|
+
}
|
|
52
|
+
|
|
47
53
|
export enum LoadBalancePolicyStrategy {
|
|
48
54
|
Random = "Random",
|
|
49
55
|
RoundRobin = "RoundRobin",
|
|
@@ -102,6 +108,31 @@ export type AdvancedAPIConfig = {
|
|
|
102
108
|
responseHeadersPolicy?: HeaderPolicy
|
|
103
109
|
jwtPolicy?: JWTPolicy
|
|
104
110
|
authPolicy?: AuthPolicy
|
|
111
|
+
cookieRewritePolicy?: CookieRewritePolicy[]
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type CookieRewritePolicy = {
|
|
115
|
+
name?: string
|
|
116
|
+
cookieDomainRewrite?: CookieDomainRewrite
|
|
117
|
+
cookiePathRewrite?: CookiePathRewrite
|
|
118
|
+
cookieSameSite?: CookieSameSite
|
|
119
|
+
cookieSecure?: CookieSecure
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export type CookiePathRewrite = {
|
|
123
|
+
path?: string
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export type CookieDomainRewrite = {
|
|
127
|
+
domain?: string
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type CookieSecure = {
|
|
131
|
+
secure?: boolean
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type CookieSameSite = {
|
|
135
|
+
sameSite?: CookieSameSitesameSite
|
|
105
136
|
}
|
|
106
137
|
|
|
107
138
|
export type AuthPolicy = {
|
|
@@ -88,7 +88,6 @@ export type GetAppsSentinelGrafanaReq = {
|
|
|
88
88
|
workspaceId?: string
|
|
89
89
|
clusterName?: string
|
|
90
90
|
namespaceName?: string
|
|
91
|
-
sentinelName?: string
|
|
92
91
|
app?: string
|
|
93
92
|
}
|
|
94
93
|
|
|
@@ -130,7 +129,7 @@ export type ListClusterFlowClient = {
|
|
|
130
129
|
|
|
131
130
|
export type ListClusterFlow = {
|
|
132
131
|
server?: ListClusterFlowServer
|
|
133
|
-
|
|
132
|
+
clients?: ListClusterFlowClient[]
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
export type ListClusterFlowReq = {
|
|
@@ -181,6 +180,34 @@ export type TokenServerReq = {
|
|
|
181
180
|
clients?: string[]
|
|
182
181
|
}
|
|
183
182
|
|
|
183
|
+
export type ListAppReq = {
|
|
184
|
+
workspaceId?: string
|
|
185
|
+
clusterName?: string
|
|
186
|
+
namespaceName?: string
|
|
187
|
+
sentinelName?: string
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export type ListAppRes = {
|
|
191
|
+
items?: string[]
|
|
192
|
+
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type GetRulesCountReq = {
|
|
196
|
+
workspaceId?: string
|
|
197
|
+
clusterName?: string
|
|
198
|
+
namespaceName?: string
|
|
199
|
+
sentinelName?: string
|
|
200
|
+
appName?: string
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export type GetRulesCountRes = {
|
|
204
|
+
authorityRuleCount?: number
|
|
205
|
+
flowRuleCount?: number
|
|
206
|
+
paramFlowRuleCount?: number
|
|
207
|
+
systemRuleCount?: number
|
|
208
|
+
degradeRuleCount?: number
|
|
209
|
+
}
|
|
210
|
+
|
|
184
211
|
export type FlowRule = {
|
|
185
212
|
id?: string
|
|
186
213
|
app?: string
|
|
@@ -270,6 +270,12 @@ export class Sentinel {
|
|
|
270
270
|
static CreateOrUpdateTokenServer(req: SkoalaApiHostedV1alpha1Sentinel.TokenServerReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
271
271
|
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)})
|
|
272
272
|
}
|
|
273
|
+
static ListApp(req: SkoalaApiHostedV1alpha1Sentinel.ListAppReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.ListAppRes> {
|
|
274
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.ListAppReq, SkoalaApiHostedV1alpha1Sentinel.ListAppRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName"])}`, {...initReq, method: "GET"})
|
|
275
|
+
}
|
|
276
|
+
static GetRulesCount(req: SkoalaApiHostedV1alpha1Sentinel.GetRulesCountReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.GetRulesCountRes> {
|
|
277
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.GetRulesCountReq, SkoalaApiHostedV1alpha1Sentinel.GetRulesCountRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/counts?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName", "appName"])}`, {...initReq, method: "GET"})
|
|
278
|
+
}
|
|
273
279
|
static DeleteClusterFlow(req: SkoalaApiHostedV1alpha1Sentinel.DeleteClusterFlowReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
274
280
|
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"})
|
|
275
281
|
}
|