Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventTypePing = "ping" EventTypePush = "push" EventTypeWatch = "watch" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackPushEvent ¶
type CallbackWatchEvent ¶
type CallbackWatchEvent func(event *github.WatchEvent)
type GithubWebhookHandler ¶
type GithubWebhookHandler struct {
// contains filtered or unexported fields
}
provides the http handler and interface for adding callbacks
func NewGithubWebhookHandler ¶
func NewGithubWebhookHandler(secretToken string, out io.Writer) *GithubWebhookHandler
func (*GithubWebhookHandler) AddCallbackForPushEvent ¶
func (h *GithubWebhookHandler) AddCallbackForPushEvent(cb CallbackPushEvent)
add a callback for Push Events
func (*GithubWebhookHandler) AddCallbackForWatchEvent ¶
func (h *GithubWebhookHandler) AddCallbackForWatchEvent(cb CallbackWatchEvent)
add a callback for Watch Events
func (*GithubWebhookHandler) ServeHTTP ¶
func (h *GithubWebhookHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
The main HTTP Handler that handles github webhooks
Click to show internal directories.
Click to hide internal directories.