Update usage grpc call

This commit is contained in:
2025-03-10 22:15:59 +08:00
parent 69be460e13
commit e3ca50c4ae
6 changed files with 248 additions and 60 deletions

View File

@@ -8,6 +8,7 @@ service AttachmentService {
rpc GetAttachment(GetAttachmentRequest) returns (GetAttachmentResponse) {}
rpc ListAttachment(ListAttachmentRequest) returns (ListAttachmentResponse) {}
rpc UpdateVisibility(UpdateVisibilityRequest) returns (UpdateVisibilityResponse) {}
rpc UpdateUsage(UpdateUsageRequest) returns (UpdateUsageResponse) {}
rpc DeleteAttachment(DeleteAttachmentRequest) returns (DeleteAttachmentResponse) {}
}
@@ -53,6 +54,15 @@ message UpdateVisibilityResponse {
int32 count = 1;
}
message UpdateUsageRequest {
repeated uint64 id = 1;
int64 delta = 2;
}
message UpdateUsageResponse {
int32 count = 1;
}
message DeleteAttachmentRequest {
repeated uint64 id = 1;
repeated string rid = 2;