webhook

package
v0.0.0-...-9f6be22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

Handlers represents a group of http handlers in charge of handling webhooks operations.

func NewHandlers

func NewHandlers(webhookManager hub.WebhookManager, hc hub.HTTPClient) *Handlers

NewHandlers creates a new Handlers instance.

func (*Handlers) Add

func (h *Handlers) Add(w http.ResponseWriter, r *http.Request)

Add is an http handler that adds the provided webhook to the database.

func (*Handlers) Delete

func (h *Handlers) Delete(w http.ResponseWriter, r *http.Request)

Delete is an http handler that deletes the provided webhook from the database.

func (*Handlers) Get

func (h *Handlers) Get(w http.ResponseWriter, r *http.Request)

Get is an http handler that returns the requested webhook.

func (*Handlers) GetOwnedByOrg

func (h *Handlers) GetOwnedByOrg(w http.ResponseWriter, r *http.Request)

GetOwnedByOrg is an http handler that returns the webhooks owned by the organization provided. The user doing the request must belong to the organization.

func (*Handlers) GetOwnedByUser

func (h *Handlers) GetOwnedByUser(w http.ResponseWriter, r *http.Request)

GetOwnedByUser is an http handler that returns the webhooks owned by the user doing the request.

func (*Handlers) TriggerTest

func (h *Handlers) TriggerTest(w http.ResponseWriter, r *http.Request)

TriggerTest is an http handler used to test a webhook before adding or updating it.

func (*Handlers) Update

func (h *Handlers) Update(w http.ResponseWriter, r *http.Request)

Update is an http handler that updates the provided webhook in the database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL