feat: add summary

This commit is contained in:
Tylone-zx
2024-07-14 14:37:40 +08:00
committed by Vaala Cat
parent 1ef81d9d48
commit e619fbf327
44 changed files with 1851 additions and 374 deletions

View File

@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.3
// @generated by protobuf-ts 2.9.4
// @generated from protobuf file "common.proto" (package "common", syntax proto3)
// tslint:disable
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -128,6 +128,43 @@ export interface User {
*/
rawPassword?: string;
}
/**
* @generated from protobuf message common.ProxyInfo
*/
export interface ProxyInfo {
/**
* @generated from protobuf field: optional string name = 1;
*/
name?: string;
/**
* @generated from protobuf field: optional string type = 2;
*/
type?: string;
/**
* @generated from protobuf field: optional string client_id = 3;
*/
clientId?: string;
/**
* @generated from protobuf field: optional string server_id = 4;
*/
serverId?: string;
/**
* @generated from protobuf field: optional int64 today_traffic_in = 5;
*/
todayTrafficIn?: bigint;
/**
* @generated from protobuf field: optional int64 today_traffic_out = 6;
*/
todayTrafficOut?: bigint;
/**
* @generated from protobuf field: optional int64 history_traffic_in = 7;
*/
historyTrafficIn?: bigint;
/**
* @generated from protobuf field: optional int64 history_traffic_out = 8;
*/
historyTrafficOut?: bigint;
}
/**
* @generated from protobuf enum common.RespCode
*/
@@ -554,3 +591,98 @@ class User$Type extends MessageType<User> {
* @generated MessageType for protobuf message common.User
*/
export const User = new User$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ProxyInfo$Type extends MessageType<ProxyInfo> {
constructor() {
super("common.ProxyInfo", [
{ no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "client_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "server_id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "today_traffic_in", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 6, name: "today_traffic_out", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 7, name: "history_traffic_in", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 8, name: "history_traffic_out", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<ProxyInfo>): ProxyInfo {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ProxyInfo>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ProxyInfo): ProxyInfo {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional string name */ 1:
message.name = reader.string();
break;
case /* optional string type */ 2:
message.type = reader.string();
break;
case /* optional string client_id */ 3:
message.clientId = reader.string();
break;
case /* optional string server_id */ 4:
message.serverId = reader.string();
break;
case /* optional int64 today_traffic_in */ 5:
message.todayTrafficIn = reader.int64().toBigInt();
break;
case /* optional int64 today_traffic_out */ 6:
message.todayTrafficOut = reader.int64().toBigInt();
break;
case /* optional int64 history_traffic_in */ 7:
message.historyTrafficIn = reader.int64().toBigInt();
break;
case /* optional int64 history_traffic_out */ 8:
message.historyTrafficOut = reader.int64().toBigInt();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message: ProxyInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional string name = 1; */
if (message.name !== undefined)
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* optional string type = 2; */
if (message.type !== undefined)
writer.tag(2, WireType.LengthDelimited).string(message.type);
/* optional string client_id = 3; */
if (message.clientId !== undefined)
writer.tag(3, WireType.LengthDelimited).string(message.clientId);
/* optional string server_id = 4; */
if (message.serverId !== undefined)
writer.tag(4, WireType.LengthDelimited).string(message.serverId);
/* optional int64 today_traffic_in = 5; */
if (message.todayTrafficIn !== undefined)
writer.tag(5, WireType.Varint).int64(message.todayTrafficIn);
/* optional int64 today_traffic_out = 6; */
if (message.todayTrafficOut !== undefined)
writer.tag(6, WireType.Varint).int64(message.todayTrafficOut);
/* optional int64 history_traffic_in = 7; */
if (message.historyTrafficIn !== undefined)
writer.tag(7, WireType.Varint).int64(message.historyTrafficIn);
/* optional int64 history_traffic_out = 8; */
if (message.historyTrafficOut !== undefined)
writer.tag(8, WireType.Varint).int64(message.historyTrafficOut);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message common.ProxyInfo
*/
export const ProxyInfo = new ProxyInfo$Type();