add: some user api and all api desc

This commit is contained in:
wwweww
2026-02-27 19:17:01 +08:00
parent a0c720eb2f
commit 5930fb0dde
156 changed files with 9457 additions and 1086 deletions
+34
View File
@@ -0,0 +1,34 @@
syntax = "proto3";
package file;
option go_package = "./pb";
// 文件上传的元数据信息
message UploadFileMetadataReq {
string fileName = 1;
int64 fileSize = 2;
string fileType = 3; // avatar, chat, etc.
string userId = 4;
bytes fileData = 5; // 如果文件很小可以直接传,大文件建议API层直接传S3,RPC只传元数据
}
message UploadFileResp {
string url = 1;
string fileId = 2;
}
message GetFileUrlReq {
string fileId = 1;
string userId = 2; // 用于鉴权
}
message GetFileUrlResp {
string url = 1; // 可能是带签名的临时 URL
}
service FileService {
// 简单上传(适合小文件,或保存元数据)
rpc Upload(UploadFileMetadataReq) returns (UploadFileResp);
// 获取文件访问链接(处理私有文件的鉴权)
rpc GetFileUrl(GetFileUrlReq) returns (GetFileUrlResp);
}
+5 -5
View File
@@ -39,11 +39,11 @@ message AddUserVerificationsResp {
message UpdateUserVerificationsReq {
int64 id = 1; //id
int64 userId = 2; //userId
string role = 3; //role
string status = 4; //status
string materials = 5; //materials
string rejectReason = 6; //rejectReason
optional int64 userId = 2; //userId
optional string role = 3; //role
optional string status = 4; //status
optional string materials = 5; //materials
optional string rejectReason = 6; //rejectReason
int64 reviewedBy = 7; //reviewedBy
int64 reviewedAt = 8; //reviewedAt
int64 createdAt = 9; //createdAt
+1 -1
View File
@@ -155,7 +155,7 @@ message RegisterReq {
string username = 1;
string passwd = 2;
string phone = 3;
int32 vcode = 4;
string vcode = 4;
string email = 5;
string requestId = 6;
}