Documentation ¶
Index ¶
Constants ¶
View Source
const ( RepoPushEvent = "repo:push" PullRequestMergedEvent = "pullrequest:fulfilled" // BitBucket cloud merged event PrMergedEvent = "pr:merged" // BitBucket server merged event )
View Source
const ( GitLabPushEvents = "Push Hook" GitLabMergeRequestEvents = "Merge Request Hook" )
View Source
const ( GithubEventHeader = "X-Github-Event" BitbucketEventHeader = "X-Event-Key" GitlabEventHeader = "X-Gitlab-Event" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BitBucketPayload ¶
type BitBucketPayload struct {
Repository BitBucketRepository `json:"repository"`
}
type BitBucketRepository ¶
type BitBucketRepository struct { Type string `json:"type"` Links struct { Self struct { Href string `json:"href"` } `json:"self"` HTML struct { Href string `json:"href"` } `json:"html"` Avatar struct { Href string `json:"href"` } `json:"avatar"` } `json:"links"` FullName string `json:"full_name"` Name string `json:"name"` Website string `json:"website"` }
type GitLabPayload ¶
type GitLabPayload struct {
Repository GitLabRepository `json:"repository"`
}
type GitLabRepository ¶
type WebhookListener ¶
type WebhookListener struct { LocalClient client.Client RemoteClient client.Client DynamicClient dynamic.Interface TLSKeyFile string TLSCrtFile string // contains filtered or unexported fields }
WebhookListener is a generic webhook event listener
func CreateWebhookListener ¶
func CreateWebhookListener(config, remoteConfig *rest.Config, scheme *runtime.Scheme, tlsKeyFile, tlsCrtFile string, createService bool) (*WebhookListener, error)
CreateWebhookListener creates a WebHook listener instance
func (*WebhookListener) HandleWebhook ¶
func (listener *WebhookListener) HandleWebhook(w http.ResponseWriter, r *http.Request)
HandleWebhook handles incoming webhook events
func (*WebhookListener) ParseRequest ¶
func (listener *WebhookListener) ParseRequest(r *http.Request) (body []byte, signature string, event interface{}, err error)
ParseRequest parses incoming WebHook event request
Click to show internal directories.
Click to hide internal directories.