[add] first

This commit is contained in:
2022-04-29 15:25:10 +08:00
commit da8024fc30
87 changed files with 16892 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { uint } from 'tsbuffer-schema';
export interface ReqTest {
a?: uint;
b?: string;
c?: boolean;
d?: Uint8Array;
}
export interface ResTest {
a?: uint;
b?: string;
c?: boolean;
d?: Uint8Array;
}

View File

@@ -0,0 +1,104 @@
import { ServiceProto } from 'tsrpc-proto';
import { ReqTest, ResTest } from './PtlTest'
export interface ServiceType {
api: {
"Test": {
req: ReqTest,
res: ResTest
}
},
msg: {
}
}
export const serviceProto: ServiceProto<ServiceType> = {
"services": [
{
"id": 0,
"name": "Test",
"type": "api"
}
],
"types": {
"PtlTest/ReqTest": {
"type": "Interface",
"properties": [
{
"id": 0,
"name": "a",
"type": {
"type": "Number",
"scalarType": "uint"
},
"optional": true
},
{
"id": 1,
"name": "b",
"type": {
"type": "String"
},
"optional": true
},
{
"id": 2,
"name": "c",
"type": {
"type": "Boolean"
},
"optional": true
},
{
"id": 3,
"name": "d",
"type": {
"type": "Buffer",
"arrayType": "Uint8Array"
},
"optional": true
}
]
},
"PtlTest/ResTest": {
"type": "Interface",
"properties": [
{
"id": 0,
"name": "a",
"type": {
"type": "Number",
"scalarType": "uint"
},
"optional": true
},
{
"id": 1,
"name": "b",
"type": {
"type": "String"
},
"optional": true
},
{
"id": 2,
"name": "c",
"type": {
"type": "Boolean"
},
"optional": true
},
{
"id": 3,
"name": "d",
"type": {
"type": "Buffer",
"arrayType": "Uint8Array"
},
"optional": true
}
]
}
}
};