mirror of
https://github.com/foomo/gotsrpc.git
synced 2025-10-16 12:35:35 +00:00
22 lines
1.3 KiB
TypeScript
22 lines
1.3 KiB
TypeScript
/* eslint:disable */
|
|
// Code generated by gotsrpc https://github.com/foomo/gotsrpc/v2 - DO NOT EDIT.
|
|
import * as github_com_foomo_gotsrpc_v2_example_union_service from './service-vo'; // ./client/src/service-client.ts to ./client/src/service-vo.ts
|
|
|
|
export class ServiceClient {
|
|
public static defaultEndpoint = "/service";
|
|
constructor(
|
|
public transport:<T>(method: string, data?: any[]) => Promise<T>
|
|
) {}
|
|
async inlineStruct():Promise<github_com_foomo_gotsrpc_v2_example_union_service.InlineStruct> {
|
|
return (await this.transport<{0:github_com_foomo_gotsrpc_v2_example_union_service.InlineStruct}>("InlineStruct", []))[0]
|
|
}
|
|
async inlineStructPtr():Promise<github_com_foomo_gotsrpc_v2_example_union_service.InlineStructPtr> {
|
|
return (await this.transport<{0:github_com_foomo_gotsrpc_v2_example_union_service.InlineStructPtr}>("InlineStructPtr", []))[0]
|
|
}
|
|
async unionString():Promise<github_com_foomo_gotsrpc_v2_example_union_service.UnionString> {
|
|
return (await this.transport<{0:github_com_foomo_gotsrpc_v2_example_union_service.UnionString}>("UnionString", []))[0]
|
|
}
|
|
async unionStruct():Promise<github_com_foomo_gotsrpc_v2_example_union_service.UnionStruct> {
|
|
return (await this.transport<{0:github_com_foomo_gotsrpc_v2_example_union_service.UnionStruct}>("UnionStruct", []))[0]
|
|
}
|
|
} |