Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶
type Base struct { ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *gorm.DeletedAt `sql:"index" json:"deleted_at" swaggertype:"primitive,string"` CreatedByID uint `gorm:"column:created_by_id" json:"created_by_id"` UpdatedByID uint `gorm:"column:updated_by_id" json:"updated_by_id"` }
Base base model class
type Event ¶
type Event struct { Base Name string `gorm:"column:name" json:"name"` Event string `gorm:"column:event" json:"event"` Webhooks []Webhook `gorm:"many2many:webhook_events" json:"events,omitempty"` Tags postgres.Jsonb `gorm:"column:tags" json:"tags" swaggertype:"primitive,string"` }
Event model
type Webhook ¶
type Webhook struct { Base Name string `gorm:"column:name" json:"name"` URL string `gorm:"column:url" json:"url"` Enabled bool `gorm:"column:enabled" json:"enabled"` Events []Event `gorm:"many2many:webhook_events;" json:"events"` Tags postgres.Jsonb `gorm:"column:tags" json:"tags" swaggertype:"primitive,string"` SpaceID uint `gorm:"column:space_id" json:"space_id"` }
Webhook model
type WebhookData ¶
type WebhookData struct { Event string `json:"event,omitempty"` Contains []string `json:"contains,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` Payload interface{} `json:"payload,omitempty"` }
WebhookData general struct to fire webhook
type WebhookLog ¶
type WebhookLog struct { ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"created_at"` CreatedByID uint `gorm:"column:created_by_id" json:"created_by_id"` Event string `gorm:"column:event" json:"event"` URL string `gorm:"column:url" json:"url"` ResponseStatusCode int `gorm:"column:response_status_code" json:"response_status_code"` Data postgres.Jsonb `gorm:"column:data" json:"data" swaggertype:"primitive,string"` ResponseBody postgres.Jsonb `gorm:"column:response_body" json:"response_body" swaggertype:"primitive,string"` Tags postgres.Jsonb `gorm:"column:tags" json:"tags" swaggertype:"primitive,string"` }
WebhookLog model
Click to show internal directories.
Click to hide internal directories.