Documentation ¶
Index ¶
Constants ¶
View Source
const ( GithubSignatureHeader = "X-Hub-Signature-256" GiteaSignatureHeader = "X-Gitea-Signature" GitlabTokenHeader = "X-Gitlab-Token" )
Variables ¶
View Source
var ( ErrInvalidHTTPMethod = errors.New("invalid http method") ErrParsingPayload = errors.New("failed to parse payload") )
Functions ¶
func GenerateHMAC ¶ added in v0.7.1
Types ¶
type GithubPushPayload ¶
type GithubPushPayload struct { Ref string `json:"ref"` CommitSHA string `json:"after"` Repository struct { Name string `json:"name"` FullName string `json:"full_name"` CloneURL string `json:"clone_url"` Private bool `json:"private"` } `json:"repository"` }
GithubPushPayload is a struct that represents the payload sent by GitHub or Gitea, as they have the same structure
type GitlabPushPayload ¶
type GitlabPushPayload struct { Ref string `json:"ref"` CommitSHA string `json:"after"` Repository struct { Name string `json:"name"` PathWithNamespace string `json:"path_with_namespace"` CloneURL string `json:"http_url"` VisibilityLevel int64 `json:"visibility_level"` } `json:"project"` }
GitlabPushPayload is a struct that represents the payload sent by GitLab
Click to show internal directories.
Click to hide internal directories.