mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update services comment
This commit is contained in:
@@ -8,6 +8,7 @@ import "google/protobuf/timestamp.proto";
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service ActivityService {
|
||||
// GetActivity returns the activity with the given id.
|
||||
rpc GetActivity(GetActivityRequest) returns (GetActivityResponse) {
|
||||
option (google.api.http) = {get: "/v2/activities"};
|
||||
}
|
||||
|
@@ -10,10 +10,11 @@ import "google/protobuf/timestamp.proto";
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service InboxService {
|
||||
// ListInboxes lists inboxes for a user.
|
||||
rpc ListInboxes(ListInboxesRequest) returns (ListInboxesResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/inboxes"};
|
||||
}
|
||||
|
||||
// UpdateInbox updates an inbox.
|
||||
rpc UpdateInbox(UpdateInboxRequest) returns (UpdateInboxResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v2/inboxes"
|
||||
@@ -21,7 +22,7 @@ service InboxService {
|
||||
};
|
||||
option (google.api.method_signature) = "inbox,update_mask";
|
||||
}
|
||||
|
||||
// DeleteInbox deletes an inbox.
|
||||
rpc DeleteInbox(DeleteInboxRequest) returns (DeleteInboxResponse) {
|
||||
option (google.api.http) = {delete: "/v2/{name=inboxes/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
|
@@ -10,20 +10,25 @@ import "google/protobuf/timestamp.proto";
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service ResourceService {
|
||||
// CreateResource creates a new resource.
|
||||
rpc CreateResource(CreateResourceRequest) returns (CreateResourceResponse) {
|
||||
option (google.api.http) = {post: "/api/v2/resources"};
|
||||
}
|
||||
// ListResources lists all resources.
|
||||
rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/resources"};
|
||||
}
|
||||
// GetResource returns a resource by id.
|
||||
rpc GetResource(GetResourceRequest) returns (GetResourceResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/resources/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
// GetResourceByName returns a resource by name.
|
||||
rpc GetResourceByName(GetResourceByNameRequest) returns (GetResourceByNameResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/resources/{name}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// UpdateResource updates a resource.
|
||||
rpc UpdateResource(UpdateResourceRequest) returns (UpdateResourceResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/resources/{resource.id}",
|
||||
@@ -31,6 +36,7 @@ service ResourceService {
|
||||
};
|
||||
option (google.api.method_signature) = "resource,update_mask";
|
||||
}
|
||||
// DeleteResource deletes a resource by id.
|
||||
rpc DeleteResource(DeleteResourceRequest) returns (DeleteResourceResponse) {
|
||||
option (google.api.http) = {delete: "/api/v2/resources/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
|
@@ -7,21 +7,28 @@ import "google/api/annotations.proto";
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service TagService {
|
||||
// UpsertTag upserts a tag.
|
||||
rpc UpsertTag(UpsertTagRequest) returns (UpsertTagResponse) {
|
||||
option (google.api.http) = {post: "/api/v2/tags"};
|
||||
}
|
||||
// BatchUpsertTag upserts multiple tags.
|
||||
rpc BatchUpsertTag(BatchUpsertTagRequest) returns (BatchUpsertTagResponse) {
|
||||
option (google.api.http) = {post: "/api/v2/tags:batchUpsert"};
|
||||
}
|
||||
// ListTags lists tags.
|
||||
rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/tags"};
|
||||
}
|
||||
// RenameTag renames a tag.
|
||||
// All related memos will be updated.
|
||||
rpc RenameTag(RenameTagRequest) returns (RenameTagResponse) {
|
||||
option (google.api.http) = {patch: "/api/v2/tags:rename"};
|
||||
}
|
||||
// DeleteTag deletes a tag.
|
||||
rpc DeleteTag(DeleteTagRequest) returns (DeleteTagResponse) {
|
||||
option (google.api.http) = {delete: "/api/v2/tags"};
|
||||
}
|
||||
// GetTagSuggestions gets tag suggestions from the user's memos.
|
||||
rpc GetTagSuggestions(GetTagSuggestionsRequest) returns (GetTagSuggestionsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/tags/suggestion"};
|
||||
}
|
||||
|
@@ -42,10 +42,12 @@ service UserService {
|
||||
option (google.api.http) = {delete: "/api/v2/{name=users/*}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// GetUserSetting gets the setting of a user.
|
||||
rpc GetUserSetting(GetUserSettingRequest) returns (GetUserSettingResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/{name=users/*}/setting"};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
// UpdateUserSetting updates the setting of a user.
|
||||
rpc UpdateUserSetting(UpdateUserSettingRequest) returns (UpdateUserSettingResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/{setting.name=users/*/setting}"
|
||||
|
@@ -10,24 +10,29 @@ import "google/protobuf/timestamp.proto";
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service WebhookService {
|
||||
// CreateWebhook creates a new webhook.
|
||||
rpc CreateWebhook(CreateWebhookRequest) returns (CreateWebhookResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/webhooks"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// GetWebhook returns a webhook by id.
|
||||
rpc GetWebhook(GetWebhookRequest) returns (GetWebhookResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/webhooks/{id}"};
|
||||
}
|
||||
// ListWebhooks returns a list of webhooks.
|
||||
rpc ListWebhooks(ListWebhooksRequest) returns (ListWebhooksResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/webhooks"};
|
||||
}
|
||||
// UpdateWebhook updates a webhook.
|
||||
rpc UpdateWebhook(UpdateWebhookRequest) returns (UpdateWebhookResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/webhooks/{webhook.id}"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// DeleteWebhook deletes a webhook by id.
|
||||
rpc DeleteWebhook(DeleteWebhookRequest) returns (DeleteWebhookResponse) {
|
||||
option (google.api.http) = {delete: "/api/v2/webhooks/{id}"};
|
||||
}
|
||||
|
@@ -9,9 +9,11 @@ import "google/protobuf/field_mask.proto";
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service WorkspaceService {
|
||||
// GetWorkspaceProfile returns the workspace profile.
|
||||
rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (GetWorkspaceProfileResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/workspace/profile"};
|
||||
}
|
||||
// UpdateWorkspaceProfile updates the workspace profile.
|
||||
rpc UpdateWorkspaceProfile(UpdateWorkspaceProfileRequest) returns (UpdateWorkspaceProfileResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/workspace/profile",
|
||||
|
Reference in New Issue
Block a user