Documentation ¶
Index ¶
- func Debug(server *WebHook)
- func WithAllEventTypes(server *WebHook)
- func WithEventTypes(eventTypes ...string) func(*WebHook)
- func WithPath(path string) func(*WebHook)
- func WithPort(port int) func(*WebHook)
- func WithSecret(secret string) func(*WebHook)
- type EventHandlers
- func (c *EventHandlers) OnBranchProtectionRuleEvent(...) *EventHandlers
- func (c *EventHandlers) OnCheckRunEvent(...) *EventHandlers
- func (c *EventHandlers) OnCheckSuiteEvent(...) *EventHandlers
- func (c *EventHandlers) OnCommitCommentEvent(...) *EventHandlers
- func (c *EventHandlers) OnContentReferenceEvent(...) *EventHandlers
- func (c *EventHandlers) OnCreateEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.CreateEvent)) *EventHandlers
- func (c *EventHandlers) OnDeleteEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.DeleteEvent)) *EventHandlers
- func (c *EventHandlers) OnDeployKeyEvent(...) *EventHandlers
- func (c *EventHandlers) OnDeploymentEvent(...) *EventHandlers
- func (c *EventHandlers) OnDeploymentStatusEvent(...) *EventHandlers
- func (c *EventHandlers) OnDiscussionEvent(...) *EventHandlers
- func (c *EventHandlers) OnForkEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.ForkEvent)) *EventHandlers
- func (c *EventHandlers) OnGitHubAppAuthorizationEvent(...) *EventHandlers
- func (c *EventHandlers) OnGollumEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.GollumEvent)) *EventHandlers
- func (c *EventHandlers) OnInstallationEvent(...) *EventHandlers
- func (c *EventHandlers) OnInstallationRepositoriesEvent(...) *EventHandlers
- func (c *EventHandlers) OnIssueCommentEvent(...) *EventHandlers
- func (c *EventHandlers) OnIssuesEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.IssuesEvent)) *EventHandlers
- func (c *EventHandlers) OnLabelEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.LabelEvent)) *EventHandlers
- func (c *EventHandlers) OnMarketplacePurchaseEvent(...) *EventHandlers
- func (c *EventHandlers) OnMemberEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.MemberEvent)) *EventHandlers
- func (c *EventHandlers) OnMembershipEvent(...) *EventHandlers
- func (c *EventHandlers) OnMetaEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.MetaEvent)) *EventHandlers
- func (c *EventHandlers) OnMilestoneEvent(...) *EventHandlers
- func (c *EventHandlers) OnOrgBlockEvent(...) *EventHandlers
- func (c *EventHandlers) OnOrganizationEvent(...) *EventHandlers
- func (c *EventHandlers) OnPackageEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PackageEvent)) *EventHandlers
- func (c *EventHandlers) OnPageBuildEvent(...) *EventHandlers
- func (c *EventHandlers) OnPingEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PingEvent)) *EventHandlers
- func (c *EventHandlers) OnProjectCardEvent(...) *EventHandlers
- func (c *EventHandlers) OnProjectColumnEvent(...) *EventHandlers
- func (c *EventHandlers) OnProjectEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.ProjectEvent)) *EventHandlers
- func (c *EventHandlers) OnPublicEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PublicEvent)) *EventHandlers
- func (c *EventHandlers) OnPullRequestEvent(...) *EventHandlers
- func (c *EventHandlers) OnPullRequestReviewCommentEvent(...) *EventHandlers
- func (c *EventHandlers) OnPullRequestReviewEvent(...) *EventHandlers
- func (c *EventHandlers) OnPullRequestReviewThreadEvent(...) *EventHandlers
- func (c *EventHandlers) OnPullRequestTargetEvent(...) *EventHandlers
- func (c *EventHandlers) OnPushEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PushEvent)) *EventHandlers
- func (c *EventHandlers) OnReleaseEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.ReleaseEvent)) *EventHandlers
- func (c *EventHandlers) OnRepositoryDispatchEvent(...) *EventHandlers
- func (c *EventHandlers) OnRepositoryEvent(...) *EventHandlers
- func (c *EventHandlers) OnRepositoryImportEvent(...) *EventHandlers
- func (c *EventHandlers) OnRepositoryVulnerabilityAlertEvent(eventHandler func(uri *url.URL, deliveryID string, ...)) *EventHandlers
- func (c *EventHandlers) OnSecretScanningAlertEvent(...) *EventHandlers
- func (c *EventHandlers) OnStarEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.StarEvent)) *EventHandlers
- func (c *EventHandlers) OnStatusEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.StatusEvent)) *EventHandlers
- func (c *EventHandlers) OnTeamAddEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.TeamAddEvent)) *EventHandlers
- func (c *EventHandlers) OnTeamEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.TeamEvent)) *EventHandlers
- func (c *EventHandlers) OnUserEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.UserEvent)) *EventHandlers
- func (c *EventHandlers) OnWatchEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.WatchEvent)) *EventHandlers
- func (c *EventHandlers) OnWorkflowDispatchEvent(...) *EventHandlers
- func (c *EventHandlers) OnWorkflowJobEvent(...) *EventHandlers
- func (c *EventHandlers) OnWorkflowRunEvent(...) *EventHandlers
- type WebHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAllEventTypes ¶
func WithAllEventTypes(server *WebHook)
WithAllEventTypes accept all possible event types.
func WithEventTypes ¶
WithEventTypes define accepted event types.
func WithSecret ¶
WithSecret define the GitHub secret.
Types ¶
type EventHandlers ¶
type EventHandlers struct {
// contains filtered or unexported fields
}
EventHandlers all event handlers.
func NewEventHandlers ¶
func NewEventHandlers() *EventHandlers
NewEventHandlers create a new event handlers.
func (*EventHandlers) OnBranchProtectionRuleEvent ¶
func (c *EventHandlers) OnBranchProtectionRuleEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.BranchProtectionRuleEvent)) *EventHandlers
OnBranchProtectionRuleEvent BranchProtectionRuleEvent handler.
func (*EventHandlers) OnCheckRunEvent ¶
func (c *EventHandlers) OnCheckRunEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.CheckRunEvent)) *EventHandlers
OnCheckRunEvent CheckRunEvent handler.
func (*EventHandlers) OnCheckSuiteEvent ¶
func (c *EventHandlers) OnCheckSuiteEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.CheckSuiteEvent)) *EventHandlers
OnCheckSuiteEvent CheckSuiteEvent handler.
func (*EventHandlers) OnCommitCommentEvent ¶
func (c *EventHandlers) OnCommitCommentEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.CommitCommentEvent)) *EventHandlers
OnCommitCommentEvent CommitCommentEvent handler.
func (*EventHandlers) OnContentReferenceEvent ¶
func (c *EventHandlers) OnContentReferenceEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.ContentReferenceEvent)) *EventHandlers
OnContentReferenceEvent ContentReferenceEvent handler.
func (*EventHandlers) OnCreateEvent ¶
func (c *EventHandlers) OnCreateEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.CreateEvent)) *EventHandlers
OnCreateEvent CreateEvent handler.
func (*EventHandlers) OnDeleteEvent ¶
func (c *EventHandlers) OnDeleteEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.DeleteEvent)) *EventHandlers
OnDeleteEvent DeleteEvent handler.
func (*EventHandlers) OnDeployKeyEvent ¶
func (c *EventHandlers) OnDeployKeyEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.DeployKeyEvent)) *EventHandlers
OnDeployKeyEvent DeployKeyEvent handler.
func (*EventHandlers) OnDeploymentEvent ¶
func (c *EventHandlers) OnDeploymentEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.DeploymentEvent)) *EventHandlers
OnDeploymentEvent DeploymentEvent handler.
func (*EventHandlers) OnDeploymentStatusEvent ¶
func (c *EventHandlers) OnDeploymentStatusEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.DeploymentStatusEvent)) *EventHandlers
OnDeploymentStatusEvent DeploymentStatusEvent handler.
func (*EventHandlers) OnDiscussionEvent ¶
func (c *EventHandlers) OnDiscussionEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.DiscussionEvent)) *EventHandlers
OnDiscussionEvent DiscussionEvent handler.
func (*EventHandlers) OnForkEvent ¶
func (c *EventHandlers) OnForkEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.ForkEvent)) *EventHandlers
OnForkEvent ForkEvent handler.
func (*EventHandlers) OnGitHubAppAuthorizationEvent ¶
func (c *EventHandlers) OnGitHubAppAuthorizationEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.GitHubAppAuthorizationEvent)) *EventHandlers
OnGitHubAppAuthorizationEvent GitHubAppAuthorizationEvent handler.
func (*EventHandlers) OnGollumEvent ¶
func (c *EventHandlers) OnGollumEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.GollumEvent)) *EventHandlers
OnGollumEvent GollumEvent handler.
func (*EventHandlers) OnInstallationEvent ¶
func (c *EventHandlers) OnInstallationEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.InstallationEvent)) *EventHandlers
OnInstallationEvent InstallationEvent handler.
func (*EventHandlers) OnInstallationRepositoriesEvent ¶
func (c *EventHandlers) OnInstallationRepositoriesEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.InstallationRepositoriesEvent)) *EventHandlers
OnInstallationRepositoriesEvent InstallationRepositoriesEvent handler.
func (*EventHandlers) OnIssueCommentEvent ¶
func (c *EventHandlers) OnIssueCommentEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.IssueCommentEvent)) *EventHandlers
OnIssueCommentEvent IssueCommentEvent handler.
func (*EventHandlers) OnIssuesEvent ¶
func (c *EventHandlers) OnIssuesEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.IssuesEvent)) *EventHandlers
OnIssuesEvent IssuesEvent handler.
func (*EventHandlers) OnLabelEvent ¶
func (c *EventHandlers) OnLabelEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.LabelEvent)) *EventHandlers
OnLabelEvent LabelEvent handler.
func (*EventHandlers) OnMarketplacePurchaseEvent ¶
func (c *EventHandlers) OnMarketplacePurchaseEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.MarketplacePurchaseEvent)) *EventHandlers
OnMarketplacePurchaseEvent MarketplacePurchaseEvent handler.
func (*EventHandlers) OnMemberEvent ¶
func (c *EventHandlers) OnMemberEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.MemberEvent)) *EventHandlers
OnMemberEvent MemberEvent handler.
func (*EventHandlers) OnMembershipEvent ¶
func (c *EventHandlers) OnMembershipEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.MembershipEvent)) *EventHandlers
OnMembershipEvent MembershipEvent handler.
func (*EventHandlers) OnMetaEvent ¶
func (c *EventHandlers) OnMetaEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.MetaEvent)) *EventHandlers
OnMetaEvent MetaEvent handler.
func (*EventHandlers) OnMilestoneEvent ¶
func (c *EventHandlers) OnMilestoneEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.MilestoneEvent)) *EventHandlers
OnMilestoneEvent MilestoneEvent handler.
func (*EventHandlers) OnOrgBlockEvent ¶
func (c *EventHandlers) OnOrgBlockEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.OrgBlockEvent)) *EventHandlers
OnOrgBlockEvent OrgBlockEvent handler.
func (*EventHandlers) OnOrganizationEvent ¶
func (c *EventHandlers) OnOrganizationEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.OrganizationEvent)) *EventHandlers
OnOrganizationEvent OrganizationEvent handler.
func (*EventHandlers) OnPackageEvent ¶
func (c *EventHandlers) OnPackageEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PackageEvent)) *EventHandlers
OnPackageEvent PackageEvent handler.
func (*EventHandlers) OnPageBuildEvent ¶
func (c *EventHandlers) OnPageBuildEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PageBuildEvent)) *EventHandlers
OnPageBuildEvent PageBuildEvent handler.
func (*EventHandlers) OnPingEvent ¶
func (c *EventHandlers) OnPingEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PingEvent)) *EventHandlers
OnPingEvent PingEvent handler.
func (*EventHandlers) OnProjectCardEvent ¶
func (c *EventHandlers) OnProjectCardEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.ProjectCardEvent)) *EventHandlers
OnProjectCardEvent ProjectCardEvent handler.
func (*EventHandlers) OnProjectColumnEvent ¶
func (c *EventHandlers) OnProjectColumnEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.ProjectColumnEvent)) *EventHandlers
OnProjectColumnEvent ProjectColumnEvent handler.
func (*EventHandlers) OnProjectEvent ¶
func (c *EventHandlers) OnProjectEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.ProjectEvent)) *EventHandlers
OnProjectEvent ProjectEvent handler.
func (*EventHandlers) OnPublicEvent ¶
func (c *EventHandlers) OnPublicEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PublicEvent)) *EventHandlers
OnPublicEvent PublicEvent handler.
func (*EventHandlers) OnPullRequestEvent ¶
func (c *EventHandlers) OnPullRequestEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PullRequestEvent)) *EventHandlers
OnPullRequestEvent PullRequestEvent handler.
func (*EventHandlers) OnPullRequestReviewCommentEvent ¶
func (c *EventHandlers) OnPullRequestReviewCommentEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PullRequestReviewCommentEvent)) *EventHandlers
OnPullRequestReviewCommentEvent PullRequestReviewCommentEvent handler.
func (*EventHandlers) OnPullRequestReviewEvent ¶
func (c *EventHandlers) OnPullRequestReviewEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PullRequestReviewEvent)) *EventHandlers
OnPullRequestReviewEvent PullRequestReviewEvent handler.
func (*EventHandlers) OnPullRequestReviewThreadEvent ¶
func (c *EventHandlers) OnPullRequestReviewThreadEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PullRequestReviewThreadEvent)) *EventHandlers
OnPullRequestReviewThreadEvent PullRequestReviewThreadEvent handler.
func (*EventHandlers) OnPullRequestTargetEvent ¶
func (c *EventHandlers) OnPullRequestTargetEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PullRequestTargetEvent)) *EventHandlers
OnPullRequestTargetEvent PullRequestTargetEvent handler.
func (*EventHandlers) OnPushEvent ¶
func (c *EventHandlers) OnPushEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.PushEvent)) *EventHandlers
OnPushEvent PushEvent handler.
func (*EventHandlers) OnReleaseEvent ¶
func (c *EventHandlers) OnReleaseEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.ReleaseEvent)) *EventHandlers
OnReleaseEvent ReleaseEvent handler.
func (*EventHandlers) OnRepositoryDispatchEvent ¶
func (c *EventHandlers) OnRepositoryDispatchEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.RepositoryDispatchEvent)) *EventHandlers
OnRepositoryDispatchEvent RepositoryDispatchEvent handler.
func (*EventHandlers) OnRepositoryEvent ¶
func (c *EventHandlers) OnRepositoryEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.RepositoryEvent)) *EventHandlers
OnRepositoryEvent RepositoryEvent handler.
func (*EventHandlers) OnRepositoryImportEvent ¶ added in v4.1.0
func (c *EventHandlers) OnRepositoryImportEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.RepositoryImportEvent)) *EventHandlers
OnRepositoryImportEvent RepositoryImportEvent handler.
func (*EventHandlers) OnRepositoryVulnerabilityAlertEvent ¶
func (c *EventHandlers) OnRepositoryVulnerabilityAlertEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.RepositoryVulnerabilityAlertEvent)) *EventHandlers
OnRepositoryVulnerabilityAlertEvent RepositoryVulnerabilityAlertEvent handler.
func (*EventHandlers) OnSecretScanningAlertEvent ¶
func (c *EventHandlers) OnSecretScanningAlertEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.SecretScanningAlertEvent)) *EventHandlers
OnSecretScanningAlertEvent SecretScanningAlertEvent handler.
func (*EventHandlers) OnStarEvent ¶
func (c *EventHandlers) OnStarEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.StarEvent)) *EventHandlers
OnStarEvent StarEvent handler.
func (*EventHandlers) OnStatusEvent ¶
func (c *EventHandlers) OnStatusEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.StatusEvent)) *EventHandlers
OnStatusEvent StatusEvent handler.
func (*EventHandlers) OnTeamAddEvent ¶
func (c *EventHandlers) OnTeamAddEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.TeamAddEvent)) *EventHandlers
OnTeamAddEvent TeamAddEvent handler.
func (*EventHandlers) OnTeamEvent ¶
func (c *EventHandlers) OnTeamEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.TeamEvent)) *EventHandlers
OnTeamEvent TeamEvent handler.
func (*EventHandlers) OnUserEvent ¶
func (c *EventHandlers) OnUserEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.UserEvent)) *EventHandlers
OnUserEvent UserEvent handler.
func (*EventHandlers) OnWatchEvent ¶
func (c *EventHandlers) OnWatchEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.WatchEvent)) *EventHandlers
OnWatchEvent WatchEvent handler.
func (*EventHandlers) OnWorkflowDispatchEvent ¶
func (c *EventHandlers) OnWorkflowDispatchEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.WorkflowDispatchEvent)) *EventHandlers
OnWorkflowDispatchEvent WorkflowDispatchEvent handler.
func (*EventHandlers) OnWorkflowJobEvent ¶
func (c *EventHandlers) OnWorkflowJobEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.WorkflowJobEvent)) *EventHandlers
OnWorkflowJobEvent WorkflowJobEvent handler.
func (*EventHandlers) OnWorkflowRunEvent ¶
func (c *EventHandlers) OnWorkflowRunEvent(eventHandler func(uri *url.URL, deliveryID string, event *github.WorkflowRunEvent)) *EventHandlers
OnWorkflowRunEvent WorkflowRunEvent handler.
type WebHook ¶
type WebHook struct {
// contains filtered or unexported fields
}
WebHook server.
func NewWebHook ¶
func NewWebHook(eventHandlers *EventHandlers, options ...serverOption) *WebHook
NewWebHook create a new server as a GitHub WebHook.
func (*WebHook) ListenAndServe ¶
ListenAndServe run GitHub WebHook server.