Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Secret string
}
Config defines the configuration to create a new Gogs Webhook instance
type Webhook ¶
type Webhook struct {
// contains filtered or unexported fields
}
Webhook instance contains all methods needed to process events
func (Webhook) ParsePayload ¶
func (hook Webhook) ParsePayload(w http.ResponseWriter, r *http.Request)
ParsePayload parses and verifies the payload and fires off the mapped function, if it exists.
func (Webhook) Provider ¶
func (hook Webhook) Provider() webhooks.Provider
Provider returns the current hooks provider ID
func (Webhook) RegisterEvents ¶
RegisterEvents registers the function to call when the specified event(s) are encountered
Click to show internal directories.
Click to hide internal directories.