Skip to content

Instantly share code, notes, and snippets.

@jinqian
Created December 9, 2019 10:13
Show Gist options
  • Save jinqian/b713e34d913db5b5276c803b40d1fe81 to your computer and use it in GitHub Desktop.
Save jinqian/b713e34d913db5b5276c803b40d1fe81 to your computer and use it in GitHub Desktop.
pokedex.proto
syntax = "proto3";
option java_multiple_files = true;
option java_package = "fr.xebia.hellogrpc";
option java_outer_classname = "PokedexProto";
option objc_class_prefix = "PD";
package pokedex;
service Pokedex {
// get information of a Pokémon in French
rpc GetPokemon (PokedexRequest) returns (PokedexReply) {}
}
// The request message containing the Pokémon's English name.
message PokedexRequest {
string englishName = 1;
}
// The response message containing the Pokémon's information in French
message PokedexReply {
int32 id = 1;
string frenchName = 2;
string type = 3;
string imageUrl = 4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment