The top-level entity that groups entrypoints and targets is now called Webhook (was Processor). The inbound URL endpoint entity is now called Entrypoint (was Webhook). This rename affects database models, handler comments, routes, and README documentation. closes #12
21 lines
630 B
Go
21 lines
630 B
Go
package database
|
|
|
|
// Event represents a captured webhook event
|
|
type Event struct {
|
|
BaseModel
|
|
|
|
WebhookID string `gorm:"type:uuid;not null" json:"webhook_id"`
|
|
EntrypointID string `gorm:"type:uuid;not null" json:"entrypoint_id"`
|
|
|
|
// Request data
|
|
Method string `gorm:"not null" json:"method"`
|
|
Headers string `gorm:"type:text" json:"headers"` // JSON
|
|
Body string `gorm:"type:text" json:"body"`
|
|
ContentType string `json:"content_type"`
|
|
|
|
// Relations
|
|
Webhook Webhook `json:"webhook,omitempty"`
|
|
Entrypoint Entrypoint `json:"entrypoint,omitempty"`
|
|
Deliveries []Delivery `json:"deliveries,omitempty"`
|
|
}
|