Skip to content

Instantly share code, notes, and snippets.

@jefferyshivers
Created March 21, 2020 17:57
Show Gist options
  • Save jefferyshivers/6645bda55872b493ff1f744926d0a880 to your computer and use it in GitHub Desktop.
Save jefferyshivers/6645bda55872b493ff1f744926d0a880 to your computer and use it in GitHub Desktop.
Example proto file for a simple Money service
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