Files
services/notes/proto/notes.proto
ben-toogood 25993c656a Notes Service (#12)
* Notes Service

* go mod tidy

* go mod tidy
2020-10-16 13:13:18 +01:00

48 lines
844 B
Protocol Buffer

syntax = "proto3";
package notes;
option go_package = "github.com/micro/services/notes/proto;notes";
service Notes {
rpc List(ListRequest) returns (ListResponse);
rpc Create(CreateRequest) returns (CreateResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Update(UpdateRequest) returns (UpdateResponse);
rpc UpdateStream(stream UpdateRequest) returns (UpdateResponse);
}
message Note {
string id = 1;
int64 created = 2;
string title = 3;
string text = 4;
}
message CreateRequest {
string title = 1;
string text = 2;
}
message CreateResponse {
string id = 1;
}
message UpdateRequest {
string id = 1;
string title = 2;
string text = 3;
}
message UpdateResponse {}
message DeleteRequest {
string id = 1;
}
message DeleteResponse {}
message ListRequest {}
message ListResponse {
repeated Note notes = 1;
}