Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 1 | // Generated GRPC code for FlatBuffers TS *** DO NOT EDIT *** |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 2 | import * as flatbuffers from 'flatbuffers'; |
| 3 | import { Stat as MyGame_Example_Stat } from './my-game/example/stat'; |
| 4 | import { Monster as MyGame_Example_Monster } from './my-game/example/monster'; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 5 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 6 | import * as grpc from '@grpc/grpc-js'; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 7 | |
| 8 | interface IMonsterStorageService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> { |
| 9 | Store: IMonsterStorageService_IStore; |
| 10 | Retrieve: IMonsterStorageService_IRetrieve; |
| 11 | GetMaxHitPoint: IMonsterStorageService_IGetMaxHitPoint; |
| 12 | GetMinMaxHitPoints: IMonsterStorageService_IGetMinMaxHitPoints; |
| 13 | } |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 14 | interface IMonsterStorageService_IStore extends grpc.MethodDefinition<MyGame_Example_Monster, MyGame_Example_Stat> { |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 15 | path: string; // /MyGame.Example.MonsterStorage/Store |
| 16 | requestStream: boolean; // false |
| 17 | responseStream: boolean; // false |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 18 | requestSerialize: grpc.serialize<MyGame_Example_Monster>; |
| 19 | requestDeserialize: grpc.deserialize<MyGame_Example_Monster>; |
| 20 | responseSerialize: grpc.serialize<MyGame_Example_Stat>; |
| 21 | responseDeserialize: grpc.deserialize<MyGame_Example_Stat>; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 22 | } |
| 23 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 24 | interface IMonsterStorageService_IRetrieve extends grpc.MethodDefinition<MyGame_Example_Stat, MyGame_Example_Monster> { |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 25 | path: string; // /MyGame.Example.MonsterStorage/Retrieve |
| 26 | requestStream: boolean; // false |
| 27 | responseStream: boolean; // true |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 28 | requestSerialize: grpc.serialize<MyGame_Example_Stat>; |
| 29 | requestDeserialize: grpc.deserialize<MyGame_Example_Stat>; |
| 30 | responseSerialize: grpc.serialize<MyGame_Example_Monster>; |
| 31 | responseDeserialize: grpc.deserialize<MyGame_Example_Monster>; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 32 | } |
| 33 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 34 | interface IMonsterStorageService_IGetMaxHitPoint extends grpc.MethodDefinition<MyGame_Example_Monster, MyGame_Example_Stat> { |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 35 | path: string; // /MyGame.Example.MonsterStorage/GetMaxHitPoint |
| 36 | requestStream: boolean; // true |
| 37 | responseStream: boolean; // false |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 38 | requestSerialize: grpc.serialize<MyGame_Example_Monster>; |
| 39 | requestDeserialize: grpc.deserialize<MyGame_Example_Monster>; |
| 40 | responseSerialize: grpc.serialize<MyGame_Example_Stat>; |
| 41 | responseDeserialize: grpc.deserialize<MyGame_Example_Stat>; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 42 | } |
| 43 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 44 | interface IMonsterStorageService_IGetMinMaxHitPoints extends grpc.MethodDefinition<MyGame_Example_Monster, MyGame_Example_Stat> { |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 45 | path: string; // /MyGame.Example.MonsterStorage/GetMinMaxHitPoints |
| 46 | requestStream: boolean; // true |
| 47 | responseStream: boolean; // true |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 48 | requestSerialize: grpc.serialize<MyGame_Example_Monster>; |
| 49 | requestDeserialize: grpc.deserialize<MyGame_Example_Monster>; |
| 50 | responseSerialize: grpc.serialize<MyGame_Example_Stat>; |
| 51 | responseDeserialize: grpc.deserialize<MyGame_Example_Stat>; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | |
| 55 | export const MonsterStorageService: IMonsterStorageService; |
| 56 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 57 | export interface IMonsterStorageServer extends grpc.UntypedServiceImplementation { |
| 58 | Store: grpc.handleUnaryCall<MyGame_Example_Monster, MyGame_Example_Stat>; |
| 59 | Retrieve: grpc.handleServerStreamingCall<MyGame_Example_Stat, MyGame_Example_Monster>; |
| 60 | GetMaxHitPoint: grpc.handleClientStreamingCall<MyGame_Example_Monster, MyGame_Example_Stat>; |
| 61 | GetMinMaxHitPoints: grpc.handleBidiStreamingCall<MyGame_Example_Monster, MyGame_Example_Stat>; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | export interface IMonsterStorageClient { |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 65 | Store(request: MyGame_Example_Monster, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Stat) => void): grpc.ClientUnaryCall; |
| 66 | Store(request: MyGame_Example_Monster, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Stat) => void): grpc.ClientUnaryCall; |
| 67 | Store(request: MyGame_Example_Monster, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Stat) => void): grpc.ClientUnaryCall; |
| 68 | Retrieve(request: MyGame_Example_Stat, metadata: grpc.Metadata): grpc.ClientReadableStream<MyGame_Example_Monster>; |
| 69 | Retrieve(request: MyGame_Example_Stat, options: Partial<grpc.CallOptions>): grpc.ClientReadableStream<MyGame_Example_Monster>; |
| 70 | GetMaxHitPoint(callback: (error: grpc.ServiceError | null, response: MyGame_Example_Monster) => void): grpc.ClientWritableStream<MyGame_Example_Stat>; |
| 71 | GetMaxHitPoint(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Monster) => void): grpc.ClientWritableStream<MyGame_Example_Stat>; |
| 72 | GetMaxHitPoint(options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Monster) => void): grpc.ClientWritableStream<MyGame_Example_Stat>; |
| 73 | GetMaxHitPoint(metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Monster) => void): grpc.ClientWritableStream<MyGame_Example_Stat>; |
| 74 | GetMinMaxHitPoints(): grpc.ClientDuplexStream<MyGame_Example_Monster, MyGame_Example_Stat>; |
| 75 | GetMinMaxHitPoints(options: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<MyGame_Example_Monster, MyGame_Example_Stat>; |
| 76 | GetMinMaxHitPoints(metadata: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<MyGame_Example_Monster, MyGame_Example_Stat>; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | export class MonsterStorageClient extends grpc.Client implements IMonsterStorageClient { |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 80 | constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); |
| 81 | public Store(request: MyGame_Example_Monster, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Stat) => void): grpc.ClientUnaryCall; |
| 82 | public Store(request: MyGame_Example_Monster, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Stat) => void): grpc.ClientUnaryCall; |
| 83 | public Store(request: MyGame_Example_Monster, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Stat) => void): grpc.ClientUnaryCall; |
| 84 | public Retrieve(request: MyGame_Example_Stat, metadata: grpc.Metadata): grpc.ClientReadableStream<MyGame_Example_Monster>; |
| 85 | public Retrieve(request: MyGame_Example_Stat, options: Partial<grpc.CallOptions>): grpc.ClientReadableStream<MyGame_Example_Monster>; |
| 86 | public GetMaxHitPoint(callback: (error: grpc.ServiceError | null, response: MyGame_Example_Monster) => void): grpc.ClientWritableStream<MyGame_Example_Stat>; |
| 87 | public GetMaxHitPoint(metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Monster) => void): grpc.ClientWritableStream<MyGame_Example_Stat>; |
| 88 | public GetMaxHitPoint(options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Monster) => void): grpc.ClientWritableStream<MyGame_Example_Stat>; |
| 89 | public GetMaxHitPoint(metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: MyGame_Example_Monster) => void): grpc.ClientWritableStream<MyGame_Example_Stat>; |
| 90 | public GetMinMaxHitPoints(): grpc.ClientDuplexStream<MyGame_Example_Monster, MyGame_Example_Stat>; |
| 91 | public GetMinMaxHitPoints(options: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<MyGame_Example_Monster, MyGame_Example_Stat>; |
| 92 | public GetMinMaxHitPoints(metadata: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<MyGame_Example_Monster, MyGame_Example_Stat>; |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 93 | } |
| 94 | |