feat: implement rename tag

This commit is contained in:
Steven
2024-01-25 23:09:35 +08:00
parent 70d1301dc3
commit 79558028c0
8 changed files with 611 additions and 93 deletions

View File

@@ -13,6 +13,9 @@ service TagService {
rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
option (google.api.http) = {get: "/api/v2/tags"};
}
rpc RenameTag(RenameTagRequest) returns (RenameTagResponse) {
option (google.api.http) = {patch: "/api/v2/tags:rename"};
}
rpc DeleteTag(DeleteTagRequest) returns (DeleteTagResponse) {
option (google.api.http) = {delete: "/api/v2/tags"};
}
@@ -46,6 +49,18 @@ message ListTagsResponse {
repeated Tag tags = 1;
}
message RenameTagRequest {
// The creator of tags.
// Format: users/{username}
string user = 1;
string old_name = 2;
string new_name = 3;
}
message RenameTagResponse {
Tag tag = 1;
}
message DeleteTagRequest {
Tag tag = 1;
}