Documentation ¶
Overview ¶
Package webhook contains Inertia's webhook parsing code
Index ¶
Constants ¶
View Source
const ( PushEvent EventType = "push" PullEvent EventType = "pull" PingEvent EventType = "ping" // Hosts GitHub = "github" GitLab = "gitlab" BitBucket = "bitbucket" )
Constants for the generic webhook interface
Variables ¶
View Source
var ( GithubPingHeader = "ping" GithubPushHeader = "push" )
x-github-event header values
View Source
var (
BitbucketPushHeader = "repo:push"
)
x-event-key header values
View Source
var (
GitlabPushHeader = "Push Hook"
)
x-gitlab-event header values
Functions ¶
Types ¶
type DockerWebhook ¶ added in v0.4.2
type DockerWebhook struct {
// contains filtered or unexported fields
}
DockerWebhook represents a push to DockerHub see https://docs.docker.com/docker-hub/webhooks/
func ParseDocker ¶ added in v0.4.2
func ParseDocker(r *http.Request) (*DockerWebhook, error)
ParseDocker takes in a Docker webhook request and parses it
func (*DockerWebhook) GetName ¶ added in v0.4.2
func (d *DockerWebhook) GetName() string
GetName returns the namespace
func (*DockerWebhook) GetOwner ¶ added in v0.4.2
func (d *DockerWebhook) GetOwner() string
GetOwner returns the repository owner
func (*DockerWebhook) GetPusher ¶ added in v0.4.2
func (d *DockerWebhook) GetPusher() string
GetPusher returns the user that pushed to DockerHub
func (*DockerWebhook) GetRepoName ¶ added in v0.4.2
func (d *DockerWebhook) GetRepoName() string
GetRepoName returns the full repository name
func (*DockerWebhook) GetTag ¶ added in v0.4.2
func (d *DockerWebhook) GetTag() string
GetTag returns the tag that was pushed to DockerHub
Click to show internal directories.
Click to hide internal directories.