Versions in this module Expand all Collapse all v1 v1.0.0 Jun 13, 2022 Changes in this version + var ErrEventNotFound = errors.New("event not defined to be parsed") + var ErrEventNotSpecifiedToParse = errors.New("no Event specified to parse") + var ErrHMACVerificationFailed = errors.New("HMAC verification failed") + var ErrInvalidHTTPMethod = errors.New("invalid HTTP Method") + var ErrMissingEventKeyHeader = errors.New("missing X-Event-Key Header") + var ErrMissingHubSignatureHeader = errors.New("missing X-Hub-Signature Header") + var ErrParsingPayload = errors.New("error parsing payload") + var Options = WebhookOptions + type Comment struct + Author User + Comments []map[string]interface{} + CreatedDate uint64 + ID uint64 + PermittedOperations map[string]interface{} + Properties map[string]interface{} + Tasks []map[string]interface{} + Text string + UpdatedDate uint64 + Version uint64 + type Date time.Time + func (b *Date) UnmarshalJSON(p []byte) error + func (b Date) MarshalJSON() ([]byte, error) + type DiagnosticsPingPayload struct + type Event string + const DiagnosticsPingEvent + const PullRequestCommentAddedEvent + const PullRequestCommentDeletedEvent + const PullRequestCommentEditedEvent + const PullRequestDeclinedEvent + const PullRequestDeletedEvent + const PullRequestFromReferenceUpdatedEvent + const PullRequestMergedEvent + const PullRequestModifiedEvent + const PullRequestOpenedEvent + const PullRequestReviewerApprovedEvent + const PullRequestReviewerNeedsWorkEvent + const PullRequestReviewerUnapprovedEvent + const PullRequestReviewerUpdatedEvent + const RepositoryCommentAddedEvent + const RepositoryCommentDeletedEvent + const RepositoryCommentEditedEvent + const RepositoryForkedEvent + const RepositoryModifiedEvent + const RepositoryReferenceChangedEvent + type Option func(*Webhook) error + type Project struct + ID uint64 + Key string + Links map[string]interface{} + Name string + Owner User + Public *bool + Type string + type PullRequest struct + Author PullRequestParticipant + Closed bool + ClosedDate uint64 + CreatedDate uint64 + Description string + FromRef RepositoryReference + ID uint64 + Links map[string]interface{} + Locked bool + Open bool + Participants []PullRequestParticipant + Properties map[string]interface{} + Reviewers []PullRequestParticipant + State string + Title string + ToRef RepositoryReference + UpdatedDate uint64 + Version uint64 + type PullRequestCommentAddedPayload struct + Actor User + Comment Comment + CommentParentID uint64 + Date Date + EventKey Event + PullRequest PullRequest + type PullRequestCommentDeletedPayload struct + Actor User + Comment Comment + CommentParentID uint64 + Date Date + EventKey Event + PullRequest PullRequest + type PullRequestCommentEditedPayload struct + Actor User + Comment Comment + CommentParentID string + Date Date + EventKey Event + PreviousComment string + PullRequest PullRequest + type PullRequestDeclinedPayload struct + Actor User + Date Date + EventKey Event + PullRequest PullRequest + type PullRequestDeletedPayload struct + Actor User + Date Date + EventKey Event + PullRequest PullRequest + type PullRequestFromReferenceUpdatedPayload struct + Actor User + Date Date + EventKey Event + PreviousFromHash string + PullRequest PullRequest + type PullRequestMergedPayload struct + Actor User + Date Date + EventKey Event + PullRequest PullRequest + type PullRequestModifiedPayload struct + Actor User + Date Date + EventKey Event + PreviousDescription string + PreviousTarget map[string]interface{} + PreviousTitle string + PullRequest PullRequest + type PullRequestOpenedPayload struct + Actor User + Date Date + EventKey Event + PullRequest PullRequest + type PullRequestParticipant struct + Approved bool + LastReviewedCommit string + Role string + Status string + User User + type PullRequestReviewerApprovedPayload struct + Actor User + Date Date + EventKey Event + Participant PullRequestParticipant + PreviousStatus string + PullRequest PullRequest + type PullRequestReviewerNeedsWorkPayload struct + Actor User + Date Date + EventKey Event + Participant PullRequestParticipant + PreviousStatus string + PullRequest PullRequest + type PullRequestReviewerUnapprovedPayload struct + Actor User + Date Date + EventKey Event + Participant PullRequestParticipant + PreviousStatus string + PullRequest PullRequest + type PullRequestReviewerUpdatedPayload struct + Actor User + AddedReviewers []User + Date Date + EventKey Event + PullRequest PullRequest + RemovedReviewers []User + type Repository struct + Forkable bool + ID uint64 + Links map[string]interface{} + Name string + Origin *Repository + Project Project + Public bool + ScmID string + Slug string + State string + StatusMessage string + type RepositoryChange struct + FromHash string + Reference RepositoryReference + ReferenceID string + ToHash string + Type string + type RepositoryCommentAddedPayload struct + Actor User + Comment Comment + Commit string + Date Date + EventKey Event + Repository Repository + type RepositoryCommentDeletedPayload struct + Actor User + Comment Comment + Commit string + Date Date + EventKey Event + Repository Repository + type RepositoryCommentEditedPayload struct + Actor User + Comment Comment + Commit string + Date Date + EventKey Event + PreviousComment string + Repository Repository + type RepositoryForkedPayload struct + Actor User + Date Date + EventKey Event + Repository Repository + type RepositoryModifiedPayload struct + Actor User + Date Date + EventKey Event + New Repository + Old Repository + type RepositoryReference struct + DisplayID string + ID string + LatestCommit string + Repository Repository + Type string + type RepositoryReferenceChangedPayload struct + Actor User + Changes []RepositoryChange + Date Date + EventKey Event + Repository Repository + type User struct + Active bool + DisplayName string + EmailAddress string + ID uint64 + Links map[string]interface{} + Name string + Slug string + Type string + type Webhook struct + func New(options ...Option) (*Webhook, error) + func (hook *Webhook) Parse(r *http.Request, events ...Event) (interface{}, error) + type WebhookOptions struct + func (WebhookOptions) Secret(secret string) Option Other modules containing this package github.com/bruno5200/webhooks/v2