Created
March 21, 2020 17:57
-
-
Save jefferyshivers/6645bda55872b493ff1f744926d0a880 to your computer and use it in GitHub Desktop.
Example proto file for a simple Money service
This file contains 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 awesomelabs.numbers; | |
service MoneyService { | |
rpc Convert(ConvertMoneyRequest) returns (Money); | |
} | |
enum Currency { | |
USD = 0; | |
EUR = 1; | |
CAD = 2; | |
MXN = 3; | |
} | |
message Money { | |
Currency currency = 1; | |
double units = 2; | |
} | |
message ConvertMoneyRequest { | |
Money original = 1; | |
Currency target_currency = 2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment