Skip to content

Instantly share code, notes, and snippets.

@shobhitchittora
Created July 22, 2018 11:22
Show Gist options
  • Save shobhitchittora/5278111be288806b3e404d648fc8148e to your computer and use it in GitHub Desktop.
Save shobhitchittora/5278111be288806b3e404d648fc8148e to your computer and use it in GitHub Desktop.
Protocol Buffer file for Todo App gRPC
/**
* Author - Shobhit Chittora
*/
syntax = "proto3";
package todo_app_package;
service TodoApp {
rpc getTodo (TodoId) returns (Todo) {}
rpc getAll (TodoEmpty) returns (Todos) {}
}
message Todos {
repeated Todo todos = 1;
}
message Todo {
int32 id = 1;
string name = 2;
bool done = 3;
}
message TodoId {
int32 id = 1;
}
message TodoEmpty {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment