Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfEventMatch ¶
func JoinTriggers ¶
func ParseTriggerStr ¶
Types ¶
type Controller ¶
type Controller interface { CreateWebhook(ctx context.Context, resourceType string, resourceID uint, w *CreateWebhookRequest) (*Webhook, error) GetWebhook(ctx context.Context, id uint) (*Webhook, error) ListWebhooks(ctx context.Context, resourceType string, resourceID uint, query *q.Query) ([]*Webhook, int64, error) UpdateWebhook(ctx context.Context, id uint, w *UpdateWebhookRequest) (*Webhook, error) DeleteWebhook(ctx context.Context, id uint) error ListWebhookLogs(ctx context.Context, wID uint, query *q.Query) ([]*LogSummary, int64, error) GetWebhookLog(ctx context.Context, id uint) (*Log, error) ResendWebhook(ctx context.Context, id uint) (*models.WebhookLog, error) }
func NewController ¶
func NewController(param *param.Param) Controller
type CreateWebhookRequest ¶
type Log ¶
type Log struct { LogSummary RequestHeaders string `json:"requestHeaders"` RequestData string `json:"requestData"` ResponseHeaders string `json:"responseHeaders"` ResponseBody string `json:"responseBody"` }
type LogSummary ¶
type LogSummary struct { ID uint `json:"id"` WebhookID uint `json:"webhookID"` EventID uint `json:"eventID"` URL string `json:"url"` Status string `json:"status"` ResourceType string `json:"resourceType"` ResourceName string `json:"resourceName"` ResourceID uint `json:"resourceID"` EventType string `json:"eventType"` Extra *string `json:"extra"` ErrorMessage string `json:"errorMessage"` CreatedAt time.Time `json:"createdAt"` CreatedBy *usermodels.UserBasic `json:"createdBy,omitempty"` UpdatedAt time.Time `json:"updatedAt"` UpdatedBy *usermodels.UserBasic `json:"updatedBy,omitempty"` }
type UpdateWebhookRequest ¶
type Webhook ¶
type Webhook struct { CreateWebhookRequest ID uint `json:"id"` CreatedAt time.Time `json:"createdAt"` CreatedBy *usermodels.UserBasic `json:"createdBy,omitempty"` UpdatedAt time.Time `json:"updatedAt"` UpdatedBy *usermodels.UserBasic `json:"updatedBy,omitempty"` }
Click to show internal directories.
Click to hide internal directories.