Documentation ¶
Index ¶
- type Handlers
- func (h *Handlers) Add(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Get(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetOwnedByOrg(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetOwnedByUser(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) TriggerTest(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Update(w http.ResponseWriter, r *http.Request)
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.