@gitpod/supervisor-api-grpc 0.1.5-patch-2-fork.0 → 0.1.5-pd-test.42

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,41 @@
1
+ // package: supervisor
2
+ // file: sshkey.proto
3
+
4
+ /* tslint:disable */
5
+ /* eslint-disable */
6
+
7
+ import * as grpc from "@grpc/grpc-js";
8
+ import * as sshkey_pb from "./sshkey_pb";
9
+
10
+ interface ISSHKeyServiceService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
11
+ createSSHKeyPair: ISSHKeyServiceService_ICreateSSHKeyPair;
12
+ }
13
+
14
+ interface ISSHKeyServiceService_ICreateSSHKeyPair extends grpc.MethodDefinition<sshkey_pb.CreateSSHKeyPairRequest, sshkey_pb.CreateSSHKeyPairResponse> {
15
+ path: "/supervisor.SSHKeyService/CreateSSHKeyPair";
16
+ requestStream: false;
17
+ responseStream: false;
18
+ requestSerialize: grpc.serialize<sshkey_pb.CreateSSHKeyPairRequest>;
19
+ requestDeserialize: grpc.deserialize<sshkey_pb.CreateSSHKeyPairRequest>;
20
+ responseSerialize: grpc.serialize<sshkey_pb.CreateSSHKeyPairResponse>;
21
+ responseDeserialize: grpc.deserialize<sshkey_pb.CreateSSHKeyPairResponse>;
22
+ }
23
+
24
+ export const SSHKeyServiceService: ISSHKeyServiceService;
25
+
26
+ export interface ISSHKeyServiceServer extends grpc.UntypedServiceImplementation {
27
+ createSSHKeyPair: grpc.handleUnaryCall<sshkey_pb.CreateSSHKeyPairRequest, sshkey_pb.CreateSSHKeyPairResponse>;
28
+ }
29
+
30
+ export interface ISSHKeyServiceClient {
31
+ createSSHKeyPair(request: sshkey_pb.CreateSSHKeyPairRequest, callback: (error: grpc.ServiceError | null, response: sshkey_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
32
+ createSSHKeyPair(request: sshkey_pb.CreateSSHKeyPairRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: sshkey_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
33
+ createSSHKeyPair(request: sshkey_pb.CreateSSHKeyPairRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: sshkey_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
34
+ }
35
+
36
+ export class SSHKeyServiceClient extends grpc.Client implements ISSHKeyServiceClient {
37
+ constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
38
+ public createSSHKeyPair(request: sshkey_pb.CreateSSHKeyPairRequest, callback: (error: grpc.ServiceError | null, response: sshkey_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
39
+ public createSSHKeyPair(request: sshkey_pb.CreateSSHKeyPairRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: sshkey_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
40
+ public createSSHKeyPair(request: sshkey_pb.CreateSSHKeyPairRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: sshkey_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
41
+ }
@@ -0,0 +1,49 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ // Original file comments:
4
+ // Copyright (c) 2020 Gitpod GmbH. All rights reserved.
5
+ // Licensed under the GNU Affero General Public License (AGPL).
6
+ // See License-AGPL.txt in the project root for license information.
7
+ //
8
+ 'use strict';
9
+ var grpc = require('@grpc/grpc-js');
10
+ var sshkey_pb = require('./sshkey_pb.js');
11
+
12
+ function serialize_supervisor_CreateSSHKeyPairRequest(arg) {
13
+ if (!(arg instanceof sshkey_pb.CreateSSHKeyPairRequest)) {
14
+ throw new Error('Expected argument of type supervisor.CreateSSHKeyPairRequest');
15
+ }
16
+ return Buffer.from(arg.serializeBinary());
17
+ }
18
+
19
+ function deserialize_supervisor_CreateSSHKeyPairRequest(buffer_arg) {
20
+ return sshkey_pb.CreateSSHKeyPairRequest.deserializeBinary(new Uint8Array(buffer_arg));
21
+ }
22
+
23
+ function serialize_supervisor_CreateSSHKeyPairResponse(arg) {
24
+ if (!(arg instanceof sshkey_pb.CreateSSHKeyPairResponse)) {
25
+ throw new Error('Expected argument of type supervisor.CreateSSHKeyPairResponse');
26
+ }
27
+ return Buffer.from(arg.serializeBinary());
28
+ }
29
+
30
+ function deserialize_supervisor_CreateSSHKeyPairResponse(buffer_arg) {
31
+ return sshkey_pb.CreateSSHKeyPairResponse.deserializeBinary(new Uint8Array(buffer_arg));
32
+ }
33
+
34
+
35
+ var SSHKeyServiceService = exports.SSHKeyServiceService = {
36
+ createSSHKeyPair: {
37
+ path: '/supervisor.SSHKeyService/CreateSSHKeyPair',
38
+ requestStream: false,
39
+ responseStream: false,
40
+ requestType: sshkey_pb.CreateSSHKeyPairRequest,
41
+ responseType: sshkey_pb.CreateSSHKeyPairResponse,
42
+ requestSerialize: serialize_supervisor_CreateSSHKeyPairRequest,
43
+ requestDeserialize: deserialize_supervisor_CreateSSHKeyPairRequest,
44
+ responseSerialize: serialize_supervisor_CreateSSHKeyPairResponse,
45
+ responseDeserialize: deserialize_supervisor_CreateSSHKeyPairResponse,
46
+ },
47
+ };
48
+
49
+ exports.SSHKeyServiceClient = grpc.makeGenericClientConstructor(SSHKeyServiceService);
@@ -0,0 +1,44 @@
1
+ // package: supervisor
2
+ // file: sshkey.proto
3
+
4
+ /* tslint:disable */
5
+ /* eslint-disable */
6
+
7
+ import * as jspb from "google-protobuf";
8
+
9
+ export class CreateSSHKeyPairRequest extends jspb.Message {
10
+
11
+ serializeBinary(): Uint8Array;
12
+ toObject(includeInstance?: boolean): CreateSSHKeyPairRequest.AsObject;
13
+ static toObject(includeInstance: boolean, msg: CreateSSHKeyPairRequest): CreateSSHKeyPairRequest.AsObject;
14
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
15
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
16
+ static serializeBinaryToWriter(message: CreateSSHKeyPairRequest, writer: jspb.BinaryWriter): void;
17
+ static deserializeBinary(bytes: Uint8Array): CreateSSHKeyPairRequest;
18
+ static deserializeBinaryFromReader(message: CreateSSHKeyPairRequest, reader: jspb.BinaryReader): CreateSSHKeyPairRequest;
19
+ }
20
+
21
+ export namespace CreateSSHKeyPairRequest {
22
+ export type AsObject = {
23
+ }
24
+ }
25
+
26
+ export class CreateSSHKeyPairResponse extends jspb.Message {
27
+ getPrivateKey(): string;
28
+ setPrivateKey(value: string): CreateSSHKeyPairResponse;
29
+
30
+ serializeBinary(): Uint8Array;
31
+ toObject(includeInstance?: boolean): CreateSSHKeyPairResponse.AsObject;
32
+ static toObject(includeInstance: boolean, msg: CreateSSHKeyPairResponse): CreateSSHKeyPairResponse.AsObject;
33
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
34
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
35
+ static serializeBinaryToWriter(message: CreateSSHKeyPairResponse, writer: jspb.BinaryWriter): void;
36
+ static deserializeBinary(bytes: Uint8Array): CreateSSHKeyPairResponse;
37
+ static deserializeBinaryFromReader(message: CreateSSHKeyPairResponse, reader: jspb.BinaryReader): CreateSSHKeyPairResponse;
38
+ }
39
+
40
+ export namespace CreateSSHKeyPairResponse {
41
+ export type AsObject = {
42
+ privateKey: string,
43
+ }
44
+ }
@@ -0,0 +1,299 @@
1
+ // source: sshkey.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() {
17
+ if (this) { return this; }
18
+ if (typeof window !== 'undefined') { return window; }
19
+ if (typeof global !== 'undefined') { return global; }
20
+ if (typeof self !== 'undefined') { return self; }
21
+ return Function('return this')();
22
+ }.call(null));
23
+
24
+ goog.exportSymbol('proto.supervisor.CreateSSHKeyPairRequest', null, global);
25
+ goog.exportSymbol('proto.supervisor.CreateSSHKeyPairResponse', null, global);
26
+ /**
27
+ * Generated by JsPbCodeGenerator.
28
+ * @param {Array=} opt_data Optional initial data array, typically from a
29
+ * server response, or constructed directly in Javascript. The array is used
30
+ * in place and becomes part of the constructed object. It is not cloned.
31
+ * If no data is provided, the constructed object will be empty, but still
32
+ * valid.
33
+ * @extends {jspb.Message}
34
+ * @constructor
35
+ */
36
+ proto.supervisor.CreateSSHKeyPairRequest = function(opt_data) {
37
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
38
+ };
39
+ goog.inherits(proto.supervisor.CreateSSHKeyPairRequest, jspb.Message);
40
+ if (goog.DEBUG && !COMPILED) {
41
+ /**
42
+ * @public
43
+ * @override
44
+ */
45
+ proto.supervisor.CreateSSHKeyPairRequest.displayName = 'proto.supervisor.CreateSSHKeyPairRequest';
46
+ }
47
+ /**
48
+ * Generated by JsPbCodeGenerator.
49
+ * @param {Array=} opt_data Optional initial data array, typically from a
50
+ * server response, or constructed directly in Javascript. The array is used
51
+ * in place and becomes part of the constructed object. It is not cloned.
52
+ * If no data is provided, the constructed object will be empty, but still
53
+ * valid.
54
+ * @extends {jspb.Message}
55
+ * @constructor
56
+ */
57
+ proto.supervisor.CreateSSHKeyPairResponse = function(opt_data) {
58
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
59
+ };
60
+ goog.inherits(proto.supervisor.CreateSSHKeyPairResponse, jspb.Message);
61
+ if (goog.DEBUG && !COMPILED) {
62
+ /**
63
+ * @public
64
+ * @override
65
+ */
66
+ proto.supervisor.CreateSSHKeyPairResponse.displayName = 'proto.supervisor.CreateSSHKeyPairResponse';
67
+ }
68
+
69
+
70
+
71
+ if (jspb.Message.GENERATE_TO_OBJECT) {
72
+ /**
73
+ * Creates an object representation of this proto.
74
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
75
+ * Optional fields that are not set will be set to undefined.
76
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
77
+ * For the list of reserved names please see:
78
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
79
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
80
+ * JSPB instance for transitional soy proto support:
81
+ * http://goto/soy-param-migration
82
+ * @return {!Object}
83
+ */
84
+ proto.supervisor.CreateSSHKeyPairRequest.prototype.toObject = function(opt_includeInstance) {
85
+ return proto.supervisor.CreateSSHKeyPairRequest.toObject(opt_includeInstance, this);
86
+ };
87
+
88
+
89
+ /**
90
+ * Static version of the {@see toObject} method.
91
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
92
+ * the JSPB instance for transitional soy proto support:
93
+ * http://goto/soy-param-migration
94
+ * @param {!proto.supervisor.CreateSSHKeyPairRequest} msg The msg instance to transform.
95
+ * @return {!Object}
96
+ * @suppress {unusedLocalVariables} f is only used for nested messages
97
+ */
98
+ proto.supervisor.CreateSSHKeyPairRequest.toObject = function(includeInstance, msg) {
99
+ var f, obj = {
100
+
101
+ };
102
+
103
+ if (includeInstance) {
104
+ obj.$jspbMessageInstance = msg;
105
+ }
106
+ return obj;
107
+ };
108
+ }
109
+
110
+
111
+ /**
112
+ * Deserializes binary data (in protobuf wire format).
113
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
114
+ * @return {!proto.supervisor.CreateSSHKeyPairRequest}
115
+ */
116
+ proto.supervisor.CreateSSHKeyPairRequest.deserializeBinary = function(bytes) {
117
+ var reader = new jspb.BinaryReader(bytes);
118
+ var msg = new proto.supervisor.CreateSSHKeyPairRequest;
119
+ return proto.supervisor.CreateSSHKeyPairRequest.deserializeBinaryFromReader(msg, reader);
120
+ };
121
+
122
+
123
+ /**
124
+ * Deserializes binary data (in protobuf wire format) from the
125
+ * given reader into the given message object.
126
+ * @param {!proto.supervisor.CreateSSHKeyPairRequest} msg The message object to deserialize into.
127
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
128
+ * @return {!proto.supervisor.CreateSSHKeyPairRequest}
129
+ */
130
+ proto.supervisor.CreateSSHKeyPairRequest.deserializeBinaryFromReader = function(msg, reader) {
131
+ while (reader.nextField()) {
132
+ if (reader.isEndGroup()) {
133
+ break;
134
+ }
135
+ var field = reader.getFieldNumber();
136
+ switch (field) {
137
+ default:
138
+ reader.skipField();
139
+ break;
140
+ }
141
+ }
142
+ return msg;
143
+ };
144
+
145
+
146
+ /**
147
+ * Serializes the message to binary data (in protobuf wire format).
148
+ * @return {!Uint8Array}
149
+ */
150
+ proto.supervisor.CreateSSHKeyPairRequest.prototype.serializeBinary = function() {
151
+ var writer = new jspb.BinaryWriter();
152
+ proto.supervisor.CreateSSHKeyPairRequest.serializeBinaryToWriter(this, writer);
153
+ return writer.getResultBuffer();
154
+ };
155
+
156
+
157
+ /**
158
+ * Serializes the given message to binary data (in protobuf wire
159
+ * format), writing to the given BinaryWriter.
160
+ * @param {!proto.supervisor.CreateSSHKeyPairRequest} message
161
+ * @param {!jspb.BinaryWriter} writer
162
+ * @suppress {unusedLocalVariables} f is only used for nested messages
163
+ */
164
+ proto.supervisor.CreateSSHKeyPairRequest.serializeBinaryToWriter = function(message, writer) {
165
+ var f = undefined;
166
+ };
167
+
168
+
169
+
170
+
171
+
172
+ if (jspb.Message.GENERATE_TO_OBJECT) {
173
+ /**
174
+ * Creates an object representation of this proto.
175
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
176
+ * Optional fields that are not set will be set to undefined.
177
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
178
+ * For the list of reserved names please see:
179
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
180
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
181
+ * JSPB instance for transitional soy proto support:
182
+ * http://goto/soy-param-migration
183
+ * @return {!Object}
184
+ */
185
+ proto.supervisor.CreateSSHKeyPairResponse.prototype.toObject = function(opt_includeInstance) {
186
+ return proto.supervisor.CreateSSHKeyPairResponse.toObject(opt_includeInstance, this);
187
+ };
188
+
189
+
190
+ /**
191
+ * Static version of the {@see toObject} method.
192
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
193
+ * the JSPB instance for transitional soy proto support:
194
+ * http://goto/soy-param-migration
195
+ * @param {!proto.supervisor.CreateSSHKeyPairResponse} msg The msg instance to transform.
196
+ * @return {!Object}
197
+ * @suppress {unusedLocalVariables} f is only used for nested messages
198
+ */
199
+ proto.supervisor.CreateSSHKeyPairResponse.toObject = function(includeInstance, msg) {
200
+ var f, obj = {
201
+ privateKey: jspb.Message.getFieldWithDefault(msg, 1, "")
202
+ };
203
+
204
+ if (includeInstance) {
205
+ obj.$jspbMessageInstance = msg;
206
+ }
207
+ return obj;
208
+ };
209
+ }
210
+
211
+
212
+ /**
213
+ * Deserializes binary data (in protobuf wire format).
214
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
215
+ * @return {!proto.supervisor.CreateSSHKeyPairResponse}
216
+ */
217
+ proto.supervisor.CreateSSHKeyPairResponse.deserializeBinary = function(bytes) {
218
+ var reader = new jspb.BinaryReader(bytes);
219
+ var msg = new proto.supervisor.CreateSSHKeyPairResponse;
220
+ return proto.supervisor.CreateSSHKeyPairResponse.deserializeBinaryFromReader(msg, reader);
221
+ };
222
+
223
+
224
+ /**
225
+ * Deserializes binary data (in protobuf wire format) from the
226
+ * given reader into the given message object.
227
+ * @param {!proto.supervisor.CreateSSHKeyPairResponse} msg The message object to deserialize into.
228
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
229
+ * @return {!proto.supervisor.CreateSSHKeyPairResponse}
230
+ */
231
+ proto.supervisor.CreateSSHKeyPairResponse.deserializeBinaryFromReader = function(msg, reader) {
232
+ while (reader.nextField()) {
233
+ if (reader.isEndGroup()) {
234
+ break;
235
+ }
236
+ var field = reader.getFieldNumber();
237
+ switch (field) {
238
+ case 1:
239
+ var value = /** @type {string} */ (reader.readString());
240
+ msg.setPrivateKey(value);
241
+ break;
242
+ default:
243
+ reader.skipField();
244
+ break;
245
+ }
246
+ }
247
+ return msg;
248
+ };
249
+
250
+
251
+ /**
252
+ * Serializes the message to binary data (in protobuf wire format).
253
+ * @return {!Uint8Array}
254
+ */
255
+ proto.supervisor.CreateSSHKeyPairResponse.prototype.serializeBinary = function() {
256
+ var writer = new jspb.BinaryWriter();
257
+ proto.supervisor.CreateSSHKeyPairResponse.serializeBinaryToWriter(this, writer);
258
+ return writer.getResultBuffer();
259
+ };
260
+
261
+
262
+ /**
263
+ * Serializes the given message to binary data (in protobuf wire
264
+ * format), writing to the given BinaryWriter.
265
+ * @param {!proto.supervisor.CreateSSHKeyPairResponse} message
266
+ * @param {!jspb.BinaryWriter} writer
267
+ * @suppress {unusedLocalVariables} f is only used for nested messages
268
+ */
269
+ proto.supervisor.CreateSSHKeyPairResponse.serializeBinaryToWriter = function(message, writer) {
270
+ var f = undefined;
271
+ f = message.getPrivateKey();
272
+ if (f.length > 0) {
273
+ writer.writeString(
274
+ 1,
275
+ f
276
+ );
277
+ }
278
+ };
279
+
280
+
281
+ /**
282
+ * optional string private_key = 1;
283
+ * @return {string}
284
+ */
285
+ proto.supervisor.CreateSSHKeyPairResponse.prototype.getPrivateKey = function() {
286
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
287
+ };
288
+
289
+
290
+ /**
291
+ * @param {string} value
292
+ * @return {!proto.supervisor.CreateSSHKeyPairResponse} returns this
293
+ */
294
+ proto.supervisor.CreateSSHKeyPairResponse.prototype.setPrivateKey = function(value) {
295
+ return jspb.Message.setProto3StringField(this, 1, value);
296
+ };
297
+
298
+
299
+ goog.object.extend(exports, proto.supervisor);
@@ -5,8 +5,8 @@
5
5
  /* eslint-disable */
6
6
 
7
7
  import * as grpc from "@grpc/grpc-js";
8
- import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call";
9
8
  import * as status_pb from "./status_pb";
9
+ import * as port_pb from "./port_pb";
10
10
 
11
11
  interface IStatusServiceService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
12
12
  supervisorStatus: IStatusServiceService_ISupervisorStatus;
@@ -8,6 +8,7 @@
8
8
  'use strict';
9
9
  var grpc = require('@grpc/grpc-js');
10
10
  var status_pb = require('./status_pb.js');
11
+ var port_pb = require('./port_pb.js');
11
12
 
12
13
  function serialize_supervisor_BackupStatusRequest(arg) {
13
14
  if (!(arg instanceof status_pb.BackupStatusRequest)) {