refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
syntax = "proto3";
|
||||
package cloud;
|
||||
option go_package = ".;cloud";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/base/cloud/pb;cloud";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 笔记服务
|
||||
service Note {
|
||||
// 创建笔记
|
||||
rpc CreateNote(CreateNoteRequest) returns (StatusReply);
|
||||
rpc CreateNote(CreateNoteRequest) returns (blocks.StatusReply);
|
||||
// 获取笔记详情
|
||||
rpc GetNote(IdentRequest) returns (CloudNoteItem);
|
||||
rpc GetNote(blocks.IdentRequest) returns (CloudNoteItem);
|
||||
// 更新笔记
|
||||
rpc UpdateNote(CloudNoteItem) returns (StatusReply);
|
||||
rpc UpdateNote(CloudNoteItem) returns (blocks.StatusReply);
|
||||
// 删除笔记
|
||||
rpc DeleteNote(IdentRequest) returns (StatusReply);
|
||||
rpc DeleteNote(blocks.IdentRequest) returns (blocks.StatusReply);
|
||||
// 获取笔记列表
|
||||
rpc ListNotes(FetchRequest) returns (ListNotesResponse);
|
||||
rpc ListNotes(blocks.FetchRequest) returns (ListNotesResponse);
|
||||
// 置顶/取消置顶笔记
|
||||
rpc TogglePin(TogglePinRequest) returns (StatusReply);
|
||||
rpc TogglePin(TogglePinRequest) returns (blocks.StatusReply);
|
||||
// 增加浏览次数
|
||||
rpc IncrementViews(IdentRequest) returns (StatusReply);
|
||||
rpc IncrementViews(blocks.IdentRequest) returns (blocks.StatusReply);
|
||||
// 搜索笔记
|
||||
rpc SearchNotes(FetchRequest) returns (ListNotesResponse);
|
||||
rpc SearchNotes(blocks.FetchRequest) returns (ListNotesResponse);
|
||||
|
||||
// 上传附件
|
||||
rpc InsertAttachment(NoteAttachmentItem) returns (StatusReply);
|
||||
rpc InsertAttachment(NoteAttachmentItem) returns (blocks.StatusReply);
|
||||
// 删除附件
|
||||
rpc DeleteAttachment(IdentRequest) returns (StatusReply);
|
||||
rpc DeleteAttachment(blocks.IdentRequest) returns (blocks.StatusReply);
|
||||
}
|
||||
|
||||
// 请求消息定义
|
||||
@@ -66,7 +66,7 @@ message CloudNoteItem {
|
||||
int32 views = 10; // 浏览次数
|
||||
string created_at = 11;
|
||||
string updated_at = 12;
|
||||
|
||||
|
||||
// 关联关系
|
||||
repeated NoteAttachmentItem attachments = 13;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user