Skip to content

Instantly share code, notes, and snippets.

@gosharplite
Created October 13, 2016 05:48
Show Gist options
  • Save gosharplite/c4506e159fa560ada41c1af23022b8bf to your computer and use it in GitHub Desktop.
Save gosharplite/c4506e159fa560ada41c1af23022b8bf to your computer and use it in GitHub Desktop.
// Use the protocol buffer compiler to generate client and server code.
// $ protoc --go_out=plugins=grpc:. mongo.proto
syntax = "proto3";
package mongo;
service Mongo {
rpc echo(content) returns (content) {}
rpc entry(request) returns (response) {}
rpc DocumentSave(request) returns (response) {}
rpc DocumentRead(request) returns (response) {}
rpc DocumentDelete(request) returns (response) {}
rpc PasswordGet(request) returns (response) {}
rpc PasswordSet(request) returns (response) {}
rpc PasswordRemove(request) returns (response) {}
}
message content {
bytes body = 1;
map<string, string> headers = 2;
}
message request {
bytes body = 5;
map<string, string> headers = 6;
}
message response {
bytes body = 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment