feat: import services and standardize Go 1.26.5
This commit is contained in:
56
apps/base/cloud/proto/share.proto
Normal file
56
apps/base/cloud/proto/share.proto
Normal file
@@ -0,0 +1,56 @@
|
||||
syntax = "proto3";
|
||||
package cloud;
|
||||
option go_package = ".;cloud";
|
||||
import "blocks.proto";
|
||||
|
||||
// 分享服务
|
||||
service Share {
|
||||
// 创建分享
|
||||
rpc CreateShare(CreateShareRequest) returns (StatusReply);
|
||||
// 获取分享详情
|
||||
rpc GetShare(IdentRequest) returns (CloudShareItem);
|
||||
// 删除分享
|
||||
rpc DeleteShare(IdentRequest) returns (StatusReply);
|
||||
// 获取分享列表
|
||||
rpc ListShares(FetchRequest) returns (ListSharesResponse);
|
||||
// 验证分享密码
|
||||
rpc ValidateSharePassword(ValidateSharePasswordRequest) returns (StatusReply);
|
||||
}
|
||||
|
||||
// 请求消息定义
|
||||
message CreateShareRequest {
|
||||
uint64 cloud_id = 1;
|
||||
string cloud_identity = 2;
|
||||
string share_type = 3; // file, album, note, etc.
|
||||
uint64 resource_id = 4; // 对应资源的ID
|
||||
string share_token = 5; // 分享令牌
|
||||
string password = 6; // 可选分享密码
|
||||
string expires_at = 7; // 过期时间
|
||||
bool is_public = 8; // 是否公开
|
||||
}
|
||||
|
||||
message ListSharesResponse {
|
||||
repeated CloudShareItem shares = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
message ValidateSharePasswordRequest {
|
||||
string identity = 1;
|
||||
string password = 2;
|
||||
}
|
||||
|
||||
// 分享系统模型
|
||||
message CloudShareItem {
|
||||
uint64 id = 1;
|
||||
string identity = 2;
|
||||
string share_type = 3; // file, album, note, etc.
|
||||
uint64 resource_id = 4; // 对应资源的ID
|
||||
string share_token = 5; // 分享令牌
|
||||
string password = 6; // 可选分享密码
|
||||
string expires_at = 7; // 过期时间
|
||||
int32 view_count = 8; // 浏览次数
|
||||
int32 download_count = 9; // 下载次数
|
||||
bool is_public = 10; // 是否公开
|
||||
string created_at = 11;
|
||||
string updated_at = 12;
|
||||
}
|
||||
Reference in New Issue
Block a user