@daocloud-proto/skoala 0.18.0-69 → 0.18.0-71
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,198 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.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 PluginType {
|
|
19
|
+
JWT = "JWT",
|
|
20
|
+
AUTH = "AUTH",
|
|
21
|
+
RATELIMIT = "RATELIMIT",
|
|
22
|
+
WASM = "WASM",
|
|
23
|
+
UNDEFINE = "UNDEFINE",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export enum PluginUsageResourceType {
|
|
27
|
+
contour = "contour",
|
|
28
|
+
istioGateway = "istioGateway",
|
|
29
|
+
istioSidecar = "istioSidecar",
|
|
30
|
+
unknow = "unknow",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export enum PluginUrlLoadBalance {
|
|
34
|
+
Random = "Random",
|
|
35
|
+
RoundRobin = "RoundRobin",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
type BaseCreateSkoalaPluginReq = {
|
|
40
|
+
workspaceId?: string
|
|
41
|
+
disabled?: boolean
|
|
42
|
+
pluginName?: string
|
|
43
|
+
describe?: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type CreateSkoalaPluginReq = BaseCreateSkoalaPluginReq
|
|
47
|
+
& OneOf<{ jwt: JWTPluginConfig; auth: AuthPluginConfig; rateLimit: RateLimitPluginConfig; wasm: WasmPluginConfig }>
|
|
48
|
+
|
|
49
|
+
export type UpdateUsage = {
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
type BaseUpdateSkoalaPluginReq = {
|
|
54
|
+
workspaceId?: string
|
|
55
|
+
disabled?: boolean
|
|
56
|
+
pluginName?: string
|
|
57
|
+
describe?: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type UpdateSkoalaPluginReq = BaseUpdateSkoalaPluginReq
|
|
61
|
+
& OneOf<{ jwt: JWTPluginConfig; auth: AuthPluginConfig; rateLimit: RateLimitPluginConfig; wasm: WasmPluginConfig }>
|
|
62
|
+
|
|
63
|
+
export type DeleteSkoalaPluginReq = {
|
|
64
|
+
workspaceId?: string
|
|
65
|
+
pluginName?: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type GetSkoalaPluginReq = {
|
|
69
|
+
workspaceId?: string
|
|
70
|
+
pluginName?: string
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
type BaseGetSkoalaPluginRes = {
|
|
75
|
+
pluginName?: string
|
|
76
|
+
pluginType?: PluginType
|
|
77
|
+
createdAt?: string
|
|
78
|
+
updatedAt?: string
|
|
79
|
+
disabled?: boolean
|
|
80
|
+
describe?: string
|
|
81
|
+
usage?: PluginUsage[]
|
|
82
|
+
inCluster?: boolean
|
|
83
|
+
address?: string
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type GetSkoalaPluginRes = BaseGetSkoalaPluginRes
|
|
87
|
+
& OneOf<{ jwt: JWTPluginConfig; auth: AuthPluginConfig; rateLimit: RateLimitPluginConfig; wasm: WasmPluginConfig }>
|
|
88
|
+
|
|
89
|
+
export type PluginUsage = {
|
|
90
|
+
resourceType?: PluginUsageResourceType
|
|
91
|
+
clusterName?: string
|
|
92
|
+
meshInstance?: string
|
|
93
|
+
namespaceName?: string
|
|
94
|
+
name?: string
|
|
95
|
+
version?: number
|
|
96
|
+
needUpdate?: boolean
|
|
97
|
+
gvr?: SkoalaApiGeneralV1alpha1Common.GroupVersionResource
|
|
98
|
+
usedTime?: string
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type ListSkoalaPluginReq = {
|
|
102
|
+
workspaceId?: string
|
|
103
|
+
pluginName?: string
|
|
104
|
+
pluginType?: PluginType
|
|
105
|
+
disabled?: boolean
|
|
106
|
+
page?: number
|
|
107
|
+
pageSize?: number
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type ListSkoalaPluginRes = {
|
|
111
|
+
items?: SkoalaPluginInfo[]
|
|
112
|
+
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type SkoalaPluginInfo = {
|
|
116
|
+
pluginName?: string
|
|
117
|
+
pluginType?: PluginType
|
|
118
|
+
createdAt?: string
|
|
119
|
+
updatedAt?: string
|
|
120
|
+
inCluster?: boolean
|
|
121
|
+
address?: string
|
|
122
|
+
version?: number
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type WasmPluginConfig = {
|
|
126
|
+
imageUrl?: string
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type RateLimitPluginConfig = {
|
|
130
|
+
pluginAddress?: PluginAddress
|
|
131
|
+
timeout?: IntervalTimeUnit
|
|
132
|
+
fileOpen?: boolean
|
|
133
|
+
enableXRateLimitHeaders?: boolean
|
|
134
|
+
validation?: TLSValidation
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type AuthPluginConfigBufferSettings = {
|
|
138
|
+
maxRequestBytes?: number
|
|
139
|
+
allowPartialMessage?: boolean
|
|
140
|
+
packAsBytes?: boolean
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type AuthPluginConfig = {
|
|
144
|
+
pluginAddress?: PluginAddress
|
|
145
|
+
timeout?: IntervalTimeUnit
|
|
146
|
+
fileOpen?: boolean
|
|
147
|
+
requestBodyBufferSettings?: AuthPluginConfigBufferSettings
|
|
148
|
+
validation?: TLSValidation
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type JWTPluginConfigJWTValidExtConfig = {
|
|
152
|
+
issuer?: string
|
|
153
|
+
audiences?: string[]
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type JWTPluginConfig = {
|
|
157
|
+
pluginAddress?: PluginAddress
|
|
158
|
+
timeout?: IntervalTimeUnit
|
|
159
|
+
cacheTime?: IntervalTimeUnit
|
|
160
|
+
forwardJwt?: boolean
|
|
161
|
+
validation?: TLSValidation
|
|
162
|
+
jwtValidConfig?: JWTPluginConfigJWTValidExtConfig
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type TLSValidationCaCertificate = {
|
|
166
|
+
namespace?: string
|
|
167
|
+
name?: string
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type TLSValidation = {
|
|
171
|
+
subjectName?: string
|
|
172
|
+
caCertificate?: TLSValidationCaCertificate
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
type BasePluginAddress = {
|
|
177
|
+
inCluster?: boolean
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type PluginAddress = BasePluginAddress
|
|
181
|
+
& OneOf<{ clusterNamespaceService: ClusterNamespaceService; address: PluginUrl }>
|
|
182
|
+
|
|
183
|
+
export type PluginUrl = {
|
|
184
|
+
url?: string[]
|
|
185
|
+
loadBalance?: PluginUrlLoadBalance
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type ClusterNamespaceService = {
|
|
189
|
+
clusterName?: string
|
|
190
|
+
namespaceName?: string
|
|
191
|
+
serviceName?: string
|
|
192
|
+
servicePort?: number
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type IntervalTimeUnit = {
|
|
196
|
+
interval?: number
|
|
197
|
+
unit?: SkoalaApiGeneralV1alpha1Common.TimeUnit
|
|
198
|
+
}
|
|
@@ -22,6 +22,7 @@ import * as SkoalaApiHostedV1alpha1Mesh from "../../hosted/v1alpha1/mesh.pb"
|
|
|
22
22
|
import * as SkoalaApiHostedV1alpha1Nacos from "../../hosted/v1alpha1/nacos.pb"
|
|
23
23
|
import * as SkoalaApiHostedV1alpha1Plugins from "../../hosted/v1alpha1/plugins.pb"
|
|
24
24
|
import * as SkoalaApiHostedV1alpha1Sentinel from "../../hosted/v1alpha1/sentinel.pb"
|
|
25
|
+
import * as SkoalaApiHostedV1alpha1Skoala_plugins from "../../hosted/v1alpha1/skoala_plugins.pb"
|
|
25
26
|
import * as SkoalaApiHostedV1alpha1Virtualhost from "../../hosted/v1alpha1/virtualhost.pb"
|
|
26
27
|
import * as SkoalaApiIntegratedV1alpha1Instance from "../../integrated/v1alpha1/instance.pb"
|
|
27
28
|
import * as SkoalaApiIntegratedV1alpha1Registry from "../../integrated/v1alpha1/registry.pb"
|
|
@@ -648,4 +649,21 @@ export class GatewayOverview {
|
|
|
648
649
|
static GatewayOverviewInfo(req: SkoalaApiHostedV1alpha1Gateway_overview.GatewayOverviewInfoReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway_overview.GatewayOverviewInfoRes> {
|
|
649
650
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway_overview.GatewayOverviewInfoReq, SkoalaApiHostedV1alpha1Gateway_overview.GatewayOverviewInfoRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/stats/gateway/info?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
650
651
|
}
|
|
652
|
+
}
|
|
653
|
+
export class SkoalaPlugin {
|
|
654
|
+
static CreatePlugin(req: SkoalaApiHostedV1alpha1Skoala_plugins.CreateSkoalaPluginReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
655
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.CreateSkoalaPluginReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
656
|
+
}
|
|
657
|
+
static UpdatePlugin(req: SkoalaApiHostedV1alpha1Skoala_plugins.UpdateSkoalaPluginReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
658
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.UpdateSkoalaPluginReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins/${req["pluginName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
659
|
+
}
|
|
660
|
+
static ListPlugin(req: SkoalaApiHostedV1alpha1Skoala_plugins.ListSkoalaPluginReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Skoala_plugins.ListSkoalaPluginRes> {
|
|
661
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.ListSkoalaPluginReq, SkoalaApiHostedV1alpha1Skoala_plugins.ListSkoalaPluginRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
662
|
+
}
|
|
663
|
+
static GetPlugin(req: SkoalaApiHostedV1alpha1Skoala_plugins.GetSkoalaPluginReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Skoala_plugins.GetSkoalaPluginRes> {
|
|
664
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.GetSkoalaPluginReq, SkoalaApiHostedV1alpha1Skoala_plugins.GetSkoalaPluginRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins/${req["pluginName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "pluginName"])}`, {...initReq, method: "GET"})
|
|
665
|
+
}
|
|
666
|
+
static DeletePlugin(req: SkoalaApiHostedV1alpha1Skoala_plugins.DeleteSkoalaPluginReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
667
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.DeleteSkoalaPluginReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins/${req["pluginName"]}`, {...initReq, method: "DELETE"})
|
|
668
|
+
}
|
|
651
669
|
}
|