Compare commits
2 Commits
1ff3a56ef3
...
55b7945dc1
Author | SHA1 | Date | |
---|---|---|---|
55b7945dc1 | |||
9135bc9c88 |
@ -379,7 +379,7 @@
|
||||
| `name` | `str` | 用户显示名 |
|
||||
| `passwd` | `u8[32]` | 用户密码的加盐 SHA256 摘要值 |
|
||||
| `totp_key` | `u8[20]` | 用户的时间性一次性口令的秘钥 |
|
||||
| `creation_time` | `DateTime` | 账户创建时间 |
|
||||
| `created_at` | `DateTime` | 账户创建时间 |
|
||||
| `rating` | `i32` | 用户的等级分 |
|
||||
| `preference` | `AccountPreference` | 用户的偏好设置 |
|
||||
| `replays` | `uuid[]` | 用户参与的比赛回放的全局唯一标识符列表 |
|
||||
|
15
shared/apc/index.mjs
Normal file
15
shared/apc/index.mjs
Normal file
@ -0,0 +1,15 @@
|
||||
import { Buffer } from 'buffer';
|
||||
|
||||
export class AsyncProcedureCallEndpoint {
|
||||
/**
|
||||
* Constructs an AsyncProcedureCallEndpoint object.
|
||||
* @param {any} input - stream of data sent by remote.
|
||||
* @param {any} output - stream of data to send to remote.
|
||||
*/
|
||||
constructor(input, output) {
|
||||
this.buf = Buffer();
|
||||
input.ondata = () => {
|
||||
|
||||
};
|
||||
}
|
||||
};
|
11
shared/apc/package.json
Normal file
11
shared/apc/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@og/async-procedure-call",
|
||||
"type": "module",
|
||||
"main": "index.mjs",
|
||||
"dependencies": {
|
||||
"buffer": "^6.0.3",
|
||||
"@og/error-utils": "file:../error-utils",
|
||||
"@og/uuid": "file:../uuid",
|
||||
"@og/binary-struct": "file:../bstruct"
|
||||
}
|
||||
}
|
@ -9,3 +9,15 @@ export class VirtualMethodNotImplementedError extends Error {
|
||||
super('virtual method not implemented.');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Represents an error that is thrown when called a function with invalid arguments.
|
||||
* @class
|
||||
* @extends {Error}
|
||||
*/
|
||||
export class InvalidArgumentError extends Error {
|
||||
/** @constructor */
|
||||
constructor(name, reason) {
|
||||
super(`argument ${name} is invalid: ${reason}.`);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user