Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebhookEventListener ¶
type WebhookEventListener struct {
// contains filtered or unexported fields
}
The WebhookEventListener server, which listens for notifications from Gitlab
func NewWebhookEventListener ¶
func NewWebhookEventListener(config *conf.Options) (*WebhookEventListener, error)
NewWebhookEventListener creates a new WebhookEventListener and registers a HTTP handler for /triage/system-hooks. To actually listen for webhooks you still have to call WebhookEventListener.Listen()
func (*WebhookEventListener) HookHandler ¶
func (l *WebhookEventListener) HookHandler(w http.ResponseWriter, req *http.Request)
HookHandler handles HTTP requests, checks for the appropriate Gitlab token and may create a new Job for doing certain actions at Gitlab in response.
func (*WebhookEventListener) Listen ¶
func (l *WebhookEventListener) Listen() error
Listen listens for HTTP requests on the port specified via the WebhookEventListener's config. This function blocks until an error occurs (e.g. if we can't bind to the port)
Click to show internal directories.
Click to hide internal directories.