chore: update services comment

This commit is contained in:
Steven
2024-02-01 21:26:09 +08:00
parent f6f193af2d
commit c342c464a2
17 changed files with 231 additions and 27 deletions

View File

@@ -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}"};
}