feat: implement list shortcuts v2 api

This commit is contained in:
Steven
2023-08-08 22:48:10 +08:00
parent 07365fda73
commit 6a9fcb1c18
11 changed files with 485 additions and 62 deletions

View File

@ -9,6 +9,9 @@ import "google/api/client.proto";
option go_package = "gen/api/v2";
service ShortcutService {
rpc ListShortcuts(ListShortcutsRequest) returns (ListShortcutsResponse) {
option (google.api.http) = {get: "/api/v2/shortcuts"};
}
// GetShortcut returns a shortcut by name.
rpc GetShortcut(GetShortcutRequest) returns (GetShortcutResponse) {
option (google.api.http) = {get: "/api/v2/shortcuts/{name}"};
@ -60,6 +63,12 @@ enum Visibility {
PUBLIC = 3;
}
message ListShortcutsRequest {}
message ListShortcutsResponse {
repeated Shortcut shortcuts = 1;
}
message GetShortcutRequest {
string name = 1;
}