2
0

github_webhook.go 705 B

1234567891011121314151617181920212223242526
  1. package models
  2. import (
  3. "github.com/google/uuid"
  4. "gorm.io/gorm"
  5. )
  6. // GithubWebhook represents a webhook that is created on Github which can trigger actions in Porter for the specified project/cluster
  7. type GithubWebhook struct {
  8. gorm.Model
  9. // ID is a UUID for the webhook
  10. ID uuid.UUID `gorm:"type:uuid;primaryKey" json:"id"`
  11. // ClusterID is the ID of the cluster that the webhook is associated with.
  12. ClusterID int
  13. // ProjectID is the ID of the project that the webhook is associated with.
  14. ProjectID int
  15. // PorterAppID is the ID of the PorterApp that the webhook is associated with.
  16. PorterAppID int
  17. // GithubWebhookID is the ID of the webhook provided by Github.
  18. GithubWebhookID int64
  19. }