Skip to content

Instantly share code, notes, and snippets.

@daneshk
Created February 9, 2018 14:32
Show Gist options
  • Save daneshk/45c656f8ee9c98ad6f36df143c364beb to your computer and use it in GitHub Desktop.
Save daneshk/45c656f8ee9c98ad6f36df143c364beb to your computer and use it in GitHub Desktop.
syntax = "proto3";
package org.ballerinalang.net.grpc.stockquote;
service StockQuoteService {
rpc getQuotes(org.ballerinalang.net.grpc.stockquote.Void) returns (org.ballerinalang.net.grpc.stockquote.StockQuotes);
rpc addStock(org.ballerinalang.net.grpc.stockquote.StockQuote) returns (org.ballerinalang.net.grpc.stockquote.Void);
rpc getQuote(org.ballerinalang.net.grpc.stockquote.StockRequest) returns (org.ballerinalang.net.grpc.stockquote.StockQuote);
rpc getNames(org.ballerinalang.net.grpc.stockquote.Void) returns (org.ballerinalang.net.grpc.stockquote.StockNames);
}
message Void {
}
message StockQuotes {
repeated StockQuote stock = 1;
}
message StockQuote {
string symbol = 1;
string name = 2;
float last = 3;
float low = 4;
float high = 5;
}
message StockRequest {
string name = 1;
}
message StockNames {
repeated string names = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment