UNPKG

auto-traffic-control

Version:

A video game for programmers about air traffic control

78 lines (65 loc) 2.81 kB
// GENERATED CODE -- DO NOT EDIT! 'use strict'; var grpc = require('@grpc/grpc-js'); var atc_v1_game_pb = require('../../atc/v1/game_pb.js'); function serialize_atc_v1_GetGameStateRequest(arg) { if (!(arg instanceof atc_v1_game_pb.GetGameStateRequest)) { throw new Error('Expected argument of type atc.v1.GetGameStateRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_atc_v1_GetGameStateRequest(buffer_arg) { return atc_v1_game_pb.GetGameStateRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_atc_v1_GetGameStateResponse(arg) { if (!(arg instanceof atc_v1_game_pb.GetGameStateResponse)) { throw new Error('Expected argument of type atc.v1.GetGameStateResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_atc_v1_GetGameStateResponse(buffer_arg) { return atc_v1_game_pb.GetGameStateResponse.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_atc_v1_StartGameRequest(arg) { if (!(arg instanceof atc_v1_game_pb.StartGameRequest)) { throw new Error('Expected argument of type atc.v1.StartGameRequest'); } return Buffer.from(arg.serializeBinary()); } function deserialize_atc_v1_StartGameRequest(buffer_arg) { return atc_v1_game_pb.StartGameRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_atc_v1_StartGameResponse(arg) { if (!(arg instanceof atc_v1_game_pb.StartGameResponse)) { throw new Error('Expected argument of type atc.v1.StartGameResponse'); } return Buffer.from(arg.serializeBinary()); } function deserialize_atc_v1_StartGameResponse(buffer_arg) { return atc_v1_game_pb.StartGameResponse.deserializeBinary(new Uint8Array(buffer_arg)); } var GameServiceService = exports.GameServiceService = { getGameState: { path: '/atc.v1.GameService/GetGameState', requestStream: false, responseStream: false, requestType: atc_v1_game_pb.GetGameStateRequest, responseType: atc_v1_game_pb.GetGameStateResponse, requestSerialize: serialize_atc_v1_GetGameStateRequest, requestDeserialize: deserialize_atc_v1_GetGameStateRequest, responseSerialize: serialize_atc_v1_GetGameStateResponse, responseDeserialize: deserialize_atc_v1_GetGameStateResponse, }, startGame: { path: '/atc.v1.GameService/StartGame', requestStream: false, responseStream: false, requestType: atc_v1_game_pb.StartGameRequest, responseType: atc_v1_game_pb.StartGameResponse, requestSerialize: serialize_atc_v1_StartGameRequest, requestDeserialize: deserialize_atc_v1_StartGameRequest, responseSerialize: serialize_atc_v1_StartGameResponse, responseDeserialize: deserialize_atc_v1_StartGameResponse, }, }; exports.GameServiceClient = grpc.makeGenericClientConstructor(GameServiceService);