protobuf-platform 1.0.38 → 1.0.40
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/file/file.proto +10 -0
- package/file/file_grpc_pb.js +44 -0
- package/file/file_pb.js +352 -0
- package/game/game.proto +8 -4
- package/game/game_grpc_pb.js +33 -0
- package/game/game_pb.js +316 -164
- package/index.js +6 -0
- package/package.json +1 -1
- package/update_protobuf.sh +2 -1
package/file/file.proto
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
// GENERATED CODE -- DO NOT EDIT!
|
2
|
+
|
3
|
+
'use strict';
|
4
|
+
var grpc = require('@grpc/grpc-js');
|
5
|
+
var file_pb = require('./file_pb.js');
|
6
|
+
|
7
|
+
function serialize_file_FileResponse(arg) {
|
8
|
+
if (!(arg instanceof file_pb.FileResponse)) {
|
9
|
+
throw new Error('Expected argument of type file.FileResponse');
|
10
|
+
}
|
11
|
+
return Buffer.from(arg.serializeBinary());
|
12
|
+
}
|
13
|
+
|
14
|
+
function deserialize_file_FileResponse(buffer_arg) {
|
15
|
+
return file_pb.FileResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
16
|
+
}
|
17
|
+
|
18
|
+
function serialize_file_GetFileRequest(arg) {
|
19
|
+
if (!(arg instanceof file_pb.GetFileRequest)) {
|
20
|
+
throw new Error('Expected argument of type file.GetFileRequest');
|
21
|
+
}
|
22
|
+
return Buffer.from(arg.serializeBinary());
|
23
|
+
}
|
24
|
+
|
25
|
+
function deserialize_file_GetFileRequest(buffer_arg) {
|
26
|
+
return file_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
27
|
+
}
|
28
|
+
|
29
|
+
|
30
|
+
var FileService = exports.FileService = {
|
31
|
+
getMediaResource: {
|
32
|
+
path: '/file.File/getMediaResource',
|
33
|
+
requestStream: false,
|
34
|
+
responseStream: false,
|
35
|
+
requestType: file_pb.GetFileRequest,
|
36
|
+
responseType: file_pb.FileResponse,
|
37
|
+
requestSerialize: serialize_file_GetFileRequest,
|
38
|
+
requestDeserialize: deserialize_file_GetFileRequest,
|
39
|
+
responseSerialize: serialize_file_FileResponse,
|
40
|
+
responseDeserialize: deserialize_file_FileResponse,
|
41
|
+
},
|
42
|
+
};
|
43
|
+
|
44
|
+
exports.FileClient = grpc.makeGenericClientConstructor(FileService);
|
package/file/file_pb.js
ADDED
@@ -0,0 +1,352 @@
|
|
1
|
+
// source: file.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.file.FileResponse', null, global);
|
25
|
+
goog.exportSymbol('proto.file.GetFileRequest', 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.file.GetFileRequest = function(opt_data) {
|
37
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
38
|
+
};
|
39
|
+
goog.inherits(proto.file.GetFileRequest, jspb.Message);
|
40
|
+
if (goog.DEBUG && !COMPILED) {
|
41
|
+
/**
|
42
|
+
* @public
|
43
|
+
* @override
|
44
|
+
*/
|
45
|
+
proto.file.GetFileRequest.displayName = 'proto.file.GetFileRequest';
|
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.file.FileResponse = function(opt_data) {
|
58
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
59
|
+
};
|
60
|
+
goog.inherits(proto.file.FileResponse, jspb.Message);
|
61
|
+
if (goog.DEBUG && !COMPILED) {
|
62
|
+
/**
|
63
|
+
* @public
|
64
|
+
* @override
|
65
|
+
*/
|
66
|
+
proto.file.FileResponse.displayName = 'proto.file.FileResponse';
|
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.file.GetFileRequest.prototype.toObject = function(opt_includeInstance) {
|
85
|
+
return proto.file.GetFileRequest.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.file.GetFileRequest} msg The msg instance to transform.
|
95
|
+
* @return {!Object}
|
96
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
97
|
+
*/
|
98
|
+
proto.file.GetFileRequest.toObject = function(includeInstance, msg) {
|
99
|
+
var f, obj = {
|
100
|
+
filePath: jspb.Message.getFieldWithDefault(msg, 1, "")
|
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.file.GetFileRequest}
|
115
|
+
*/
|
116
|
+
proto.file.GetFileRequest.deserializeBinary = function(bytes) {
|
117
|
+
var reader = new jspb.BinaryReader(bytes);
|
118
|
+
var msg = new proto.file.GetFileRequest;
|
119
|
+
return proto.file.GetFileRequest.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.file.GetFileRequest} msg The message object to deserialize into.
|
127
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
128
|
+
* @return {!proto.file.GetFileRequest}
|
129
|
+
*/
|
130
|
+
proto.file.GetFileRequest.deserializeBinaryFromReader = function(msg, reader) {
|
131
|
+
while (reader.nextField()) {
|
132
|
+
if (reader.isEndGroup()) {
|
133
|
+
break;
|
134
|
+
}
|
135
|
+
var field = reader.getFieldNumber();
|
136
|
+
switch (field) {
|
137
|
+
case 1:
|
138
|
+
var value = /** @type {string} */ (reader.readString());
|
139
|
+
msg.setFilePath(value);
|
140
|
+
break;
|
141
|
+
default:
|
142
|
+
reader.skipField();
|
143
|
+
break;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
return msg;
|
147
|
+
};
|
148
|
+
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Serializes the message to binary data (in protobuf wire format).
|
152
|
+
* @return {!Uint8Array}
|
153
|
+
*/
|
154
|
+
proto.file.GetFileRequest.prototype.serializeBinary = function() {
|
155
|
+
var writer = new jspb.BinaryWriter();
|
156
|
+
proto.file.GetFileRequest.serializeBinaryToWriter(this, writer);
|
157
|
+
return writer.getResultBuffer();
|
158
|
+
};
|
159
|
+
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Serializes the given message to binary data (in protobuf wire
|
163
|
+
* format), writing to the given BinaryWriter.
|
164
|
+
* @param {!proto.file.GetFileRequest} message
|
165
|
+
* @param {!jspb.BinaryWriter} writer
|
166
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
167
|
+
*/
|
168
|
+
proto.file.GetFileRequest.serializeBinaryToWriter = function(message, writer) {
|
169
|
+
var f = undefined;
|
170
|
+
f = message.getFilePath();
|
171
|
+
if (f.length > 0) {
|
172
|
+
writer.writeString(
|
173
|
+
1,
|
174
|
+
f
|
175
|
+
);
|
176
|
+
}
|
177
|
+
};
|
178
|
+
|
179
|
+
|
180
|
+
/**
|
181
|
+
* optional string file_path = 1;
|
182
|
+
* @return {string}
|
183
|
+
*/
|
184
|
+
proto.file.GetFileRequest.prototype.getFilePath = function() {
|
185
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
186
|
+
};
|
187
|
+
|
188
|
+
|
189
|
+
/**
|
190
|
+
* @param {string} value
|
191
|
+
* @return {!proto.file.GetFileRequest} returns this
|
192
|
+
*/
|
193
|
+
proto.file.GetFileRequest.prototype.setFilePath = function(value) {
|
194
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
195
|
+
};
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
202
|
+
/**
|
203
|
+
* Creates an object representation of this proto.
|
204
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
205
|
+
* Optional fields that are not set will be set to undefined.
|
206
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
207
|
+
* For the list of reserved names please see:
|
208
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
209
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
210
|
+
* JSPB instance for transitional soy proto support:
|
211
|
+
* http://goto/soy-param-migration
|
212
|
+
* @return {!Object}
|
213
|
+
*/
|
214
|
+
proto.file.FileResponse.prototype.toObject = function(opt_includeInstance) {
|
215
|
+
return proto.file.FileResponse.toObject(opt_includeInstance, this);
|
216
|
+
};
|
217
|
+
|
218
|
+
|
219
|
+
/**
|
220
|
+
* Static version of the {@see toObject} method.
|
221
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
222
|
+
* the JSPB instance for transitional soy proto support:
|
223
|
+
* http://goto/soy-param-migration
|
224
|
+
* @param {!proto.file.FileResponse} msg The msg instance to transform.
|
225
|
+
* @return {!Object}
|
226
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
227
|
+
*/
|
228
|
+
proto.file.FileResponse.toObject = function(includeInstance, msg) {
|
229
|
+
var f, obj = {
|
230
|
+
content: msg.getContent_asB64()
|
231
|
+
};
|
232
|
+
|
233
|
+
if (includeInstance) {
|
234
|
+
obj.$jspbMessageInstance = msg;
|
235
|
+
}
|
236
|
+
return obj;
|
237
|
+
};
|
238
|
+
}
|
239
|
+
|
240
|
+
|
241
|
+
/**
|
242
|
+
* Deserializes binary data (in protobuf wire format).
|
243
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
244
|
+
* @return {!proto.file.FileResponse}
|
245
|
+
*/
|
246
|
+
proto.file.FileResponse.deserializeBinary = function(bytes) {
|
247
|
+
var reader = new jspb.BinaryReader(bytes);
|
248
|
+
var msg = new proto.file.FileResponse;
|
249
|
+
return proto.file.FileResponse.deserializeBinaryFromReader(msg, reader);
|
250
|
+
};
|
251
|
+
|
252
|
+
|
253
|
+
/**
|
254
|
+
* Deserializes binary data (in protobuf wire format) from the
|
255
|
+
* given reader into the given message object.
|
256
|
+
* @param {!proto.file.FileResponse} msg The message object to deserialize into.
|
257
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
258
|
+
* @return {!proto.file.FileResponse}
|
259
|
+
*/
|
260
|
+
proto.file.FileResponse.deserializeBinaryFromReader = function(msg, reader) {
|
261
|
+
while (reader.nextField()) {
|
262
|
+
if (reader.isEndGroup()) {
|
263
|
+
break;
|
264
|
+
}
|
265
|
+
var field = reader.getFieldNumber();
|
266
|
+
switch (field) {
|
267
|
+
case 1:
|
268
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
269
|
+
msg.setContent(value);
|
270
|
+
break;
|
271
|
+
default:
|
272
|
+
reader.skipField();
|
273
|
+
break;
|
274
|
+
}
|
275
|
+
}
|
276
|
+
return msg;
|
277
|
+
};
|
278
|
+
|
279
|
+
|
280
|
+
/**
|
281
|
+
* Serializes the message to binary data (in protobuf wire format).
|
282
|
+
* @return {!Uint8Array}
|
283
|
+
*/
|
284
|
+
proto.file.FileResponse.prototype.serializeBinary = function() {
|
285
|
+
var writer = new jspb.BinaryWriter();
|
286
|
+
proto.file.FileResponse.serializeBinaryToWriter(this, writer);
|
287
|
+
return writer.getResultBuffer();
|
288
|
+
};
|
289
|
+
|
290
|
+
|
291
|
+
/**
|
292
|
+
* Serializes the given message to binary data (in protobuf wire
|
293
|
+
* format), writing to the given BinaryWriter.
|
294
|
+
* @param {!proto.file.FileResponse} message
|
295
|
+
* @param {!jspb.BinaryWriter} writer
|
296
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
297
|
+
*/
|
298
|
+
proto.file.FileResponse.serializeBinaryToWriter = function(message, writer) {
|
299
|
+
var f = undefined;
|
300
|
+
f = message.getContent_asU8();
|
301
|
+
if (f.length > 0) {
|
302
|
+
writer.writeBytes(
|
303
|
+
1,
|
304
|
+
f
|
305
|
+
);
|
306
|
+
}
|
307
|
+
};
|
308
|
+
|
309
|
+
|
310
|
+
/**
|
311
|
+
* optional bytes content = 1;
|
312
|
+
* @return {!(string|Uint8Array)}
|
313
|
+
*/
|
314
|
+
proto.file.FileResponse.prototype.getContent = function() {
|
315
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
316
|
+
};
|
317
|
+
|
318
|
+
|
319
|
+
/**
|
320
|
+
* optional bytes content = 1;
|
321
|
+
* This is a type-conversion wrapper around `getContent()`
|
322
|
+
* @return {string}
|
323
|
+
*/
|
324
|
+
proto.file.FileResponse.prototype.getContent_asB64 = function() {
|
325
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
326
|
+
this.getContent()));
|
327
|
+
};
|
328
|
+
|
329
|
+
|
330
|
+
/**
|
331
|
+
* optional bytes content = 1;
|
332
|
+
* Note that Uint8Array is not supported on all browsers.
|
333
|
+
* @see http://caniuse.com/Uint8Array
|
334
|
+
* This is a type-conversion wrapper around `getContent()`
|
335
|
+
* @return {!Uint8Array}
|
336
|
+
*/
|
337
|
+
proto.file.FileResponse.prototype.getContent_asU8 = function() {
|
338
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
339
|
+
this.getContent()));
|
340
|
+
};
|
341
|
+
|
342
|
+
|
343
|
+
/**
|
344
|
+
* @param {!(string|Uint8Array)} value
|
345
|
+
* @return {!proto.file.FileResponse} returns this
|
346
|
+
*/
|
347
|
+
proto.file.FileResponse.prototype.setContent = function(value) {
|
348
|
+
return jspb.Message.setProto3BytesField(this, 1, value);
|
349
|
+
};
|
350
|
+
|
351
|
+
|
352
|
+
goog.object.extend(exports, proto.file);
|
package/game/game.proto
CHANGED
@@ -4,6 +4,7 @@ package game;
|
|
4
4
|
|
5
5
|
service Game {
|
6
6
|
rpc checkConnection(PingRequest) returns (PongResponse);
|
7
|
+
rpc getMediaResource(GetFileRequest) returns (File);
|
7
8
|
//Categories
|
8
9
|
rpc createSingleCategory(CategoryRequest) returns (CategoryResponse);
|
9
10
|
rpc readSingleCategory(GetCategoryRequest) returns (CategoryResponse);
|
@@ -14,7 +15,13 @@ service Game {
|
|
14
15
|
|
15
16
|
message PingRequest { string ping = 1; }
|
16
17
|
message PongResponse { string pong = 1; }
|
17
|
-
|
18
|
+
//Media
|
19
|
+
message File {
|
20
|
+
bytes media = 1;
|
21
|
+
}
|
22
|
+
message GetFileRequest {
|
23
|
+
string file_path = 1;
|
24
|
+
}
|
18
25
|
//Category CRUD
|
19
26
|
message CategoryItem {
|
20
27
|
optional int32 id = 1;
|
@@ -31,9 +38,6 @@ message CategoryRequest {
|
|
31
38
|
File file = 2;
|
32
39
|
}
|
33
40
|
}
|
34
|
-
message File {
|
35
|
-
bytes media = 1;
|
36
|
-
}
|
37
41
|
message CategoryItemRequest {
|
38
42
|
int32 id = 1;
|
39
43
|
optional string title = 2;
|
package/game/game_grpc_pb.js
CHANGED
@@ -48,6 +48,17 @@ function deserialize_game_CategoryStatusResponse(buffer_arg) {
|
|
48
48
|
return game_pb.CategoryStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
49
49
|
}
|
50
50
|
|
51
|
+
function serialize_game_File(arg) {
|
52
|
+
if (!(arg instanceof game_pb.File)) {
|
53
|
+
throw new Error('Expected argument of type game.File');
|
54
|
+
}
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
56
|
+
}
|
57
|
+
|
58
|
+
function deserialize_game_File(buffer_arg) {
|
59
|
+
return game_pb.File.deserializeBinary(new Uint8Array(buffer_arg));
|
60
|
+
}
|
61
|
+
|
51
62
|
function serialize_game_GetCategoryRequest(arg) {
|
52
63
|
if (!(arg instanceof game_pb.GetCategoryRequest)) {
|
53
64
|
throw new Error('Expected argument of type game.GetCategoryRequest');
|
@@ -59,6 +70,17 @@ function deserialize_game_GetCategoryRequest(buffer_arg) {
|
|
59
70
|
return game_pb.GetCategoryRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
60
71
|
}
|
61
72
|
|
73
|
+
function serialize_game_GetFileRequest(arg) {
|
74
|
+
if (!(arg instanceof game_pb.GetFileRequest)) {
|
75
|
+
throw new Error('Expected argument of type game.GetFileRequest');
|
76
|
+
}
|
77
|
+
return Buffer.from(arg.serializeBinary());
|
78
|
+
}
|
79
|
+
|
80
|
+
function deserialize_game_GetFileRequest(buffer_arg) {
|
81
|
+
return game_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
82
|
+
}
|
83
|
+
|
62
84
|
function serialize_game_GetListCategoryRequest(arg) {
|
63
85
|
if (!(arg instanceof game_pb.GetListCategoryRequest)) {
|
64
86
|
throw new Error('Expected argument of type game.GetListCategoryRequest');
|
@@ -105,6 +127,17 @@ var GameService = exports.GameService = {
|
|
105
127
|
responseSerialize: serialize_game_PongResponse,
|
106
128
|
responseDeserialize: deserialize_game_PongResponse,
|
107
129
|
},
|
130
|
+
getMediaResource: {
|
131
|
+
path: '/game.Game/getMediaResource',
|
132
|
+
requestStream: false,
|
133
|
+
responseStream: false,
|
134
|
+
requestType: game_pb.GetFileRequest,
|
135
|
+
responseType: game_pb.File,
|
136
|
+
requestSerialize: serialize_game_GetFileRequest,
|
137
|
+
requestDeserialize: deserialize_game_GetFileRequest,
|
138
|
+
responseSerialize: serialize_game_File,
|
139
|
+
responseDeserialize: deserialize_game_File,
|
140
|
+
},
|
108
141
|
// Categories
|
109
142
|
createSingleCategory: {
|
110
143
|
path: '/game.Game/createSingleCategory',
|
package/game/game_pb.js
CHANGED
@@ -30,6 +30,7 @@ goog.exportSymbol('proto.game.CategoryResponse', null, global);
|
|
30
30
|
goog.exportSymbol('proto.game.CategoryStatusResponse', null, global);
|
31
31
|
goog.exportSymbol('proto.game.File', null, global);
|
32
32
|
goog.exportSymbol('proto.game.GetCategoryRequest', null, global);
|
33
|
+
goog.exportSymbol('proto.game.GetFileRequest', null, global);
|
33
34
|
goog.exportSymbol('proto.game.GetListCategoryRequest', null, global);
|
34
35
|
goog.exportSymbol('proto.game.PingRequest', null, global);
|
35
36
|
goog.exportSymbol('proto.game.PongResponse', null, global);
|
@@ -85,16 +86,16 @@ if (goog.DEBUG && !COMPILED) {
|
|
85
86
|
* @extends {jspb.Message}
|
86
87
|
* @constructor
|
87
88
|
*/
|
88
|
-
proto.game.
|
89
|
+
proto.game.File = function(opt_data) {
|
89
90
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
90
91
|
};
|
91
|
-
goog.inherits(proto.game.
|
92
|
+
goog.inherits(proto.game.File, jspb.Message);
|
92
93
|
if (goog.DEBUG && !COMPILED) {
|
93
94
|
/**
|
94
95
|
* @public
|
95
96
|
* @override
|
96
97
|
*/
|
97
|
-
proto.game.
|
98
|
+
proto.game.File.displayName = 'proto.game.File';
|
98
99
|
}
|
99
100
|
/**
|
100
101
|
* Generated by JsPbCodeGenerator.
|
@@ -106,16 +107,16 @@ if (goog.DEBUG && !COMPILED) {
|
|
106
107
|
* @extends {jspb.Message}
|
107
108
|
* @constructor
|
108
109
|
*/
|
109
|
-
proto.game.
|
110
|
-
jspb.Message.initialize(this, opt_data, 0, -1, null,
|
110
|
+
proto.game.GetFileRequest = function(opt_data) {
|
111
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
111
112
|
};
|
112
|
-
goog.inherits(proto.game.
|
113
|
+
goog.inherits(proto.game.GetFileRequest, jspb.Message);
|
113
114
|
if (goog.DEBUG && !COMPILED) {
|
114
115
|
/**
|
115
116
|
* @public
|
116
117
|
* @override
|
117
118
|
*/
|
118
|
-
proto.game.
|
119
|
+
proto.game.GetFileRequest.displayName = 'proto.game.GetFileRequest';
|
119
120
|
}
|
120
121
|
/**
|
121
122
|
* Generated by JsPbCodeGenerator.
|
@@ -127,16 +128,37 @@ if (goog.DEBUG && !COMPILED) {
|
|
127
128
|
* @extends {jspb.Message}
|
128
129
|
* @constructor
|
129
130
|
*/
|
130
|
-
proto.game.
|
131
|
+
proto.game.CategoryItem = function(opt_data) {
|
131
132
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
132
133
|
};
|
133
|
-
goog.inherits(proto.game.
|
134
|
+
goog.inherits(proto.game.CategoryItem, jspb.Message);
|
134
135
|
if (goog.DEBUG && !COMPILED) {
|
135
136
|
/**
|
136
137
|
* @public
|
137
138
|
* @override
|
138
139
|
*/
|
139
|
-
proto.game.
|
140
|
+
proto.game.CategoryItem.displayName = 'proto.game.CategoryItem';
|
141
|
+
}
|
142
|
+
/**
|
143
|
+
* Generated by JsPbCodeGenerator.
|
144
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
145
|
+
* server response, or constructed directly in Javascript. The array is used
|
146
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
147
|
+
* If no data is provided, the constructed object will be empty, but still
|
148
|
+
* valid.
|
149
|
+
* @extends {jspb.Message}
|
150
|
+
* @constructor
|
151
|
+
*/
|
152
|
+
proto.game.CategoryRequest = function(opt_data) {
|
153
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.game.CategoryRequest.oneofGroups_);
|
154
|
+
};
|
155
|
+
goog.inherits(proto.game.CategoryRequest, jspb.Message);
|
156
|
+
if (goog.DEBUG && !COMPILED) {
|
157
|
+
/**
|
158
|
+
* @public
|
159
|
+
* @override
|
160
|
+
*/
|
161
|
+
proto.game.CategoryRequest.displayName = 'proto.game.CategoryRequest';
|
140
162
|
}
|
141
163
|
/**
|
142
164
|
* Generated by JsPbCodeGenerator.
|
@@ -527,6 +549,290 @@ proto.game.PongResponse.prototype.setPong = function(value) {
|
|
527
549
|
|
528
550
|
|
529
551
|
|
552
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
553
|
+
/**
|
554
|
+
* Creates an object representation of this proto.
|
555
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
556
|
+
* Optional fields that are not set will be set to undefined.
|
557
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
558
|
+
* For the list of reserved names please see:
|
559
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
560
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
561
|
+
* JSPB instance for transitional soy proto support:
|
562
|
+
* http://goto/soy-param-migration
|
563
|
+
* @return {!Object}
|
564
|
+
*/
|
565
|
+
proto.game.File.prototype.toObject = function(opt_includeInstance) {
|
566
|
+
return proto.game.File.toObject(opt_includeInstance, this);
|
567
|
+
};
|
568
|
+
|
569
|
+
|
570
|
+
/**
|
571
|
+
* Static version of the {@see toObject} method.
|
572
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
573
|
+
* the JSPB instance for transitional soy proto support:
|
574
|
+
* http://goto/soy-param-migration
|
575
|
+
* @param {!proto.game.File} msg The msg instance to transform.
|
576
|
+
* @return {!Object}
|
577
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
578
|
+
*/
|
579
|
+
proto.game.File.toObject = function(includeInstance, msg) {
|
580
|
+
var f, obj = {
|
581
|
+
media: msg.getMedia_asB64()
|
582
|
+
};
|
583
|
+
|
584
|
+
if (includeInstance) {
|
585
|
+
obj.$jspbMessageInstance = msg;
|
586
|
+
}
|
587
|
+
return obj;
|
588
|
+
};
|
589
|
+
}
|
590
|
+
|
591
|
+
|
592
|
+
/**
|
593
|
+
* Deserializes binary data (in protobuf wire format).
|
594
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
595
|
+
* @return {!proto.game.File}
|
596
|
+
*/
|
597
|
+
proto.game.File.deserializeBinary = function(bytes) {
|
598
|
+
var reader = new jspb.BinaryReader(bytes);
|
599
|
+
var msg = new proto.game.File;
|
600
|
+
return proto.game.File.deserializeBinaryFromReader(msg, reader);
|
601
|
+
};
|
602
|
+
|
603
|
+
|
604
|
+
/**
|
605
|
+
* Deserializes binary data (in protobuf wire format) from the
|
606
|
+
* given reader into the given message object.
|
607
|
+
* @param {!proto.game.File} msg The message object to deserialize into.
|
608
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
609
|
+
* @return {!proto.game.File}
|
610
|
+
*/
|
611
|
+
proto.game.File.deserializeBinaryFromReader = function(msg, reader) {
|
612
|
+
while (reader.nextField()) {
|
613
|
+
if (reader.isEndGroup()) {
|
614
|
+
break;
|
615
|
+
}
|
616
|
+
var field = reader.getFieldNumber();
|
617
|
+
switch (field) {
|
618
|
+
case 1:
|
619
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
620
|
+
msg.setMedia(value);
|
621
|
+
break;
|
622
|
+
default:
|
623
|
+
reader.skipField();
|
624
|
+
break;
|
625
|
+
}
|
626
|
+
}
|
627
|
+
return msg;
|
628
|
+
};
|
629
|
+
|
630
|
+
|
631
|
+
/**
|
632
|
+
* Serializes the message to binary data (in protobuf wire format).
|
633
|
+
* @return {!Uint8Array}
|
634
|
+
*/
|
635
|
+
proto.game.File.prototype.serializeBinary = function() {
|
636
|
+
var writer = new jspb.BinaryWriter();
|
637
|
+
proto.game.File.serializeBinaryToWriter(this, writer);
|
638
|
+
return writer.getResultBuffer();
|
639
|
+
};
|
640
|
+
|
641
|
+
|
642
|
+
/**
|
643
|
+
* Serializes the given message to binary data (in protobuf wire
|
644
|
+
* format), writing to the given BinaryWriter.
|
645
|
+
* @param {!proto.game.File} message
|
646
|
+
* @param {!jspb.BinaryWriter} writer
|
647
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
648
|
+
*/
|
649
|
+
proto.game.File.serializeBinaryToWriter = function(message, writer) {
|
650
|
+
var f = undefined;
|
651
|
+
f = message.getMedia_asU8();
|
652
|
+
if (f.length > 0) {
|
653
|
+
writer.writeBytes(
|
654
|
+
1,
|
655
|
+
f
|
656
|
+
);
|
657
|
+
}
|
658
|
+
};
|
659
|
+
|
660
|
+
|
661
|
+
/**
|
662
|
+
* optional bytes media = 1;
|
663
|
+
* @return {!(string|Uint8Array)}
|
664
|
+
*/
|
665
|
+
proto.game.File.prototype.getMedia = function() {
|
666
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
667
|
+
};
|
668
|
+
|
669
|
+
|
670
|
+
/**
|
671
|
+
* optional bytes media = 1;
|
672
|
+
* This is a type-conversion wrapper around `getMedia()`
|
673
|
+
* @return {string}
|
674
|
+
*/
|
675
|
+
proto.game.File.prototype.getMedia_asB64 = function() {
|
676
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
677
|
+
this.getMedia()));
|
678
|
+
};
|
679
|
+
|
680
|
+
|
681
|
+
/**
|
682
|
+
* optional bytes media = 1;
|
683
|
+
* Note that Uint8Array is not supported on all browsers.
|
684
|
+
* @see http://caniuse.com/Uint8Array
|
685
|
+
* This is a type-conversion wrapper around `getMedia()`
|
686
|
+
* @return {!Uint8Array}
|
687
|
+
*/
|
688
|
+
proto.game.File.prototype.getMedia_asU8 = function() {
|
689
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
690
|
+
this.getMedia()));
|
691
|
+
};
|
692
|
+
|
693
|
+
|
694
|
+
/**
|
695
|
+
* @param {!(string|Uint8Array)} value
|
696
|
+
* @return {!proto.game.File} returns this
|
697
|
+
*/
|
698
|
+
proto.game.File.prototype.setMedia = function(value) {
|
699
|
+
return jspb.Message.setProto3BytesField(this, 1, value);
|
700
|
+
};
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
707
|
+
/**
|
708
|
+
* Creates an object representation of this proto.
|
709
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
710
|
+
* Optional fields that are not set will be set to undefined.
|
711
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
712
|
+
* For the list of reserved names please see:
|
713
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
714
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
715
|
+
* JSPB instance for transitional soy proto support:
|
716
|
+
* http://goto/soy-param-migration
|
717
|
+
* @return {!Object}
|
718
|
+
*/
|
719
|
+
proto.game.GetFileRequest.prototype.toObject = function(opt_includeInstance) {
|
720
|
+
return proto.game.GetFileRequest.toObject(opt_includeInstance, this);
|
721
|
+
};
|
722
|
+
|
723
|
+
|
724
|
+
/**
|
725
|
+
* Static version of the {@see toObject} method.
|
726
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
727
|
+
* the JSPB instance for transitional soy proto support:
|
728
|
+
* http://goto/soy-param-migration
|
729
|
+
* @param {!proto.game.GetFileRequest} msg The msg instance to transform.
|
730
|
+
* @return {!Object}
|
731
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
732
|
+
*/
|
733
|
+
proto.game.GetFileRequest.toObject = function(includeInstance, msg) {
|
734
|
+
var f, obj = {
|
735
|
+
filePath: jspb.Message.getFieldWithDefault(msg, 1, "")
|
736
|
+
};
|
737
|
+
|
738
|
+
if (includeInstance) {
|
739
|
+
obj.$jspbMessageInstance = msg;
|
740
|
+
}
|
741
|
+
return obj;
|
742
|
+
};
|
743
|
+
}
|
744
|
+
|
745
|
+
|
746
|
+
/**
|
747
|
+
* Deserializes binary data (in protobuf wire format).
|
748
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
749
|
+
* @return {!proto.game.GetFileRequest}
|
750
|
+
*/
|
751
|
+
proto.game.GetFileRequest.deserializeBinary = function(bytes) {
|
752
|
+
var reader = new jspb.BinaryReader(bytes);
|
753
|
+
var msg = new proto.game.GetFileRequest;
|
754
|
+
return proto.game.GetFileRequest.deserializeBinaryFromReader(msg, reader);
|
755
|
+
};
|
756
|
+
|
757
|
+
|
758
|
+
/**
|
759
|
+
* Deserializes binary data (in protobuf wire format) from the
|
760
|
+
* given reader into the given message object.
|
761
|
+
* @param {!proto.game.GetFileRequest} msg The message object to deserialize into.
|
762
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
763
|
+
* @return {!proto.game.GetFileRequest}
|
764
|
+
*/
|
765
|
+
proto.game.GetFileRequest.deserializeBinaryFromReader = function(msg, reader) {
|
766
|
+
while (reader.nextField()) {
|
767
|
+
if (reader.isEndGroup()) {
|
768
|
+
break;
|
769
|
+
}
|
770
|
+
var field = reader.getFieldNumber();
|
771
|
+
switch (field) {
|
772
|
+
case 1:
|
773
|
+
var value = /** @type {string} */ (reader.readString());
|
774
|
+
msg.setFilePath(value);
|
775
|
+
break;
|
776
|
+
default:
|
777
|
+
reader.skipField();
|
778
|
+
break;
|
779
|
+
}
|
780
|
+
}
|
781
|
+
return msg;
|
782
|
+
};
|
783
|
+
|
784
|
+
|
785
|
+
/**
|
786
|
+
* Serializes the message to binary data (in protobuf wire format).
|
787
|
+
* @return {!Uint8Array}
|
788
|
+
*/
|
789
|
+
proto.game.GetFileRequest.prototype.serializeBinary = function() {
|
790
|
+
var writer = new jspb.BinaryWriter();
|
791
|
+
proto.game.GetFileRequest.serializeBinaryToWriter(this, writer);
|
792
|
+
return writer.getResultBuffer();
|
793
|
+
};
|
794
|
+
|
795
|
+
|
796
|
+
/**
|
797
|
+
* Serializes the given message to binary data (in protobuf wire
|
798
|
+
* format), writing to the given BinaryWriter.
|
799
|
+
* @param {!proto.game.GetFileRequest} message
|
800
|
+
* @param {!jspb.BinaryWriter} writer
|
801
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
802
|
+
*/
|
803
|
+
proto.game.GetFileRequest.serializeBinaryToWriter = function(message, writer) {
|
804
|
+
var f = undefined;
|
805
|
+
f = message.getFilePath();
|
806
|
+
if (f.length > 0) {
|
807
|
+
writer.writeString(
|
808
|
+
1,
|
809
|
+
f
|
810
|
+
);
|
811
|
+
}
|
812
|
+
};
|
813
|
+
|
814
|
+
|
815
|
+
/**
|
816
|
+
* optional string file_path = 1;
|
817
|
+
* @return {string}
|
818
|
+
*/
|
819
|
+
proto.game.GetFileRequest.prototype.getFilePath = function() {
|
820
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
821
|
+
};
|
822
|
+
|
823
|
+
|
824
|
+
/**
|
825
|
+
* @param {string} value
|
826
|
+
* @return {!proto.game.GetFileRequest} returns this
|
827
|
+
*/
|
828
|
+
proto.game.GetFileRequest.prototype.setFilePath = function(value) {
|
829
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
830
|
+
};
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
|
530
836
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
531
837
|
/**
|
532
838
|
* Creates an object representation of this proto.
|
@@ -1143,160 +1449,6 @@ proto.game.CategoryRequest.prototype.hasFile = function() {
|
|
1143
1449
|
|
1144
1450
|
|
1145
1451
|
|
1146
|
-
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1147
|
-
/**
|
1148
|
-
* Creates an object representation of this proto.
|
1149
|
-
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1150
|
-
* Optional fields that are not set will be set to undefined.
|
1151
|
-
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1152
|
-
* For the list of reserved names please see:
|
1153
|
-
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
1154
|
-
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
1155
|
-
* JSPB instance for transitional soy proto support:
|
1156
|
-
* http://goto/soy-param-migration
|
1157
|
-
* @return {!Object}
|
1158
|
-
*/
|
1159
|
-
proto.game.File.prototype.toObject = function(opt_includeInstance) {
|
1160
|
-
return proto.game.File.toObject(opt_includeInstance, this);
|
1161
|
-
};
|
1162
|
-
|
1163
|
-
|
1164
|
-
/**
|
1165
|
-
* Static version of the {@see toObject} method.
|
1166
|
-
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
1167
|
-
* the JSPB instance for transitional soy proto support:
|
1168
|
-
* http://goto/soy-param-migration
|
1169
|
-
* @param {!proto.game.File} msg The msg instance to transform.
|
1170
|
-
* @return {!Object}
|
1171
|
-
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1172
|
-
*/
|
1173
|
-
proto.game.File.toObject = function(includeInstance, msg) {
|
1174
|
-
var f, obj = {
|
1175
|
-
media: msg.getMedia_asB64()
|
1176
|
-
};
|
1177
|
-
|
1178
|
-
if (includeInstance) {
|
1179
|
-
obj.$jspbMessageInstance = msg;
|
1180
|
-
}
|
1181
|
-
return obj;
|
1182
|
-
};
|
1183
|
-
}
|
1184
|
-
|
1185
|
-
|
1186
|
-
/**
|
1187
|
-
* Deserializes binary data (in protobuf wire format).
|
1188
|
-
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1189
|
-
* @return {!proto.game.File}
|
1190
|
-
*/
|
1191
|
-
proto.game.File.deserializeBinary = function(bytes) {
|
1192
|
-
var reader = new jspb.BinaryReader(bytes);
|
1193
|
-
var msg = new proto.game.File;
|
1194
|
-
return proto.game.File.deserializeBinaryFromReader(msg, reader);
|
1195
|
-
};
|
1196
|
-
|
1197
|
-
|
1198
|
-
/**
|
1199
|
-
* Deserializes binary data (in protobuf wire format) from the
|
1200
|
-
* given reader into the given message object.
|
1201
|
-
* @param {!proto.game.File} msg The message object to deserialize into.
|
1202
|
-
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1203
|
-
* @return {!proto.game.File}
|
1204
|
-
*/
|
1205
|
-
proto.game.File.deserializeBinaryFromReader = function(msg, reader) {
|
1206
|
-
while (reader.nextField()) {
|
1207
|
-
if (reader.isEndGroup()) {
|
1208
|
-
break;
|
1209
|
-
}
|
1210
|
-
var field = reader.getFieldNumber();
|
1211
|
-
switch (field) {
|
1212
|
-
case 1:
|
1213
|
-
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
1214
|
-
msg.setMedia(value);
|
1215
|
-
break;
|
1216
|
-
default:
|
1217
|
-
reader.skipField();
|
1218
|
-
break;
|
1219
|
-
}
|
1220
|
-
}
|
1221
|
-
return msg;
|
1222
|
-
};
|
1223
|
-
|
1224
|
-
|
1225
|
-
/**
|
1226
|
-
* Serializes the message to binary data (in protobuf wire format).
|
1227
|
-
* @return {!Uint8Array}
|
1228
|
-
*/
|
1229
|
-
proto.game.File.prototype.serializeBinary = function() {
|
1230
|
-
var writer = new jspb.BinaryWriter();
|
1231
|
-
proto.game.File.serializeBinaryToWriter(this, writer);
|
1232
|
-
return writer.getResultBuffer();
|
1233
|
-
};
|
1234
|
-
|
1235
|
-
|
1236
|
-
/**
|
1237
|
-
* Serializes the given message to binary data (in protobuf wire
|
1238
|
-
* format), writing to the given BinaryWriter.
|
1239
|
-
* @param {!proto.game.File} message
|
1240
|
-
* @param {!jspb.BinaryWriter} writer
|
1241
|
-
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1242
|
-
*/
|
1243
|
-
proto.game.File.serializeBinaryToWriter = function(message, writer) {
|
1244
|
-
var f = undefined;
|
1245
|
-
f = message.getMedia_asU8();
|
1246
|
-
if (f.length > 0) {
|
1247
|
-
writer.writeBytes(
|
1248
|
-
1,
|
1249
|
-
f
|
1250
|
-
);
|
1251
|
-
}
|
1252
|
-
};
|
1253
|
-
|
1254
|
-
|
1255
|
-
/**
|
1256
|
-
* optional bytes media = 1;
|
1257
|
-
* @return {!(string|Uint8Array)}
|
1258
|
-
*/
|
1259
|
-
proto.game.File.prototype.getMedia = function() {
|
1260
|
-
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
1261
|
-
};
|
1262
|
-
|
1263
|
-
|
1264
|
-
/**
|
1265
|
-
* optional bytes media = 1;
|
1266
|
-
* This is a type-conversion wrapper around `getMedia()`
|
1267
|
-
* @return {string}
|
1268
|
-
*/
|
1269
|
-
proto.game.File.prototype.getMedia_asB64 = function() {
|
1270
|
-
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
1271
|
-
this.getMedia()));
|
1272
|
-
};
|
1273
|
-
|
1274
|
-
|
1275
|
-
/**
|
1276
|
-
* optional bytes media = 1;
|
1277
|
-
* Note that Uint8Array is not supported on all browsers.
|
1278
|
-
* @see http://caniuse.com/Uint8Array
|
1279
|
-
* This is a type-conversion wrapper around `getMedia()`
|
1280
|
-
* @return {!Uint8Array}
|
1281
|
-
*/
|
1282
|
-
proto.game.File.prototype.getMedia_asU8 = function() {
|
1283
|
-
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
1284
|
-
this.getMedia()));
|
1285
|
-
};
|
1286
|
-
|
1287
|
-
|
1288
|
-
/**
|
1289
|
-
* @param {!(string|Uint8Array)} value
|
1290
|
-
* @return {!proto.game.File} returns this
|
1291
|
-
*/
|
1292
|
-
proto.game.File.prototype.setMedia = function(value) {
|
1293
|
-
return jspb.Message.setProto3BytesField(this, 1, value);
|
1294
|
-
};
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
1452
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1301
1453
|
/**
|
1302
1454
|
* Creates an object representation of this proto.
|
package/index.js
CHANGED
@@ -9,6 +9,8 @@ const LogService = require('./log/log_grpc_pb');
|
|
9
9
|
const LogServiceMessages = require('./log/log_pb');
|
10
10
|
const GameService = require('./game/game_grpc_pb');
|
11
11
|
const GameServiceMessages = require('./game/game_pb');
|
12
|
+
const FileService = require('./file/file_grpc_pb');
|
13
|
+
const FileServiceMessages = require('./file/file_pb');
|
12
14
|
module.exports = {
|
13
15
|
gRPC: gRPC,
|
14
16
|
maxSendMessageLength: 10388608,
|
@@ -30,4 +32,8 @@ module.exports = {
|
|
30
32
|
service: GameService,
|
31
33
|
messages: GameServiceMessages
|
32
34
|
},
|
35
|
+
file: {
|
36
|
+
service: FileService,
|
37
|
+
messages: FileServiceMessages
|
38
|
+
},
|
33
39
|
};
|
package/package.json
CHANGED
package/update_protobuf.sh
CHANGED
@@ -3,4 +3,5 @@
|
|
3
3
|
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:config --grpc_out=grpc_js:config --proto_path=./config ./config/*.proto &&
|
4
4
|
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:user --grpc_out=grpc_js:user --proto_path=./user ./user/*.proto &&
|
5
5
|
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:log --grpc_out=grpc_js:log --proto_path=./log ./log/*.proto &&
|
6
|
-
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:game --grpc_out=grpc_js:game --proto_path=./game ./game/*.proto
|
6
|
+
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:game --grpc_out=grpc_js:game --proto_path=./game ./game/*.proto &&
|
7
|
+
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:file --grpc_out=grpc_js:file --proto_path=./file ./file/*.proto
|