Skip to content

Instantly share code, notes, and snippets.

@foolusion
Created January 1, 2017 01:34
Show Gist options
  • Save foolusion/a28b496005c737ff3f769cb6be372e41 to your computer and use it in GitHub Desktop.
Save foolusion/a28b496005c737ff3f769cb6be372e41 to your computer and use it in GitHub Desktop.
good idea or bad idea
syntax = "proto3";
import "google/api/annotations.proto";
package dsproto;
service Admin {
rpc Set (SetMessage) returns (ValueResponse) {
option (google.api.http) = {
post: "/v1/dsproto/set"
body: "*"
};
rpc Get (GetMessage) returns (ValueResponse) {
option (google.api.http) = {
post: "/v1/dsproto/get"
body: "*"
};
}
}
service Read {
rpc Get (GetMessage) returns (ValueResponse) {
option (google.api.http) = {
post: "/v1/dsproto/get"
body: "*"
};
}
}
message SetMessage {
string Key = 1;
bytes Value = 2;
}
message ValueResponse {
bytes Result = 1;
}
message GetMessage {
string Key = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment