update proto comments

This commit is contained in:
Asim Aslam
2021-06-15 20:54:19 +01:00
parent 7bd25b926f
commit 4beafd5d3f

View File

@@ -11,34 +11,35 @@ service Currency {
// Rates returns the currency rates for a given code e.g USD // Rates returns the currency rates for a given code e.g USD
message RatesRequest { message RatesRequest {
// The currency code to get rates for // The currency code to get rates for e.g USD
string code = 1; string code = 1;
} }
message RatesResponse { message RatesResponse {
// The code requested e.g USD
string code = 1; string code = 1;
// The rates for the given code // The rates for the given code as key-value pairs code:rate
map<string, double> rates = 2; map<string, double> rates = 2;
} }
// Convert returns the currency conversion rate between two pairs e.g USD/GBP // Convert returns the currency conversion rate between two pairs e.g USD/GBP
message ConvertRequest { message ConvertRequest {
// base code to convert from // base code to convert from e.g USD
string from = 1; string from = 1;
// target code to convert to // target code to convert to e.g GBP
string to = 2; string to = 2;
// optional amoun to convert // optional amount to convert e.g 10.0
double amount = 3; double amount = 3;
} }
message ConvertResponse { message ConvertResponse {
// the base code // the base code e.g USD
string from = 1; string from = 1;
// the target code // the target code e.g GBP
string to = 2; string to = 2;
// conversion rate // conversion rate e.g 0.71
double rate = 3; double rate = 3;
// converted amount if specified // converted amount e.g 7.10
double amount = 4; double amount = 4;
} }