refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,35 +1,35 @@
|
||||
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 Album {
|
||||
// 创建相册
|
||||
rpc CreateAlbum(CreateAlbumRequest) returns (StatusReply);
|
||||
rpc CreateAlbum(CreateAlbumRequest) returns (blocks.StatusReply);
|
||||
// 获取相册详情
|
||||
rpc GetAlbum(IdentRequest) returns (CloudAlbumItem);
|
||||
rpc GetAlbum(blocks.IdentRequest) returns (CloudAlbumItem);
|
||||
// 更新相册
|
||||
rpc UpdateAlbum(CloudAlbumItem) returns (StatusReply);
|
||||
rpc UpdateAlbum(CloudAlbumItem) returns (blocks.StatusReply);
|
||||
// 删除相册
|
||||
rpc DeleteAlbum(IdentRequest) returns (StatusReply);
|
||||
rpc DeleteAlbum(blocks.IdentRequest) returns (blocks.StatusReply);
|
||||
// 获取相册列表
|
||||
rpc ListAlbums(FetchRequest) returns (ListAlbumsResponse);
|
||||
rpc ListAlbums(blocks.FetchRequest) returns (ListAlbumsResponse);
|
||||
// 设置封面照片
|
||||
rpc SetCoverPhoto(SetCoverPhotoRequest) returns (StatusReply);
|
||||
rpc SetCoverPhoto(SetCoverPhotoRequest) returns (blocks.StatusReply);
|
||||
|
||||
// 上传照片
|
||||
rpc UploadPhoto(CloudPhotoItem) returns (StatusReply);
|
||||
rpc UploadPhoto(CloudPhotoItem) returns (blocks.StatusReply);
|
||||
// 获取照片详情
|
||||
rpc GetPhoto(IdentRequest) returns (CloudPhotoItem);
|
||||
rpc GetPhoto(blocks.IdentRequest) returns (CloudPhotoItem);
|
||||
// 更新照片
|
||||
rpc UpdatePhoto(CloudPhotoItem) returns (StatusReply);
|
||||
rpc UpdatePhoto(CloudPhotoItem) returns (blocks.StatusReply);
|
||||
// 删除照片
|
||||
rpc DeletePhoto(IdentRequest) returns (StatusReply);
|
||||
rpc DeletePhoto(blocks.IdentRequest) returns (blocks.StatusReply);
|
||||
// 获取照片列表
|
||||
rpc ListPhotos(FetchRequest) returns (ListPhotosResponse);
|
||||
rpc ListPhotos(blocks.FetchRequest) returns (ListPhotosResponse);
|
||||
// 移动照片到其他相册
|
||||
rpc MovePhoto(MovePhotoRequest) returns (StatusReply);
|
||||
rpc MovePhoto(MovePhotoRequest) returns (blocks.StatusReply);
|
||||
}
|
||||
|
||||
// 请求消息定义
|
||||
@@ -62,7 +62,7 @@ message CloudAlbumItem {
|
||||
bool is_private = 6; // 是否私有
|
||||
string created_at = 7;
|
||||
string updated_at = 8;
|
||||
|
||||
|
||||
// 关联关系
|
||||
repeated CloudPhotoItem photos = 9; // 相册下的照片
|
||||
}
|
||||
@@ -96,7 +96,7 @@ message CloudPhotoItem {
|
||||
string tags = 13; // 标签,逗号分隔
|
||||
string created_at = 14;
|
||||
string updated_at = 15;
|
||||
|
||||
|
||||
// 关联关系
|
||||
CloudAlbumItem album = 16;
|
||||
}
|
||||
Reference in New Issue
Block a user