protobuf-platform 1.0.0

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.
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # protobuf
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://gitlab.com/platform5334443/backend/protobuf.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ - [ ] [Set up project integrations](https://gitlab.com/platform5334443/backend/protobuf/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+
53
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
+
55
+ ## Name
56
+ Choose a self-explaining name for your project.
57
+
58
+ ## Description
59
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
+
61
+ ## Badges
62
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
+
64
+ ## Visuals
65
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
+
67
+ ## Installation
68
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
+
70
+ ## Usage
71
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
+
73
+ ## Support
74
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
+
76
+ ## Roadmap
77
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
78
+
79
+ ## Contributing
80
+ State if you are open to contributions and what your requirements are for accepting them.
81
+
82
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
+
84
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
+
86
+ ## Authors and acknowledgment
87
+ Show your appreciation to those who have contributed to the project.
88
+
89
+ ## License
90
+ For open source projects, say how it is licensed.
91
+
92
+ ## Project status
93
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@@ -0,0 +1,24 @@
1
+ syntax = "proto3";
2
+
3
+ package config;
4
+
5
+ service Config {
6
+ rpc checkConnection(PingRequest) returns (PongResponse);
7
+ //Fetch settings for particular service
8
+ rpc getConfigSettings(SettingsRequest) returns (SettingsResponse);
9
+ }
10
+
11
+ message PingRequest { string ping = 1; }
12
+ message PongResponse { string pong = 1; }
13
+
14
+ //Service settings
15
+ message SettingsRequest {
16
+ string environment = 1;
17
+ string customer = 2;
18
+ }
19
+ message SettingsResponse {
20
+ optional string rabbit = 1;
21
+ optional string mongo = 2;
22
+ optional string my_sql = 3;
23
+ optional string redis = 4;
24
+ }
@@ -0,0 +1,78 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var config_pb = require('./config_pb.js');
6
+
7
+ function serialize_config_PingRequest(arg) {
8
+ if (!(arg instanceof config_pb.PingRequest)) {
9
+ throw new Error('Expected argument of type config.PingRequest');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_config_PingRequest(buffer_arg) {
15
+ return config_pb.PingRequest.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
18
+ function serialize_config_PongResponse(arg) {
19
+ if (!(arg instanceof config_pb.PongResponse)) {
20
+ throw new Error('Expected argument of type config.PongResponse');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_config_PongResponse(buffer_arg) {
26
+ return config_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
29
+ function serialize_config_SettingsRequest(arg) {
30
+ if (!(arg instanceof config_pb.SettingsRequest)) {
31
+ throw new Error('Expected argument of type config.SettingsRequest');
32
+ }
33
+ return Buffer.from(arg.serializeBinary());
34
+ }
35
+
36
+ function deserialize_config_SettingsRequest(buffer_arg) {
37
+ return config_pb.SettingsRequest.deserializeBinary(new Uint8Array(buffer_arg));
38
+ }
39
+
40
+ function serialize_config_SettingsResponse(arg) {
41
+ if (!(arg instanceof config_pb.SettingsResponse)) {
42
+ throw new Error('Expected argument of type config.SettingsResponse');
43
+ }
44
+ return Buffer.from(arg.serializeBinary());
45
+ }
46
+
47
+ function deserialize_config_SettingsResponse(buffer_arg) {
48
+ return config_pb.SettingsResponse.deserializeBinary(new Uint8Array(buffer_arg));
49
+ }
50
+
51
+
52
+ var ConfigService = exports.ConfigService = {
53
+ checkConnection: {
54
+ path: '/config.Config/checkConnection',
55
+ requestStream: false,
56
+ responseStream: false,
57
+ requestType: config_pb.PingRequest,
58
+ responseType: config_pb.PongResponse,
59
+ requestSerialize: serialize_config_PingRequest,
60
+ requestDeserialize: deserialize_config_PingRequest,
61
+ responseSerialize: serialize_config_PongResponse,
62
+ responseDeserialize: deserialize_config_PongResponse,
63
+ },
64
+ // Fetch settings for particular service
65
+ getConfigSettings: {
66
+ path: '/config.Config/getConfigSettings',
67
+ requestStream: false,
68
+ responseStream: false,
69
+ requestType: config_pb.SettingsRequest,
70
+ responseType: config_pb.SettingsResponse,
71
+ requestSerialize: serialize_config_SettingsRequest,
72
+ requestDeserialize: deserialize_config_SettingsRequest,
73
+ responseSerialize: serialize_config_SettingsResponse,
74
+ responseDeserialize: deserialize_config_SettingsResponse,
75
+ },
76
+ };
77
+
78
+ exports.ConfigClient = grpc.makeGenericClientConstructor(ConfigService);
@@ -0,0 +1,824 @@
1
+ // source: config.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.config.PingRequest', null, global);
25
+ goog.exportSymbol('proto.config.PongResponse', null, global);
26
+ goog.exportSymbol('proto.config.SettingsRequest', null, global);
27
+ goog.exportSymbol('proto.config.SettingsResponse', null, global);
28
+ /**
29
+ * Generated by JsPbCodeGenerator.
30
+ * @param {Array=} opt_data Optional initial data array, typically from a
31
+ * server response, or constructed directly in Javascript. The array is used
32
+ * in place and becomes part of the constructed object. It is not cloned.
33
+ * If no data is provided, the constructed object will be empty, but still
34
+ * valid.
35
+ * @extends {jspb.Message}
36
+ * @constructor
37
+ */
38
+ proto.config.PingRequest = function(opt_data) {
39
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
40
+ };
41
+ goog.inherits(proto.config.PingRequest, jspb.Message);
42
+ if (goog.DEBUG && !COMPILED) {
43
+ /**
44
+ * @public
45
+ * @override
46
+ */
47
+ proto.config.PingRequest.displayName = 'proto.config.PingRequest';
48
+ }
49
+ /**
50
+ * Generated by JsPbCodeGenerator.
51
+ * @param {Array=} opt_data Optional initial data array, typically from a
52
+ * server response, or constructed directly in Javascript. The array is used
53
+ * in place and becomes part of the constructed object. It is not cloned.
54
+ * If no data is provided, the constructed object will be empty, but still
55
+ * valid.
56
+ * @extends {jspb.Message}
57
+ * @constructor
58
+ */
59
+ proto.config.PongResponse = function(opt_data) {
60
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
61
+ };
62
+ goog.inherits(proto.config.PongResponse, jspb.Message);
63
+ if (goog.DEBUG && !COMPILED) {
64
+ /**
65
+ * @public
66
+ * @override
67
+ */
68
+ proto.config.PongResponse.displayName = 'proto.config.PongResponse';
69
+ }
70
+ /**
71
+ * Generated by JsPbCodeGenerator.
72
+ * @param {Array=} opt_data Optional initial data array, typically from a
73
+ * server response, or constructed directly in Javascript. The array is used
74
+ * in place and becomes part of the constructed object. It is not cloned.
75
+ * If no data is provided, the constructed object will be empty, but still
76
+ * valid.
77
+ * @extends {jspb.Message}
78
+ * @constructor
79
+ */
80
+ proto.config.SettingsRequest = function(opt_data) {
81
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
82
+ };
83
+ goog.inherits(proto.config.SettingsRequest, jspb.Message);
84
+ if (goog.DEBUG && !COMPILED) {
85
+ /**
86
+ * @public
87
+ * @override
88
+ */
89
+ proto.config.SettingsRequest.displayName = 'proto.config.SettingsRequest';
90
+ }
91
+ /**
92
+ * Generated by JsPbCodeGenerator.
93
+ * @param {Array=} opt_data Optional initial data array, typically from a
94
+ * server response, or constructed directly in Javascript. The array is used
95
+ * in place and becomes part of the constructed object. It is not cloned.
96
+ * If no data is provided, the constructed object will be empty, but still
97
+ * valid.
98
+ * @extends {jspb.Message}
99
+ * @constructor
100
+ */
101
+ proto.config.SettingsResponse = function(opt_data) {
102
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
103
+ };
104
+ goog.inherits(proto.config.SettingsResponse, jspb.Message);
105
+ if (goog.DEBUG && !COMPILED) {
106
+ /**
107
+ * @public
108
+ * @override
109
+ */
110
+ proto.config.SettingsResponse.displayName = 'proto.config.SettingsResponse';
111
+ }
112
+
113
+
114
+
115
+ if (jspb.Message.GENERATE_TO_OBJECT) {
116
+ /**
117
+ * Creates an object representation of this proto.
118
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
119
+ * Optional fields that are not set will be set to undefined.
120
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
121
+ * For the list of reserved names please see:
122
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
123
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
124
+ * JSPB instance for transitional soy proto support:
125
+ * http://goto/soy-param-migration
126
+ * @return {!Object}
127
+ */
128
+ proto.config.PingRequest.prototype.toObject = function(opt_includeInstance) {
129
+ return proto.config.PingRequest.toObject(opt_includeInstance, this);
130
+ };
131
+
132
+
133
+ /**
134
+ * Static version of the {@see toObject} method.
135
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
136
+ * the JSPB instance for transitional soy proto support:
137
+ * http://goto/soy-param-migration
138
+ * @param {!proto.config.PingRequest} msg The msg instance to transform.
139
+ * @return {!Object}
140
+ * @suppress {unusedLocalVariables} f is only used for nested messages
141
+ */
142
+ proto.config.PingRequest.toObject = function(includeInstance, msg) {
143
+ var f, obj = {
144
+ ping: jspb.Message.getFieldWithDefault(msg, 1, "")
145
+ };
146
+
147
+ if (includeInstance) {
148
+ obj.$jspbMessageInstance = msg;
149
+ }
150
+ return obj;
151
+ };
152
+ }
153
+
154
+
155
+ /**
156
+ * Deserializes binary data (in protobuf wire format).
157
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
158
+ * @return {!proto.config.PingRequest}
159
+ */
160
+ proto.config.PingRequest.deserializeBinary = function(bytes) {
161
+ var reader = new jspb.BinaryReader(bytes);
162
+ var msg = new proto.config.PingRequest;
163
+ return proto.config.PingRequest.deserializeBinaryFromReader(msg, reader);
164
+ };
165
+
166
+
167
+ /**
168
+ * Deserializes binary data (in protobuf wire format) from the
169
+ * given reader into the given message object.
170
+ * @param {!proto.config.PingRequest} msg The message object to deserialize into.
171
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
172
+ * @return {!proto.config.PingRequest}
173
+ */
174
+ proto.config.PingRequest.deserializeBinaryFromReader = function(msg, reader) {
175
+ while (reader.nextField()) {
176
+ if (reader.isEndGroup()) {
177
+ break;
178
+ }
179
+ var field = reader.getFieldNumber();
180
+ switch (field) {
181
+ case 1:
182
+ var value = /** @type {string} */ (reader.readString());
183
+ msg.setPing(value);
184
+ break;
185
+ default:
186
+ reader.skipField();
187
+ break;
188
+ }
189
+ }
190
+ return msg;
191
+ };
192
+
193
+
194
+ /**
195
+ * Serializes the message to binary data (in protobuf wire format).
196
+ * @return {!Uint8Array}
197
+ */
198
+ proto.config.PingRequest.prototype.serializeBinary = function() {
199
+ var writer = new jspb.BinaryWriter();
200
+ proto.config.PingRequest.serializeBinaryToWriter(this, writer);
201
+ return writer.getResultBuffer();
202
+ };
203
+
204
+
205
+ /**
206
+ * Serializes the given message to binary data (in protobuf wire
207
+ * format), writing to the given BinaryWriter.
208
+ * @param {!proto.config.PingRequest} message
209
+ * @param {!jspb.BinaryWriter} writer
210
+ * @suppress {unusedLocalVariables} f is only used for nested messages
211
+ */
212
+ proto.config.PingRequest.serializeBinaryToWriter = function(message, writer) {
213
+ var f = undefined;
214
+ f = message.getPing();
215
+ if (f.length > 0) {
216
+ writer.writeString(
217
+ 1,
218
+ f
219
+ );
220
+ }
221
+ };
222
+
223
+
224
+ /**
225
+ * optional string ping = 1;
226
+ * @return {string}
227
+ */
228
+ proto.config.PingRequest.prototype.getPing = function() {
229
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
230
+ };
231
+
232
+
233
+ /**
234
+ * @param {string} value
235
+ * @return {!proto.config.PingRequest} returns this
236
+ */
237
+ proto.config.PingRequest.prototype.setPing = function(value) {
238
+ return jspb.Message.setProto3StringField(this, 1, value);
239
+ };
240
+
241
+
242
+
243
+
244
+
245
+ if (jspb.Message.GENERATE_TO_OBJECT) {
246
+ /**
247
+ * Creates an object representation of this proto.
248
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
249
+ * Optional fields that are not set will be set to undefined.
250
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
251
+ * For the list of reserved names please see:
252
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
253
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
254
+ * JSPB instance for transitional soy proto support:
255
+ * http://goto/soy-param-migration
256
+ * @return {!Object}
257
+ */
258
+ proto.config.PongResponse.prototype.toObject = function(opt_includeInstance) {
259
+ return proto.config.PongResponse.toObject(opt_includeInstance, this);
260
+ };
261
+
262
+
263
+ /**
264
+ * Static version of the {@see toObject} method.
265
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
266
+ * the JSPB instance for transitional soy proto support:
267
+ * http://goto/soy-param-migration
268
+ * @param {!proto.config.PongResponse} msg The msg instance to transform.
269
+ * @return {!Object}
270
+ * @suppress {unusedLocalVariables} f is only used for nested messages
271
+ */
272
+ proto.config.PongResponse.toObject = function(includeInstance, msg) {
273
+ var f, obj = {
274
+ pong: jspb.Message.getFieldWithDefault(msg, 1, "")
275
+ };
276
+
277
+ if (includeInstance) {
278
+ obj.$jspbMessageInstance = msg;
279
+ }
280
+ return obj;
281
+ };
282
+ }
283
+
284
+
285
+ /**
286
+ * Deserializes binary data (in protobuf wire format).
287
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
288
+ * @return {!proto.config.PongResponse}
289
+ */
290
+ proto.config.PongResponse.deserializeBinary = function(bytes) {
291
+ var reader = new jspb.BinaryReader(bytes);
292
+ var msg = new proto.config.PongResponse;
293
+ return proto.config.PongResponse.deserializeBinaryFromReader(msg, reader);
294
+ };
295
+
296
+
297
+ /**
298
+ * Deserializes binary data (in protobuf wire format) from the
299
+ * given reader into the given message object.
300
+ * @param {!proto.config.PongResponse} msg The message object to deserialize into.
301
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
302
+ * @return {!proto.config.PongResponse}
303
+ */
304
+ proto.config.PongResponse.deserializeBinaryFromReader = function(msg, reader) {
305
+ while (reader.nextField()) {
306
+ if (reader.isEndGroup()) {
307
+ break;
308
+ }
309
+ var field = reader.getFieldNumber();
310
+ switch (field) {
311
+ case 1:
312
+ var value = /** @type {string} */ (reader.readString());
313
+ msg.setPong(value);
314
+ break;
315
+ default:
316
+ reader.skipField();
317
+ break;
318
+ }
319
+ }
320
+ return msg;
321
+ };
322
+
323
+
324
+ /**
325
+ * Serializes the message to binary data (in protobuf wire format).
326
+ * @return {!Uint8Array}
327
+ */
328
+ proto.config.PongResponse.prototype.serializeBinary = function() {
329
+ var writer = new jspb.BinaryWriter();
330
+ proto.config.PongResponse.serializeBinaryToWriter(this, writer);
331
+ return writer.getResultBuffer();
332
+ };
333
+
334
+
335
+ /**
336
+ * Serializes the given message to binary data (in protobuf wire
337
+ * format), writing to the given BinaryWriter.
338
+ * @param {!proto.config.PongResponse} message
339
+ * @param {!jspb.BinaryWriter} writer
340
+ * @suppress {unusedLocalVariables} f is only used for nested messages
341
+ */
342
+ proto.config.PongResponse.serializeBinaryToWriter = function(message, writer) {
343
+ var f = undefined;
344
+ f = message.getPong();
345
+ if (f.length > 0) {
346
+ writer.writeString(
347
+ 1,
348
+ f
349
+ );
350
+ }
351
+ };
352
+
353
+
354
+ /**
355
+ * optional string pong = 1;
356
+ * @return {string}
357
+ */
358
+ proto.config.PongResponse.prototype.getPong = function() {
359
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
360
+ };
361
+
362
+
363
+ /**
364
+ * @param {string} value
365
+ * @return {!proto.config.PongResponse} returns this
366
+ */
367
+ proto.config.PongResponse.prototype.setPong = function(value) {
368
+ return jspb.Message.setProto3StringField(this, 1, value);
369
+ };
370
+
371
+
372
+
373
+
374
+
375
+ if (jspb.Message.GENERATE_TO_OBJECT) {
376
+ /**
377
+ * Creates an object representation of this proto.
378
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
379
+ * Optional fields that are not set will be set to undefined.
380
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
381
+ * For the list of reserved names please see:
382
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
383
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
384
+ * JSPB instance for transitional soy proto support:
385
+ * http://goto/soy-param-migration
386
+ * @return {!Object}
387
+ */
388
+ proto.config.SettingsRequest.prototype.toObject = function(opt_includeInstance) {
389
+ return proto.config.SettingsRequest.toObject(opt_includeInstance, this);
390
+ };
391
+
392
+
393
+ /**
394
+ * Static version of the {@see toObject} method.
395
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
396
+ * the JSPB instance for transitional soy proto support:
397
+ * http://goto/soy-param-migration
398
+ * @param {!proto.config.SettingsRequest} msg The msg instance to transform.
399
+ * @return {!Object}
400
+ * @suppress {unusedLocalVariables} f is only used for nested messages
401
+ */
402
+ proto.config.SettingsRequest.toObject = function(includeInstance, msg) {
403
+ var f, obj = {
404
+ environment: jspb.Message.getFieldWithDefault(msg, 1, ""),
405
+ customer: jspb.Message.getFieldWithDefault(msg, 2, "")
406
+ };
407
+
408
+ if (includeInstance) {
409
+ obj.$jspbMessageInstance = msg;
410
+ }
411
+ return obj;
412
+ };
413
+ }
414
+
415
+
416
+ /**
417
+ * Deserializes binary data (in protobuf wire format).
418
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
419
+ * @return {!proto.config.SettingsRequest}
420
+ */
421
+ proto.config.SettingsRequest.deserializeBinary = function(bytes) {
422
+ var reader = new jspb.BinaryReader(bytes);
423
+ var msg = new proto.config.SettingsRequest;
424
+ return proto.config.SettingsRequest.deserializeBinaryFromReader(msg, reader);
425
+ };
426
+
427
+
428
+ /**
429
+ * Deserializes binary data (in protobuf wire format) from the
430
+ * given reader into the given message object.
431
+ * @param {!proto.config.SettingsRequest} msg The message object to deserialize into.
432
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
433
+ * @return {!proto.config.SettingsRequest}
434
+ */
435
+ proto.config.SettingsRequest.deserializeBinaryFromReader = function(msg, reader) {
436
+ while (reader.nextField()) {
437
+ if (reader.isEndGroup()) {
438
+ break;
439
+ }
440
+ var field = reader.getFieldNumber();
441
+ switch (field) {
442
+ case 1:
443
+ var value = /** @type {string} */ (reader.readString());
444
+ msg.setEnvironment(value);
445
+ break;
446
+ case 2:
447
+ var value = /** @type {string} */ (reader.readString());
448
+ msg.setCustomer(value);
449
+ break;
450
+ default:
451
+ reader.skipField();
452
+ break;
453
+ }
454
+ }
455
+ return msg;
456
+ };
457
+
458
+
459
+ /**
460
+ * Serializes the message to binary data (in protobuf wire format).
461
+ * @return {!Uint8Array}
462
+ */
463
+ proto.config.SettingsRequest.prototype.serializeBinary = function() {
464
+ var writer = new jspb.BinaryWriter();
465
+ proto.config.SettingsRequest.serializeBinaryToWriter(this, writer);
466
+ return writer.getResultBuffer();
467
+ };
468
+
469
+
470
+ /**
471
+ * Serializes the given message to binary data (in protobuf wire
472
+ * format), writing to the given BinaryWriter.
473
+ * @param {!proto.config.SettingsRequest} message
474
+ * @param {!jspb.BinaryWriter} writer
475
+ * @suppress {unusedLocalVariables} f is only used for nested messages
476
+ */
477
+ proto.config.SettingsRequest.serializeBinaryToWriter = function(message, writer) {
478
+ var f = undefined;
479
+ f = message.getEnvironment();
480
+ if (f.length > 0) {
481
+ writer.writeString(
482
+ 1,
483
+ f
484
+ );
485
+ }
486
+ f = message.getCustomer();
487
+ if (f.length > 0) {
488
+ writer.writeString(
489
+ 2,
490
+ f
491
+ );
492
+ }
493
+ };
494
+
495
+
496
+ /**
497
+ * optional string environment = 1;
498
+ * @return {string}
499
+ */
500
+ proto.config.SettingsRequest.prototype.getEnvironment = function() {
501
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
502
+ };
503
+
504
+
505
+ /**
506
+ * @param {string} value
507
+ * @return {!proto.config.SettingsRequest} returns this
508
+ */
509
+ proto.config.SettingsRequest.prototype.setEnvironment = function(value) {
510
+ return jspb.Message.setProto3StringField(this, 1, value);
511
+ };
512
+
513
+
514
+ /**
515
+ * optional string customer = 2;
516
+ * @return {string}
517
+ */
518
+ proto.config.SettingsRequest.prototype.getCustomer = function() {
519
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
520
+ };
521
+
522
+
523
+ /**
524
+ * @param {string} value
525
+ * @return {!proto.config.SettingsRequest} returns this
526
+ */
527
+ proto.config.SettingsRequest.prototype.setCustomer = function(value) {
528
+ return jspb.Message.setProto3StringField(this, 2, value);
529
+ };
530
+
531
+
532
+
533
+
534
+
535
+ if (jspb.Message.GENERATE_TO_OBJECT) {
536
+ /**
537
+ * Creates an object representation of this proto.
538
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
539
+ * Optional fields that are not set will be set to undefined.
540
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
541
+ * For the list of reserved names please see:
542
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
543
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
544
+ * JSPB instance for transitional soy proto support:
545
+ * http://goto/soy-param-migration
546
+ * @return {!Object}
547
+ */
548
+ proto.config.SettingsResponse.prototype.toObject = function(opt_includeInstance) {
549
+ return proto.config.SettingsResponse.toObject(opt_includeInstance, this);
550
+ };
551
+
552
+
553
+ /**
554
+ * Static version of the {@see toObject} method.
555
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
556
+ * the JSPB instance for transitional soy proto support:
557
+ * http://goto/soy-param-migration
558
+ * @param {!proto.config.SettingsResponse} msg The msg instance to transform.
559
+ * @return {!Object}
560
+ * @suppress {unusedLocalVariables} f is only used for nested messages
561
+ */
562
+ proto.config.SettingsResponse.toObject = function(includeInstance, msg) {
563
+ var f, obj = {
564
+ rabbit: jspb.Message.getFieldWithDefault(msg, 1, ""),
565
+ mongo: jspb.Message.getFieldWithDefault(msg, 2, ""),
566
+ mySql: jspb.Message.getFieldWithDefault(msg, 3, ""),
567
+ redis: jspb.Message.getFieldWithDefault(msg, 4, "")
568
+ };
569
+
570
+ if (includeInstance) {
571
+ obj.$jspbMessageInstance = msg;
572
+ }
573
+ return obj;
574
+ };
575
+ }
576
+
577
+
578
+ /**
579
+ * Deserializes binary data (in protobuf wire format).
580
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
581
+ * @return {!proto.config.SettingsResponse}
582
+ */
583
+ proto.config.SettingsResponse.deserializeBinary = function(bytes) {
584
+ var reader = new jspb.BinaryReader(bytes);
585
+ var msg = new proto.config.SettingsResponse;
586
+ return proto.config.SettingsResponse.deserializeBinaryFromReader(msg, reader);
587
+ };
588
+
589
+
590
+ /**
591
+ * Deserializes binary data (in protobuf wire format) from the
592
+ * given reader into the given message object.
593
+ * @param {!proto.config.SettingsResponse} msg The message object to deserialize into.
594
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
595
+ * @return {!proto.config.SettingsResponse}
596
+ */
597
+ proto.config.SettingsResponse.deserializeBinaryFromReader = function(msg, reader) {
598
+ while (reader.nextField()) {
599
+ if (reader.isEndGroup()) {
600
+ break;
601
+ }
602
+ var field = reader.getFieldNumber();
603
+ switch (field) {
604
+ case 1:
605
+ var value = /** @type {string} */ (reader.readString());
606
+ msg.setRabbit(value);
607
+ break;
608
+ case 2:
609
+ var value = /** @type {string} */ (reader.readString());
610
+ msg.setMongo(value);
611
+ break;
612
+ case 3:
613
+ var value = /** @type {string} */ (reader.readString());
614
+ msg.setMySql(value);
615
+ break;
616
+ case 4:
617
+ var value = /** @type {string} */ (reader.readString());
618
+ msg.setRedis(value);
619
+ break;
620
+ default:
621
+ reader.skipField();
622
+ break;
623
+ }
624
+ }
625
+ return msg;
626
+ };
627
+
628
+
629
+ /**
630
+ * Serializes the message to binary data (in protobuf wire format).
631
+ * @return {!Uint8Array}
632
+ */
633
+ proto.config.SettingsResponse.prototype.serializeBinary = function() {
634
+ var writer = new jspb.BinaryWriter();
635
+ proto.config.SettingsResponse.serializeBinaryToWriter(this, writer);
636
+ return writer.getResultBuffer();
637
+ };
638
+
639
+
640
+ /**
641
+ * Serializes the given message to binary data (in protobuf wire
642
+ * format), writing to the given BinaryWriter.
643
+ * @param {!proto.config.SettingsResponse} message
644
+ * @param {!jspb.BinaryWriter} writer
645
+ * @suppress {unusedLocalVariables} f is only used for nested messages
646
+ */
647
+ proto.config.SettingsResponse.serializeBinaryToWriter = function(message, writer) {
648
+ var f = undefined;
649
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
650
+ if (f != null) {
651
+ writer.writeString(
652
+ 1,
653
+ f
654
+ );
655
+ }
656
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
657
+ if (f != null) {
658
+ writer.writeString(
659
+ 2,
660
+ f
661
+ );
662
+ }
663
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
664
+ if (f != null) {
665
+ writer.writeString(
666
+ 3,
667
+ f
668
+ );
669
+ }
670
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
671
+ if (f != null) {
672
+ writer.writeString(
673
+ 4,
674
+ f
675
+ );
676
+ }
677
+ };
678
+
679
+
680
+ /**
681
+ * optional string rabbit = 1;
682
+ * @return {string}
683
+ */
684
+ proto.config.SettingsResponse.prototype.getRabbit = function() {
685
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
686
+ };
687
+
688
+
689
+ /**
690
+ * @param {string} value
691
+ * @return {!proto.config.SettingsResponse} returns this
692
+ */
693
+ proto.config.SettingsResponse.prototype.setRabbit = function(value) {
694
+ return jspb.Message.setField(this, 1, value);
695
+ };
696
+
697
+
698
+ /**
699
+ * Clears the field making it undefined.
700
+ * @return {!proto.config.SettingsResponse} returns this
701
+ */
702
+ proto.config.SettingsResponse.prototype.clearRabbit = function() {
703
+ return jspb.Message.setField(this, 1, undefined);
704
+ };
705
+
706
+
707
+ /**
708
+ * Returns whether this field is set.
709
+ * @return {boolean}
710
+ */
711
+ proto.config.SettingsResponse.prototype.hasRabbit = function() {
712
+ return jspb.Message.getField(this, 1) != null;
713
+ };
714
+
715
+
716
+ /**
717
+ * optional string mongo = 2;
718
+ * @return {string}
719
+ */
720
+ proto.config.SettingsResponse.prototype.getMongo = function() {
721
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
722
+ };
723
+
724
+
725
+ /**
726
+ * @param {string} value
727
+ * @return {!proto.config.SettingsResponse} returns this
728
+ */
729
+ proto.config.SettingsResponse.prototype.setMongo = function(value) {
730
+ return jspb.Message.setField(this, 2, value);
731
+ };
732
+
733
+
734
+ /**
735
+ * Clears the field making it undefined.
736
+ * @return {!proto.config.SettingsResponse} returns this
737
+ */
738
+ proto.config.SettingsResponse.prototype.clearMongo = function() {
739
+ return jspb.Message.setField(this, 2, undefined);
740
+ };
741
+
742
+
743
+ /**
744
+ * Returns whether this field is set.
745
+ * @return {boolean}
746
+ */
747
+ proto.config.SettingsResponse.prototype.hasMongo = function() {
748
+ return jspb.Message.getField(this, 2) != null;
749
+ };
750
+
751
+
752
+ /**
753
+ * optional string my_sql = 3;
754
+ * @return {string}
755
+ */
756
+ proto.config.SettingsResponse.prototype.getMySql = function() {
757
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
758
+ };
759
+
760
+
761
+ /**
762
+ * @param {string} value
763
+ * @return {!proto.config.SettingsResponse} returns this
764
+ */
765
+ proto.config.SettingsResponse.prototype.setMySql = function(value) {
766
+ return jspb.Message.setField(this, 3, value);
767
+ };
768
+
769
+
770
+ /**
771
+ * Clears the field making it undefined.
772
+ * @return {!proto.config.SettingsResponse} returns this
773
+ */
774
+ proto.config.SettingsResponse.prototype.clearMySql = function() {
775
+ return jspb.Message.setField(this, 3, undefined);
776
+ };
777
+
778
+
779
+ /**
780
+ * Returns whether this field is set.
781
+ * @return {boolean}
782
+ */
783
+ proto.config.SettingsResponse.prototype.hasMySql = function() {
784
+ return jspb.Message.getField(this, 3) != null;
785
+ };
786
+
787
+
788
+ /**
789
+ * optional string redis = 4;
790
+ * @return {string}
791
+ */
792
+ proto.config.SettingsResponse.prototype.getRedis = function() {
793
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
794
+ };
795
+
796
+
797
+ /**
798
+ * @param {string} value
799
+ * @return {!proto.config.SettingsResponse} returns this
800
+ */
801
+ proto.config.SettingsResponse.prototype.setRedis = function(value) {
802
+ return jspb.Message.setField(this, 4, value);
803
+ };
804
+
805
+
806
+ /**
807
+ * Clears the field making it undefined.
808
+ * @return {!proto.config.SettingsResponse} returns this
809
+ */
810
+ proto.config.SettingsResponse.prototype.clearRedis = function() {
811
+ return jspb.Message.setField(this, 4, undefined);
812
+ };
813
+
814
+
815
+ /**
816
+ * Returns whether this field is set.
817
+ * @return {boolean}
818
+ */
819
+ proto.config.SettingsResponse.prototype.hasRedis = function() {
820
+ return jspb.Message.getField(this, 4) != null;
821
+ };
822
+
823
+
824
+ goog.object.extend(exports, proto.config);
package/index.js ADDED
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ const gRPC = require('@grpc/grpc-js');
4
+ const ConfigService = require('./config/config_grpc_pb');
5
+ const ConfigServiceMessages = require('./config/config_pb');
6
+
7
+ module.exports = {
8
+ gRPC: gRPC,
9
+ config: {
10
+ service: ConfigService,
11
+ messages: ConfigServiceMessages
12
+ },
13
+ };
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "protobuf-platform",
3
+ "version": "1.0.0",
4
+ "description": "Protobuf structures",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+ssh://git@gitlab.com/platform5334443/backend/protobuf.git"
12
+ },
13
+ "keywords": [
14
+ "protobuf",
15
+ "rpc"
16
+ ],
17
+ "author": "BetSystem LTD.",
18
+ "license": "ISC",
19
+ "bugs": {
20
+ "url": "https://gitlab.com/platform5334443/backend/protobuf/issues"
21
+ },
22
+ "homepage": "https://gitlab.com/platform5334443/backend/protobuf#readme",
23
+ "dependencies": {
24
+ "@grpc/grpc-js": "^1.12.2",
25
+ "google-protobuf": "^3.21.4"
26
+ }
27
+ }
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ grpc_tools_node_protoc --js_out=import_style=commonjs,binary:config --grpc_out=grpc_js:config --proto_path=./config ./config/*.proto