@daocloud-proto/skoala 0.3.3-99 → 0.4.1-101

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,46 @@
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 OrderBy {
8
+ desc = "desc",
9
+ asc = "asc",
10
+ }
11
+
12
+ export enum SortBy {
13
+ SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
14
+ field_name = "field_name",
15
+ state = "state",
16
+ workspace = "workspace",
17
+ cluster = "cluster",
18
+ namespace = "namespace",
19
+ created_at = "created_at",
20
+ }
21
+
22
+ export enum Status {
23
+ STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
24
+ Starting = "Starting",
25
+ Destroying = "Destroying",
26
+ Upgrading = "Upgrading",
27
+ Running = "Running",
28
+ Exception = "Exception",
29
+ }
30
+
31
+ export type Cluster = {
32
+ id?: string
33
+ name?: string
34
+ }
35
+
36
+ export type Workspace = {
37
+ id?: number
38
+ name?: string
39
+ }
40
+
41
+ export type Pagination = {
42
+ total?: number
43
+ page?: number
44
+ pageSize?: number
45
+ pages?: number
46
+ }
@@ -0,0 +1,15 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+ export type ResourceList = {
7
+ cpu?: string
8
+ memory?: string
9
+ storage?: string
10
+ }
11
+
12
+ export type ResourceRequirements = {
13
+ limits?: ResourceList
14
+ requests?: ResourceList
15
+ }
@@ -0,0 +1,22 @@
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 ServiceType {
8
+ SERVICE_TYPE_UNSPECIFIED = "SERVICE_TYPE_UNSPECIFIED",
9
+ ClusterIP = "ClusterIP",
10
+ NodePort = "NodePort",
11
+ LoadBalancer = "LoadBalancer",
12
+ ExternalName = "ExternalName",
13
+ }
14
+
15
+ export type ServicePort = {
16
+ name?: string
17
+ protocol?: string
18
+ appProtocol?: string
19
+ port?: number
20
+ targetPort?: string
21
+ nodePort?: number
22
+ }
@@ -4,29 +4,12 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
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 Workspace = {
21
- id?: string
22
- name?: string
23
- }
7
+ import * as SkoalaApiGeneralV1alpha1Common from "./common.pb"
24
8
 
25
- export type Pagination = {
26
- total?: number
27
- page?: number
28
- pageSize?: number
29
- pages?: number
9
+ export enum ListNamespaceReqGatewayStatus {
10
+ NoFilter = "NoFilter",
11
+ Available = "Available",
12
+ Unavailable = "Unavailable",
30
13
  }
31
14
 
32
15
  export type ListWorkspaceReq = {
@@ -35,33 +18,38 @@ export type ListWorkspaceReq = {
35
18
  }
36
19
 
37
20
  export type ListWorkspaceRes = {
38
- items?: Workspace[]
39
- pagination?: Pagination
21
+ items?: SkoalaApiGeneralV1alpha1Common.Workspace[]
22
+ pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
23
+ }
24
+
25
+ export type GetWorkspaceReq = {
26
+ workspaceId?: string
27
+ }
28
+
29
+ export type GetWorkspaceRes = {
30
+ workspace?: SkoalaApiGeneralV1alpha1Common.Workspace
40
31
  }
41
32
 
42
33
  export type ListClusterReq = {
43
34
  workspaceId?: string
44
35
  page?: number
45
- size?: number
36
+ pageSize?: number
46
37
  }
47
38
 
48
39
  export type ListClusterRes = {
49
- clusters?: Cluster[]
50
- page?: number
51
- size?: number
52
- total?: number
40
+ clusters?: SkoalaApiGeneralV1alpha1Common.Cluster[]
41
+ pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
53
42
  }
54
43
 
55
44
  export type ListNamespaceReq = {
56
45
  workspaceId?: string
57
46
  clusterName?: string
47
+ gatewayStatus?: ListNamespaceReqGatewayStatus
58
48
  page?: number
59
- size?: number
49
+ pageSize?: number
60
50
  }
61
51
 
62
52
  export type ListNamespaceRes = {
63
53
  namespaceNames?: string[]
64
- page?: number
65
- size?: number
66
- total?: number
54
+ pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
67
55
  }
@@ -0,0 +1,251 @@
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
+ import * as SkoalaApiHostedV1alpha1Http from "./http.pb"
9
+
10
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
11
+ type OneOf<T> =
12
+ | { [k in keyof T]?: undefined }
13
+ | (
14
+ keyof T extends infer K ?
15
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
16
+ : never)
17
+ : never);
18
+
19
+ export enum ValueMatchType {
20
+ CONTAIN = "CONTAIN",
21
+ EXACT = "EXACT",
22
+ NOT_CONTAIN = "NOT_CONTAIN",
23
+ NOT_EXACT = "NOT_EXACT",
24
+ PRESENT = "PRESENT",
25
+ NOT_PRESENT = "NOT_PRESENT",
26
+ }
27
+
28
+ export enum RedirectResponseCode {
29
+ MOVED_PERMANENTLY = "MOVED_PERMANENTLY",
30
+ FOUND = "FOUND",
31
+ SEE_OTHER = "SEE_OTHER",
32
+ TEMPORARY_REDIRECT = "TEMPORARY_REDIRECT",
33
+ PERMANENT_REDIRECT = "PERMANENT_REDIRECT",
34
+ }
35
+
36
+ export enum RouteType {
37
+ CLUSTRE_SERVER = "CLUSTRE_SERVER",
38
+ DIRECT = "DIRECT",
39
+ REDIRECT = "REDIRECT",
40
+ EXTERNAL = "EXTERNAL",
41
+ REGISTRY = "REGISTRY",
42
+ UNKNOW = "UNKNOW",
43
+ }
44
+
45
+ export enum APIStatus {
46
+ UP = "UP",
47
+ DOWN = "DOWN",
48
+ }
49
+
50
+ export type CreateAPIReq = {
51
+ workspaceId?: string
52
+ gatewayName?: string
53
+ clusterName?: string
54
+ namespaceName?: string
55
+ apiConfig?: APIConfig
56
+ }
57
+
58
+ export type UpdateAPIReq = {
59
+ apiName?: string
60
+ workspaceId?: string
61
+ gatewayName?: string
62
+ clusterName?: string
63
+ namespaceName?: string
64
+ apiConfig?: APIConfig
65
+ }
66
+
67
+ export type CreateAPIRes = {
68
+ }
69
+
70
+ export type UpdateAPIRes = {
71
+ }
72
+
73
+ export type DeleteAPIRes = {
74
+ }
75
+
76
+ export type GetAPIReq = {
77
+ workspaceId?: string
78
+ clusterName?: string
79
+ gatewayName?: string
80
+ apiName?: string
81
+ namespaceName?: string
82
+ }
83
+
84
+ export type DeleteAPIReq = {
85
+ workspaceId?: string
86
+ clusterName?: string
87
+ gatewayName?: string
88
+ apiName?: string
89
+ namespaceName?: string
90
+ }
91
+
92
+ export type GetAPIRes = {
93
+ apiName?: string
94
+ apiStatus?: APIStatus
95
+ fqdn?: string
96
+ matchRule?: MatchRule
97
+ targetService?: TargetService
98
+ }
99
+
100
+ export type TargetService = {
101
+ serviceList?: ServiceDetail[]
102
+ }
103
+
104
+ export type ServiceDetail = {
105
+ clusterName?: string
106
+ k8SNamespaceName?: string
107
+ serviceName?: string
108
+ registryId?: string
109
+ address?: string
110
+ protocol?: SkoalaApiHostedV1alpha1Http.Protocol
111
+ port?: number
112
+ weight?: string
113
+ nacosNamespaceId?: string
114
+ groupName?: string
115
+ routeType?: RouteType
116
+ path?: string
117
+ statusCode?: number
118
+ }
119
+
120
+
121
+ type BaseAPIConfig = {
122
+ apiName?: string
123
+ virtualhost?: Virtualhost
124
+ matchRule?: MatchRule
125
+ enabled?: boolean
126
+ }
127
+
128
+ export type APIConfig = BaseAPIConfig
129
+ & OneOf<{ route: RouteAction; redirect: RedirectAction; directResponse: DirectResponse }>
130
+
131
+ export type Virtualhost = {
132
+ fqdn?: string
133
+ protocol?: SkoalaApiHostedV1alpha1Http.Protocol
134
+ }
135
+
136
+ export type Certificate = {
137
+ namespace?: string
138
+ }
139
+
140
+
141
+ type BaseMatchRule = {
142
+ httpMethod?: SkoalaApiHostedV1alpha1Http.HttpMethod[]
143
+ headers?: HeaderRule[]
144
+ }
145
+
146
+ export type MatchRule = BaseMatchRule
147
+ & OneOf<{ path: string; prefix: string }>
148
+
149
+
150
+ type BaseHeaderRule = {
151
+ name?: string
152
+ }
153
+
154
+ export type HeaderRule = BaseHeaderRule
155
+ & OneOf<{ contains: string; exact: string; notContains: string; notExact: string; present: boolean; notPresent: boolean }>
156
+
157
+ export type RouteAction = {
158
+ routeService?: RouteService[]
159
+ }
160
+
161
+
162
+ type BaseRouteService = {
163
+ protocol?: SkoalaApiHostedV1alpha1Http.Protocol
164
+ port?: number
165
+ weight?: number
166
+ }
167
+
168
+ export type RouteService = BaseRouteService
169
+ & OneOf<{ kubernetesService: KubernetesService; registryService: RegistryService; externalService: ExternalService }>
170
+
171
+ export type KubernetesService = {
172
+ clusterId?: string
173
+ clusterName?: string
174
+ namespaceName?: string
175
+ serviceName?: string
176
+ address?: string
177
+ }
178
+
179
+ export type ExternalService = {
180
+ serviceName?: string
181
+ address?: string
182
+ }
183
+
184
+
185
+ type BaseRegistryService = {
186
+ registryId?: string
187
+ }
188
+
189
+ export type RegistryService = BaseRegistryService
190
+ & OneOf<{ eurekaService: EurekaService; nacosService: NacosService; zookeeperService: ZookeeperService; kubernetesService: KubernetesService }>
191
+
192
+ export type EurekaService = {
193
+ address?: string
194
+ serviceName?: string
195
+ }
196
+
197
+ export type NacosService = {
198
+ address?: string
199
+ serviceName?: string
200
+ namespaceId?: string
201
+ groupName?: string
202
+ }
203
+
204
+ export type ZookeeperService = {
205
+ address?: string
206
+ serviceName?: string
207
+ }
208
+
209
+ export type MeshService = {
210
+ instanceId?: string
211
+ }
212
+
213
+ export type ApplicationService = {
214
+ }
215
+
216
+ export type RedirectAction = {
217
+ hostname?: string
218
+ path?: string
219
+ port?: number
220
+ statusCode?: number
221
+ protocol?: SkoalaApiHostedV1alpha1Http.Protocol
222
+ }
223
+
224
+ export type DirectResponse = {
225
+ statusCode?: number
226
+ body?: string
227
+ }
228
+
229
+ export type APIListReq = {
230
+ workspaceId?: string
231
+ clusterName?: string
232
+ gatewayName?: string
233
+ namespaceName?: string
234
+ page?: number
235
+ pageSize?: number
236
+ }
237
+
238
+ export type APIListRes = {
239
+ api?: APIInfo[]
240
+ pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
241
+ }
242
+
243
+ export type APIInfo = {
244
+ apiName?: string
245
+ fqdn?: string
246
+ method?: SkoalaApiHostedV1alpha1Http.HttpMethod[]
247
+ requestPath?: string
248
+ routeType?: RouteType
249
+ apiStatus?: APIStatus
250
+ updatedAt?: string
251
+ }