feat(api): implement get memo by uid

This commit is contained in:
Steven
2024-07-11 23:31:50 +08:00
parent 34e938a1e3
commit 1ab2c89408
10 changed files with 1023 additions and 608 deletions

View File

@@ -37,6 +37,11 @@ service MemoService {
option (google.api.http) = {get: "/api/v1/{name=memos/*}"};
option (google.api.method_signature) = "name";
}
// GetMemoByUid gets a memo by uid
rpc GetMemoByUid(GetMemoByUidRequest) returns (Memo) {
option (google.api.http) = {get: "/api/v1/memos:by-uid/{uid}"};
option (google.api.method_signature) = "uid";
}
// UpdateMemo updates a memo.
rpc UpdateMemo(UpdateMemoRequest) returns (Memo) {
option (google.api.http) = {
@@ -254,6 +259,11 @@ message GetMemoRequest {
string name = 1;
}
message GetMemoByUidRequest {
// The uid of the memo.
string uid = 1;
}
message UpdateMemoRequest {
Memo memo = 1;