Files
frp-panel/www/lib/pb/api_user.ts
VaalaCat 3e5bec4355 feat: support client plugin and proxy can be stopped
feat: i18n parser

i18n: translate

feat: add github proxy url
2025-05-02 09:38:33 +00:00

462 lines
21 KiB
TypeScript

// @generated by protobuf-ts 2.9.3
// @generated from protobuf file "api_user.proto" (package "api_user", syntax proto3)
// tslint:disable
import { WireType } from "@protobuf-ts/runtime";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { User } from "./common";
import { Status } from "./common";
/**
* @generated from protobuf message api_user.GetUserInfoRequest
*/
export interface GetUserInfoRequest {
}
/**
* @generated from protobuf message api_user.GetUserInfoResponse
*/
export interface GetUserInfoResponse {
/**
* @generated from protobuf field: optional common.Status status = 1;
*/
status?: Status;
/**
* @generated from protobuf field: optional common.User user_info = 2;
*/
userInfo?: User;
}
/**
* @generated from protobuf message api_user.UpdateUserInfoRequest
*/
export interface UpdateUserInfoRequest {
/**
* @generated from protobuf field: optional common.User user_info = 1;
*/
userInfo?: User;
}
/**
* @generated from protobuf message api_user.UpdateUserInfoResponse
*/
export interface UpdateUserInfoResponse {
/**
* @generated from protobuf field: optional common.Status status = 1;
*/
status?: Status;
}
/**
* @generated from protobuf message api_user.GetPlatformInfoRequest
*/
export interface GetPlatformInfoRequest {
}
/**
* @generated from protobuf message api_user.GetPlatformInfoResponse
*/
export interface GetPlatformInfoResponse {
/**
* @generated from protobuf field: optional common.Status status = 1;
*/
status?: Status;
/**
* @generated from protobuf field: int32 total_client_count = 2;
*/
totalClientCount: number;
/**
* @generated from protobuf field: int32 total_server_count = 3;
*/
totalServerCount: number;
/**
* @generated from protobuf field: int32 unconfigured_client_count = 4;
*/
unconfiguredClientCount: number;
/**
* @generated from protobuf field: int32 unconfigured_server_count = 5;
*/
unconfiguredServerCount: number;
/**
* @generated from protobuf field: int32 configured_client_count = 6;
*/
configuredClientCount: number;
/**
* @generated from protobuf field: int32 configured_server_count = 7;
*/
configuredServerCount: number;
/**
* @generated from protobuf field: string master_rpc_host = 8;
*/
masterRpcHost: string;
/**
* @generated from protobuf field: int32 master_rpc_port = 9;
*/
masterRpcPort: number;
/**
* @generated from protobuf field: int32 master_api_port = 10;
*/
masterApiPort: number;
/**
* @generated from protobuf field: string master_api_scheme = 11;
*/
masterApiScheme: string;
/**
* @generated from protobuf field: string client_rpc_url = 12;
*/
clientRpcUrl: string;
/**
* @generated from protobuf field: string client_api_url = 13;
*/
clientApiUrl: string;
/**
* @generated from protobuf field: string github_proxy_url = 14;
*/
githubProxyUrl: string;
}
// @generated message type with reflection information, may provide speed optimized methods
class GetUserInfoRequest$Type extends MessageType<GetUserInfoRequest> {
constructor() {
super("api_user.GetUserInfoRequest", []);
}
create(value?: PartialMessage<GetUserInfoRequest>): GetUserInfoRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<GetUserInfoRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserInfoRequest): GetUserInfoRequest {
return target ?? this.create();
}
internalBinaryWrite(message: GetUserInfoRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_user.GetUserInfoRequest
*/
export const GetUserInfoRequest = new GetUserInfoRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetUserInfoResponse$Type extends MessageType<GetUserInfoResponse> {
constructor() {
super("api_user.GetUserInfoResponse", [
{ no: 1, name: "status", kind: "message", T: () => Status },
{ no: 2, name: "user_info", kind: "message", T: () => User }
]);
}
create(value?: PartialMessage<GetUserInfoResponse>): GetUserInfoResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<GetUserInfoResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserInfoResponse): GetUserInfoResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional common.Status status */ 1:
message.status = Status.internalBinaryRead(reader, reader.uint32(), options, message.status);
break;
case /* optional common.User user_info */ 2:
message.userInfo = User.internalBinaryRead(reader, reader.uint32(), options, message.userInfo);
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: GetUserInfoResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional common.Status status = 1; */
if (message.status)
Status.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* optional common.User user_info = 2; */
if (message.userInfo)
User.internalBinaryWrite(message.userInfo, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_user.GetUserInfoResponse
*/
export const GetUserInfoResponse = new GetUserInfoResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateUserInfoRequest$Type extends MessageType<UpdateUserInfoRequest> {
constructor() {
super("api_user.UpdateUserInfoRequest", [
{ no: 1, name: "user_info", kind: "message", T: () => User }
]);
}
create(value?: PartialMessage<UpdateUserInfoRequest>): UpdateUserInfoRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<UpdateUserInfoRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUserInfoRequest): UpdateUserInfoRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional common.User user_info */ 1:
message.userInfo = User.internalBinaryRead(reader, reader.uint32(), options, message.userInfo);
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: UpdateUserInfoRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional common.User user_info = 1; */
if (message.userInfo)
User.internalBinaryWrite(message.userInfo, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_user.UpdateUserInfoRequest
*/
export const UpdateUserInfoRequest = new UpdateUserInfoRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateUserInfoResponse$Type extends MessageType<UpdateUserInfoResponse> {
constructor() {
super("api_user.UpdateUserInfoResponse", [
{ no: 1, name: "status", kind: "message", T: () => Status }
]);
}
create(value?: PartialMessage<UpdateUserInfoResponse>): UpdateUserInfoResponse {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<UpdateUserInfoResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUserInfoResponse): UpdateUserInfoResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional common.Status status */ 1:
message.status = Status.internalBinaryRead(reader, reader.uint32(), options, message.status);
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: UpdateUserInfoResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional common.Status status = 1; */
if (message.status)
Status.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_user.UpdateUserInfoResponse
*/
export const UpdateUserInfoResponse = new UpdateUserInfoResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetPlatformInfoRequest$Type extends MessageType<GetPlatformInfoRequest> {
constructor() {
super("api_user.GetPlatformInfoRequest", []);
}
create(value?: PartialMessage<GetPlatformInfoRequest>): GetPlatformInfoRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<GetPlatformInfoRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPlatformInfoRequest): GetPlatformInfoRequest {
return target ?? this.create();
}
internalBinaryWrite(message: GetPlatformInfoRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_user.GetPlatformInfoRequest
*/
export const GetPlatformInfoRequest = new GetPlatformInfoRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetPlatformInfoResponse$Type extends MessageType<GetPlatformInfoResponse> {
constructor() {
super("api_user.GetPlatformInfoResponse", [
{ no: 1, name: "status", kind: "message", T: () => Status },
{ no: 2, name: "total_client_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 3, name: "total_server_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 4, name: "unconfigured_client_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 5, name: "unconfigured_server_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 6, name: "configured_client_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 7, name: "configured_server_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 8, name: "master_rpc_host", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 9, name: "master_rpc_port", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 10, name: "master_api_port", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 11, name: "master_api_scheme", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 12, name: "client_rpc_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 13, name: "client_api_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 14, name: "github_proxy_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<GetPlatformInfoResponse>): GetPlatformInfoResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.totalClientCount = 0;
message.totalServerCount = 0;
message.unconfiguredClientCount = 0;
message.unconfiguredServerCount = 0;
message.configuredClientCount = 0;
message.configuredServerCount = 0;
message.masterRpcHost = "";
message.masterRpcPort = 0;
message.masterApiPort = 0;
message.masterApiScheme = "";
message.clientRpcUrl = "";
message.clientApiUrl = "";
message.githubProxyUrl = "";
if (value !== undefined)
reflectionMergePartial<GetPlatformInfoResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetPlatformInfoResponse): GetPlatformInfoResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional common.Status status */ 1:
message.status = Status.internalBinaryRead(reader, reader.uint32(), options, message.status);
break;
case /* int32 total_client_count */ 2:
message.totalClientCount = reader.int32();
break;
case /* int32 total_server_count */ 3:
message.totalServerCount = reader.int32();
break;
case /* int32 unconfigured_client_count */ 4:
message.unconfiguredClientCount = reader.int32();
break;
case /* int32 unconfigured_server_count */ 5:
message.unconfiguredServerCount = reader.int32();
break;
case /* int32 configured_client_count */ 6:
message.configuredClientCount = reader.int32();
break;
case /* int32 configured_server_count */ 7:
message.configuredServerCount = reader.int32();
break;
case /* string master_rpc_host */ 8:
message.masterRpcHost = reader.string();
break;
case /* int32 master_rpc_port */ 9:
message.masterRpcPort = reader.int32();
break;
case /* int32 master_api_port */ 10:
message.masterApiPort = reader.int32();
break;
case /* string master_api_scheme */ 11:
message.masterApiScheme = reader.string();
break;
case /* string client_rpc_url */ 12:
message.clientRpcUrl = reader.string();
break;
case /* string client_api_url */ 13:
message.clientApiUrl = reader.string();
break;
case /* string github_proxy_url */ 14:
message.githubProxyUrl = reader.string();
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: GetPlatformInfoResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional common.Status status = 1; */
if (message.status)
Status.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* int32 total_client_count = 2; */
if (message.totalClientCount !== 0)
writer.tag(2, WireType.Varint).int32(message.totalClientCount);
/* int32 total_server_count = 3; */
if (message.totalServerCount !== 0)
writer.tag(3, WireType.Varint).int32(message.totalServerCount);
/* int32 unconfigured_client_count = 4; */
if (message.unconfiguredClientCount !== 0)
writer.tag(4, WireType.Varint).int32(message.unconfiguredClientCount);
/* int32 unconfigured_server_count = 5; */
if (message.unconfiguredServerCount !== 0)
writer.tag(5, WireType.Varint).int32(message.unconfiguredServerCount);
/* int32 configured_client_count = 6; */
if (message.configuredClientCount !== 0)
writer.tag(6, WireType.Varint).int32(message.configuredClientCount);
/* int32 configured_server_count = 7; */
if (message.configuredServerCount !== 0)
writer.tag(7, WireType.Varint).int32(message.configuredServerCount);
/* string master_rpc_host = 8; */
if (message.masterRpcHost !== "")
writer.tag(8, WireType.LengthDelimited).string(message.masterRpcHost);
/* int32 master_rpc_port = 9; */
if (message.masterRpcPort !== 0)
writer.tag(9, WireType.Varint).int32(message.masterRpcPort);
/* int32 master_api_port = 10; */
if (message.masterApiPort !== 0)
writer.tag(10, WireType.Varint).int32(message.masterApiPort);
/* string master_api_scheme = 11; */
if (message.masterApiScheme !== "")
writer.tag(11, WireType.LengthDelimited).string(message.masterApiScheme);
/* string client_rpc_url = 12; */
if (message.clientRpcUrl !== "")
writer.tag(12, WireType.LengthDelimited).string(message.clientRpcUrl);
/* string client_api_url = 13; */
if (message.clientApiUrl !== "")
writer.tag(13, WireType.LengthDelimited).string(message.clientApiUrl);
/* string github_proxy_url = 14; */
if (message.githubProxyUrl !== "")
writer.tag(14, WireType.LengthDelimited).string(message.githubProxyUrl);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api_user.GetPlatformInfoResponse
*/
export const GetPlatformInfoResponse = new GetPlatformInfoResponse$Type();