mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
48 lines
844 B
Protocol Buffer
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;
|
|
} |