| |
| |
| syntax = "proto3"; |
| |
| package bufman.dubbo.apache.org.webhook.v1alpha1; |
| |
| import "registry/v1alpha1/repository.proto"; |
| import "registry/v1alpha1/repository_commit.proto"; |
| import "registry/v1alpha1/webhook.proto"; |
| import "google/protobuf/timestamp.proto"; |
| |
| // EventService is the service which receives webhook events from Buf. |
| service EventService { |
| // Event is the rpc which receives webhook events. |
| rpc Event(EventRequest) returns (EventResponse); |
| } |
| |
| // EventRequest is the request payload that will be sent to the customer |
| // that is subscribed to webhook events in the BSR. |
| message EventRequest { |
| // The webhook event that was triggered. This event is the same one that is |
| // registered when creating a webhook in the BSR. |
| bufman.dubbo.apache.org.registry.v1alpha1.WebhookEvent event = 1; |
| // The event payload of the event was triggered. |
| EventPayload payload = 2; |
| } |
| |
| // EventPayload contains the actual event payload for all possible |
| // webhook event types. |
| message EventPayload { |
| oneof payload { |
| RepositoryPushEvent repository_push = 1; |
| } |
| } |
| |
| // EventResponse is the empty response payload from the customer to Buf. |
| message EventResponse {} |
| |
| // Payload for the event WEBHOOK_EVENT_REPOSITORY_PUSH. |
| message RepositoryPushEvent { |
| // The timestamp of the commit push. |
| google.protobuf.Timestamp event_time = 1; |
| // The repository commit that was pushed. |
| bufman.dubbo.apache.org.registry.v1alpha1.RepositoryCommit repository_commit = 2; |
| // The repository that was pushed. |
| bufman.dubbo.apache.org.registry.v1alpha1.Repository repository = 3; |
| } |