@daocloud-proto/skoala 0.2.0-87 → 0.2.0-93
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.
|
@@ -23,8 +23,15 @@ export type Workspace = {
|
|
|
23
23
|
parentWorkspaceId?: string
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
export type ListWorkspaceReq = {
|
|
27
|
+
page?: number
|
|
28
|
+
size?: number
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
export type ListWorkspaceRes = {
|
|
27
32
|
workspaces?: Workspace[]
|
|
33
|
+
page?: number
|
|
34
|
+
size?: number
|
|
28
35
|
total?: number
|
|
29
36
|
}
|
|
30
37
|
|
|
@@ -42,6 +42,7 @@ export type Gateway = {
|
|
|
42
42
|
endpoints?: string[]
|
|
43
43
|
master?: Node
|
|
44
44
|
worker?: Node
|
|
45
|
+
config?: GatewayConfig
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export type ListAllGatewayReq = {
|
|
@@ -89,6 +90,7 @@ export type CreateGatewayReq = {
|
|
|
89
90
|
name?: string
|
|
90
91
|
clusterName?: string
|
|
91
92
|
namespaceName?: string
|
|
93
|
+
createNamespace?: boolean
|
|
92
94
|
config?: GatewayConfig
|
|
93
95
|
}
|
|
94
96
|
|
|
@@ -101,8 +103,7 @@ export type UpdateGatewayReq = {
|
|
|
101
103
|
gatewayName?: string
|
|
102
104
|
clusterName?: string
|
|
103
105
|
namespaceName?: string
|
|
104
|
-
|
|
105
|
-
after?: GatewayConfig
|
|
106
|
+
config?: GatewayConfig
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
export type UpdateGatewayRes = {
|
|
@@ -134,16 +135,27 @@ type BaseNormalConfig = {
|
|
|
134
135
|
export type NormalConfig = BaseNormalConfig
|
|
135
136
|
& OneOf<{ clusterIp: ClusterIP; nodePort: NodePort; loadBalancer: LoadBalancer; externalName: ExternalName }>
|
|
136
137
|
|
|
138
|
+
export type Port = {
|
|
139
|
+
name?: string
|
|
140
|
+
protocol?: string
|
|
141
|
+
port?: number
|
|
142
|
+
targetPort?: number
|
|
143
|
+
nodePort?: number
|
|
144
|
+
}
|
|
145
|
+
|
|
137
146
|
export type NodePort = {
|
|
147
|
+
ports?: Port[]
|
|
138
148
|
}
|
|
139
149
|
|
|
140
150
|
export type ClusterIP = {
|
|
151
|
+
ports?: Port[]
|
|
141
152
|
}
|
|
142
153
|
|
|
143
154
|
export type LoadBalancer = {
|
|
144
155
|
}
|
|
145
156
|
|
|
146
157
|
export type ExternalName = {
|
|
158
|
+
externalName?: string
|
|
147
159
|
}
|
|
148
160
|
|
|
149
161
|
|
|
@@ -31,8 +31,8 @@ export class Skoala {
|
|
|
31
31
|
static ListClusterNamespace(req: SkoalaApiGeneralV1alpha1Skoala.ListNamespaceReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListNamespaceRes> {
|
|
32
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
33
|
}
|
|
34
|
-
static ListWorkspace(req:
|
|
35
|
-
return fm.fetchReq<
|
|
34
|
+
static ListWorkspace(req: SkoalaApiGeneralV1alpha1Skoala.ListWorkspaceReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListWorkspaceRes> {
|
|
35
|
+
return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.ListWorkspaceReq, SkoalaApiGeneralV1alpha1Skoala.ListWorkspaceRes>(`/apis/skoala.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
export class Registry {
|
|
@@ -118,13 +118,13 @@ export class Gateway {
|
|
|
118
118
|
static Get(req: SkoalaApiHostedV1alpha1Gateway.GetGatewayReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Gateway.GetGatewayRes> {
|
|
119
119
|
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"})
|
|
120
120
|
}
|
|
121
|
-
static Create(req: SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq, initReq?: fm.InitReq): Promise<
|
|
122
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq,
|
|
121
|
+
static Create(req: SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
122
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.CreateGatewayReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
123
123
|
}
|
|
124
|
-
static Update(req: SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq, initReq?: fm.InitReq): Promise<
|
|
125
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq,
|
|
124
|
+
static Update(req: SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
125
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.UpdateGatewayReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
126
126
|
}
|
|
127
|
-
static Delete(req: SkoalaApiHostedV1alpha1Gateway.DeleteGatewayReq, initReq?: fm.InitReq): Promise<
|
|
128
|
-
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.DeleteGatewayReq,
|
|
127
|
+
static Delete(req: SkoalaApiHostedV1alpha1Gateway.DeleteGatewayReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
128
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Gateway.DeleteGatewayReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/gateways/${req["gatewayName"]}`, {...initReq, method: "DELETE"})
|
|
129
129
|
}
|
|
130
130
|
}
|