feat: 提交资源
This commit is contained in:
171
assets/scripts/protos/ProtoDefinitions.d.ts
vendored
Normal file
171
assets/scripts/protos/ProtoDefinitions.d.ts
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
import * as $protobuf from "protobufjs";
|
||||
import Long = require("long");
|
||||
/** Namespace pkg1. */
|
||||
export namespace pkg1 {
|
||||
|
||||
/** Properties of a Bar. */
|
||||
interface IBar {
|
||||
|
||||
/** Bar bar */
|
||||
bar?: (number|null);
|
||||
}
|
||||
|
||||
/** Represents a Bar. */
|
||||
class Bar implements IBar {
|
||||
|
||||
/**
|
||||
* Constructs a new Bar.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: pkg1.IBar);
|
||||
|
||||
/** Bar bar. */
|
||||
public bar: number;
|
||||
|
||||
/**
|
||||
* Encodes the specified Bar message. Does not implicitly {@link pkg1.Bar.verify|verify} messages.
|
||||
* @param message Bar message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: pkg1.IBar, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a Bar message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns Bar
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pkg1.Bar;
|
||||
|
||||
/**
|
||||
* Gets the default type url for Bar
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
* @returns The default type url
|
||||
*/
|
||||
public static getTypeUrl(typeUrlPrefix?: string): string;
|
||||
}
|
||||
|
||||
/** MessageCode enum. */
|
||||
enum MessageCode {
|
||||
MSG_UNKNOWN = 0,
|
||||
MSG_USER = 1001,
|
||||
MSG_BAR = 1002
|
||||
}
|
||||
|
||||
/** Properties of an Envelope. */
|
||||
interface IEnvelope {
|
||||
|
||||
/** Envelope code */
|
||||
code?: (number|null);
|
||||
|
||||
/** Envelope payload */
|
||||
payload?: (Uint8Array|null);
|
||||
}
|
||||
|
||||
/** Represents an Envelope. */
|
||||
class Envelope implements IEnvelope {
|
||||
|
||||
/**
|
||||
* Constructs a new Envelope.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: pkg1.IEnvelope);
|
||||
|
||||
/** Envelope code. */
|
||||
public code: number;
|
||||
|
||||
/** Envelope payload. */
|
||||
public payload: Uint8Array;
|
||||
|
||||
/**
|
||||
* Encodes the specified Envelope message. Does not implicitly {@link pkg1.Envelope.verify|verify} messages.
|
||||
* @param message Envelope message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: pkg1.IEnvelope, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes an Envelope message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns Envelope
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pkg1.Envelope;
|
||||
|
||||
/**
|
||||
* Gets the default type url for Envelope
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
* @returns The default type url
|
||||
*/
|
||||
public static getTypeUrl(typeUrlPrefix?: string): string;
|
||||
}
|
||||
|
||||
/** Properties of a User. */
|
||||
interface IUser {
|
||||
|
||||
/** User id */
|
||||
id?: (number|null);
|
||||
|
||||
/** User name */
|
||||
name?: (string|null);
|
||||
|
||||
/** User age */
|
||||
age?: (number|null);
|
||||
|
||||
/** User emails */
|
||||
emails?: (string[]|null);
|
||||
}
|
||||
|
||||
/** Represents a User. */
|
||||
class User implements IUser {
|
||||
|
||||
/**
|
||||
* Constructs a new User.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: pkg1.IUser);
|
||||
|
||||
/** User id. */
|
||||
public id: number;
|
||||
|
||||
/** User name. */
|
||||
public name: string;
|
||||
|
||||
/** User age. */
|
||||
public age: number;
|
||||
|
||||
/** User emails. */
|
||||
public emails: string[];
|
||||
|
||||
/**
|
||||
* Encodes the specified User message. Does not implicitly {@link pkg1.User.verify|verify} messages.
|
||||
* @param message User message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: pkg1.IUser, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a User message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns User
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pkg1.User;
|
||||
|
||||
/**
|
||||
* Gets the default type url for User
|
||||
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
* @returns The default type url
|
||||
*/
|
||||
public static getTypeUrl(typeUrlPrefix?: string): string;
|
||||
}
|
||||
}
|
||||
9
assets/scripts/protos/ProtoDefinitions.d.ts.meta
Normal file
9
assets/scripts/protos/ProtoDefinitions.d.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "a0db76a9-1ddf-4988-8aab-b776b060d11c",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
401
assets/scripts/protos/ProtoDefinitions.js
Normal file
401
assets/scripts/protos/ProtoDefinitions.js
Normal file
@@ -0,0 +1,401 @@
|
||||
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
|
||||
"use strict";
|
||||
|
||||
var $protobuf = require("protobufjs/minimal");
|
||||
|
||||
// Common aliases
|
||||
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
||||
|
||||
// Exported root namespace
|
||||
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
|
||||
|
||||
$root.pkg1 = (function() {
|
||||
|
||||
/**
|
||||
* Namespace pkg1.
|
||||
* @exports pkg1
|
||||
* @namespace
|
||||
*/
|
||||
var pkg1 = {};
|
||||
|
||||
pkg1.Bar = (function() {
|
||||
|
||||
/**
|
||||
* Properties of a Bar.
|
||||
* @memberof pkg1
|
||||
* @interface IBar
|
||||
* @property {number|null} [bar] Bar bar
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new Bar.
|
||||
* @memberof pkg1
|
||||
* @classdesc Represents a Bar.
|
||||
* @implements IBar
|
||||
* @constructor
|
||||
* @param {pkg1.IBar=} [properties] Properties to set
|
||||
*/
|
||||
function Bar(properties) {
|
||||
if (properties)
|
||||
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
||||
if (properties[keys[i]] != null)
|
||||
this[keys[i]] = properties[keys[i]];
|
||||
}
|
||||
|
||||
/**
|
||||
* Bar bar.
|
||||
* @member {number} bar
|
||||
* @memberof pkg1.Bar
|
||||
* @instance
|
||||
*/
|
||||
Bar.prototype.bar = 0;
|
||||
|
||||
/**
|
||||
* Encodes the specified Bar message. Does not implicitly {@link pkg1.Bar.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof pkg1.Bar
|
||||
* @static
|
||||
* @param {pkg1.IBar} message Bar message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
Bar.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.bar != null && Object.hasOwnProperty.call(message, "bar"))
|
||||
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.bar);
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a Bar message from the specified reader or buffer.
|
||||
* @function decode
|
||||
* @memberof pkg1.Bar
|
||||
* @static
|
||||
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
||||
* @param {number} [length] Message length if known beforehand
|
||||
* @returns {pkg1.Bar} Bar
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
Bar.decode = function decode(reader, length, error) {
|
||||
if (!(reader instanceof $Reader))
|
||||
reader = $Reader.create(reader);
|
||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pkg1.Bar();
|
||||
while (reader.pos < end) {
|
||||
var tag = reader.uint32();
|
||||
if (tag === error)
|
||||
break;
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
message.bar = reader.int32();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for Bar
|
||||
* @function getTypeUrl
|
||||
* @memberof pkg1.Bar
|
||||
* @static
|
||||
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
* @returns {string} The default type url
|
||||
*/
|
||||
Bar.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
||||
if (typeUrlPrefix === undefined) {
|
||||
typeUrlPrefix = "type.googleapis.com";
|
||||
}
|
||||
return typeUrlPrefix + "/pkg1.Bar";
|
||||
};
|
||||
|
||||
return Bar;
|
||||
})();
|
||||
|
||||
/**
|
||||
* MessageCode enum.
|
||||
* @name pkg1.MessageCode
|
||||
* @enum {number}
|
||||
* @property {number} MSG_UNKNOWN=0 MSG_UNKNOWN value
|
||||
* @property {number} MSG_USER=1001 MSG_USER value
|
||||
* @property {number} MSG_BAR=1002 MSG_BAR value
|
||||
*/
|
||||
pkg1.MessageCode = (function() {
|
||||
var valuesById = {}, values = Object.create(valuesById);
|
||||
values[valuesById[0] = "MSG_UNKNOWN"] = 0;
|
||||
values[valuesById[1001] = "MSG_USER"] = 1001;
|
||||
values[valuesById[1002] = "MSG_BAR"] = 1002;
|
||||
return values;
|
||||
})();
|
||||
|
||||
pkg1.Envelope = (function() {
|
||||
|
||||
/**
|
||||
* Properties of an Envelope.
|
||||
* @memberof pkg1
|
||||
* @interface IEnvelope
|
||||
* @property {number|null} [code] Envelope code
|
||||
* @property {Uint8Array|null} [payload] Envelope payload
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new Envelope.
|
||||
* @memberof pkg1
|
||||
* @classdesc Represents an Envelope.
|
||||
* @implements IEnvelope
|
||||
* @constructor
|
||||
* @param {pkg1.IEnvelope=} [properties] Properties to set
|
||||
*/
|
||||
function Envelope(properties) {
|
||||
if (properties)
|
||||
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
||||
if (properties[keys[i]] != null)
|
||||
this[keys[i]] = properties[keys[i]];
|
||||
}
|
||||
|
||||
/**
|
||||
* Envelope code.
|
||||
* @member {number} code
|
||||
* @memberof pkg1.Envelope
|
||||
* @instance
|
||||
*/
|
||||
Envelope.prototype.code = 0;
|
||||
|
||||
/**
|
||||
* Envelope payload.
|
||||
* @member {Uint8Array} payload
|
||||
* @memberof pkg1.Envelope
|
||||
* @instance
|
||||
*/
|
||||
Envelope.prototype.payload = $util.newBuffer([]);
|
||||
|
||||
/**
|
||||
* Encodes the specified Envelope message. Does not implicitly {@link pkg1.Envelope.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof pkg1.Envelope
|
||||
* @static
|
||||
* @param {pkg1.IEnvelope} message Envelope message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
Envelope.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.code != null && Object.hasOwnProperty.call(message, "code"))
|
||||
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
|
||||
if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
|
||||
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.payload);
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes an Envelope message from the specified reader or buffer.
|
||||
* @function decode
|
||||
* @memberof pkg1.Envelope
|
||||
* @static
|
||||
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
||||
* @param {number} [length] Message length if known beforehand
|
||||
* @returns {pkg1.Envelope} Envelope
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
Envelope.decode = function decode(reader, length, error) {
|
||||
if (!(reader instanceof $Reader))
|
||||
reader = $Reader.create(reader);
|
||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pkg1.Envelope();
|
||||
while (reader.pos < end) {
|
||||
var tag = reader.uint32();
|
||||
if (tag === error)
|
||||
break;
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
message.code = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
message.payload = reader.bytes();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for Envelope
|
||||
* @function getTypeUrl
|
||||
* @memberof pkg1.Envelope
|
||||
* @static
|
||||
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
* @returns {string} The default type url
|
||||
*/
|
||||
Envelope.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
||||
if (typeUrlPrefix === undefined) {
|
||||
typeUrlPrefix = "type.googleapis.com";
|
||||
}
|
||||
return typeUrlPrefix + "/pkg1.Envelope";
|
||||
};
|
||||
|
||||
return Envelope;
|
||||
})();
|
||||
|
||||
pkg1.User = (function() {
|
||||
|
||||
/**
|
||||
* Properties of a User.
|
||||
* @memberof pkg1
|
||||
* @interface IUser
|
||||
* @property {number|null} [id] User id
|
||||
* @property {string|null} [name] User name
|
||||
* @property {number|null} [age] User age
|
||||
* @property {Array.<string>|null} [emails] User emails
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new User.
|
||||
* @memberof pkg1
|
||||
* @classdesc Represents a User.
|
||||
* @implements IUser
|
||||
* @constructor
|
||||
* @param {pkg1.IUser=} [properties] Properties to set
|
||||
*/
|
||||
function User(properties) {
|
||||
this.emails = [];
|
||||
if (properties)
|
||||
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
||||
if (properties[keys[i]] != null)
|
||||
this[keys[i]] = properties[keys[i]];
|
||||
}
|
||||
|
||||
/**
|
||||
* User id.
|
||||
* @member {number} id
|
||||
* @memberof pkg1.User
|
||||
* @instance
|
||||
*/
|
||||
User.prototype.id = 0;
|
||||
|
||||
/**
|
||||
* User name.
|
||||
* @member {string} name
|
||||
* @memberof pkg1.User
|
||||
* @instance
|
||||
*/
|
||||
User.prototype.name = "";
|
||||
|
||||
/**
|
||||
* User age.
|
||||
* @member {number} age
|
||||
* @memberof pkg1.User
|
||||
* @instance
|
||||
*/
|
||||
User.prototype.age = 0;
|
||||
|
||||
/**
|
||||
* User emails.
|
||||
* @member {Array.<string>} emails
|
||||
* @memberof pkg1.User
|
||||
* @instance
|
||||
*/
|
||||
User.prototype.emails = $util.emptyArray;
|
||||
|
||||
/**
|
||||
* Encodes the specified User message. Does not implicitly {@link pkg1.User.verify|verify} messages.
|
||||
* @function encode
|
||||
* @memberof pkg1.User
|
||||
* @static
|
||||
* @param {pkg1.IUser} message User message or plain object to encode
|
||||
* @param {$protobuf.Writer} [writer] Writer to encode to
|
||||
* @returns {$protobuf.Writer} Writer
|
||||
*/
|
||||
User.encode = function encode(message, writer) {
|
||||
if (!writer)
|
||||
writer = $Writer.create();
|
||||
if (message.id != null && Object.hasOwnProperty.call(message, "id"))
|
||||
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
|
||||
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
||||
writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
|
||||
if (message.age != null && Object.hasOwnProperty.call(message, "age"))
|
||||
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.age);
|
||||
if (message.emails != null && message.emails.length)
|
||||
for (var i = 0; i < message.emails.length; ++i)
|
||||
writer.uint32(/* id 4, wireType 2 =*/34).string(message.emails[i]);
|
||||
return writer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes a User message from the specified reader or buffer.
|
||||
* @function decode
|
||||
* @memberof pkg1.User
|
||||
* @static
|
||||
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
||||
* @param {number} [length] Message length if known beforehand
|
||||
* @returns {pkg1.User} User
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
User.decode = function decode(reader, length, error) {
|
||||
if (!(reader instanceof $Reader))
|
||||
reader = $Reader.create(reader);
|
||||
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pkg1.User();
|
||||
while (reader.pos < end) {
|
||||
var tag = reader.uint32();
|
||||
if (tag === error)
|
||||
break;
|
||||
switch (tag >>> 3) {
|
||||
case 1: {
|
||||
message.id = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
message.name = reader.string();
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
message.age = reader.int32();
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
if (!(message.emails && message.emails.length))
|
||||
message.emails = [];
|
||||
message.emails.push(reader.string());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
reader.skipType(tag & 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return message;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the default type url for User
|
||||
* @function getTypeUrl
|
||||
* @memberof pkg1.User
|
||||
* @static
|
||||
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
||||
* @returns {string} The default type url
|
||||
*/
|
||||
User.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
||||
if (typeUrlPrefix === undefined) {
|
||||
typeUrlPrefix = "type.googleapis.com";
|
||||
}
|
||||
return typeUrlPrefix + "/pkg1.User";
|
||||
};
|
||||
|
||||
return User;
|
||||
})();
|
||||
|
||||
return pkg1;
|
||||
})();
|
||||
|
||||
module.exports = $root;
|
||||
9
assets/scripts/protos/ProtoDefinitions.js.meta
Normal file
9
assets/scripts/protos/ProtoDefinitions.js.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "javascript",
|
||||
"imported": true,
|
||||
"uuid": "9aaf0cba-df1f-4a1a-85ba-66f65f4faf2d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user