mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update tag service
This commit is contained in:
@@ -7,9 +7,15 @@ import "google/api/annotations.proto";
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service TagService {
|
||||
rpc UpsertTag(UpsertTagRequest) returns (UpsertTagResponse) {
|
||||
option (google.api.http) = {post: "/api/v2/tags"};
|
||||
}
|
||||
rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/tags"};
|
||||
}
|
||||
rpc DeleteTag(DeleteTagRequest) returns (DeleteTagResponse) {
|
||||
option (google.api.http) = {delete: "/api/v2/tags"};
|
||||
}
|
||||
}
|
||||
|
||||
message Tag {
|
||||
@@ -17,6 +23,14 @@ message Tag {
|
||||
int32 creator_id = 2;
|
||||
}
|
||||
|
||||
message UpsertTagRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message UpsertTagResponse {
|
||||
Tag tag = 1;
|
||||
}
|
||||
|
||||
message ListTagsRequest {
|
||||
int32 creator_id = 1;
|
||||
}
|
||||
@@ -24,3 +38,9 @@ message ListTagsRequest {
|
||||
message ListTagsResponse {
|
||||
repeated Tag tags = 1;
|
||||
}
|
||||
|
||||
message DeleteTagRequest {
|
||||
Tag tag = 1;
|
||||
}
|
||||
|
||||
message DeleteTagResponse {}
|
||||
|
Reference in New Issue
Block a user