{"modulePath":"github.com/stephen-soltesz/github-webhook-poc","version":"v0.0.0-20200210200834-da893e214504","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package webhook\n\nPackage webhook defines a generic handler for GitHub App \u0026 Webhook events.\n\n## Types\n\n```go\ntype Handler struct {\n\n\t// WebhookSecret should match the value used to register the github webhook.\n\tWebhookSecret string\n\n\t// All functions accept the corresponding event type. The functions may\n\t// return an error. The `ServeHTTP` handler reports errors as HTTP 500\n\t// failures to the caller.\n\tCheckRunEvent                     func(*github.CheckRunEvent) error\n\tCheckSuiteEvent                   func(*github.CheckSuiteEvent) error\n\tCommitCommentEvent                func(*github.CommitCommentEvent) error\n\tCreateEvent                       func(*github.CreateEvent) error\n\tDeleteEvent                       func(*github.DeleteEvent) error\n\tDeploymentEvent                   func(*github.DeploymentEvent) error\n\tDeploymentStatusEvent             func(*github.DeploymentStatusEvent) error\n\tForkEvent                         func(*github.ForkEvent) error\n\tGitHubAppAuthorizationEvent       func(*github.GitHubAppAuthorizationEvent) error\n\tGollumEvent                       func(*github.GollumEvent) error\n\tInstallationEvent                 func(*github.InstallationEvent) error\n\tInstallationRepositoriesEvent     func(*github.InstallationRepositoriesEvent) error\n\tIssueCommentEvent                 func(*github.IssueCommentEvent) error\n\tIssuesEvent                       func(*github.IssuesEvent) error\n\tLabelEvent                        func(*github.LabelEvent) error\n\tMarketplacePurchaseEvent          func(*github.MarketplacePurchaseEvent) error\n\tMemberEvent                       func(*github.MemberEvent) error\n\tMembershipEvent                   func(*github.MembershipEvent) error\n\tMilestoneEvent                    func(*github.MilestoneEvent) error\n\tOrganizationEvent                 func(*github.OrganizationEvent) error\n\tOrgBlockEvent                     func(*github.OrgBlockEvent) error\n\tPageBuildEvent                    func(*github.PageBuildEvent) error\n\tProjectEvent                      func(*github.ProjectEvent) error\n\tProjectCardEvent                  func(*github.ProjectCardEvent) error\n\tProjectColumnEvent                func(*github.ProjectColumnEvent) error\n\tPublicEvent                       func(*github.PublicEvent) error\n\tPullRequestEvent                  func(*github.PullRequestEvent) error\n\tPullRequestReviewEvent            func(*github.PullRequestReviewEvent) error\n\tPullRequestReviewCommentEvent     func(*github.PullRequestReviewCommentEvent) error\n\tPushEvent                         func(*github.PushEvent) error\n\tReleaseEvent                      func(*github.ReleaseEvent) error\n\tRepositoryEvent                   func(*github.RepositoryEvent) error\n\tRepositoryVulnerabilityAlertEvent func(*github.RepositoryVulnerabilityAlertEvent) error\n\tStatusEvent                       func(*github.StatusEvent) error\n\tTeamEvent                         func(*github.TeamEvent) error\n\tTeamAddEvent                      func(*github.TeamAddEvent) error\n\tWatchEvent                        func(*github.WatchEvent) error\n\t// contains filtered or unexported fields\n}\n```\nA Handler defines parameters for implementing a GitHub webhook event handler as part of a GitHub App ([https://developer.github.com/apps/](https://developer.github.com/apps/)) or ad-hoc Webhook server ([https://developer.github.com/webhooks/](https://developer.github.com/webhooks/)).\n\nTo be useful, define at least one event handler function.\n\n```go\nfunc (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)\n```\nServeHTTP is an http.Handler used to respond to webhook events with the corresponding user-provided functions from the Handler.\n\nThe GitHub \"ping\" event is handled automatically. For every event type received in a \"ping\" event, ServeHTTP checks whether there is corresponding, non-nil event handler functions. If so, then the ping is successful; if not, the ping fails.\n\n","path":"github.com/stephen-soltesz/github-webhook-poc/githubx/webhook","name":"webhook","synopsis":"Package webhook defines a generic handler for GitHub App \u0026 Webhook events.","isRedistributable":true}
