Created
January 10, 2017 03:43
-
-
Save dictav/f54628bdb6caecea4159bac82cb4ba1f to your computer and use it in GitHub Desktop.
Protocol Buffer example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax = "proto3"; | |
| package grpcexample; | |
| service GRPCExample { | |
| rpc GetPerson(Request) returns (Person) {} | |
| rpc ListPeople(Request) returns (stream Person) {} | |
| } | |
| message Request { | |
| } | |
| message Person { | |
| string name = 1; | |
| int32 id = 2; | |
| string email = 3; | |
| enum PhoneType { | |
| MOBILE = 0; | |
| HOME = 1; | |
| WORK = 2; | |
| } | |
| message PhoneNumber { | |
| string number = 1; | |
| PhoneType type = 2; | |
| } | |
| repeated PhoneNumber phone = 4; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment