Documentation
¶
Index ¶
- func ParseBody(body []byte) (kind string, hook interface{}, err error)
- func ParseReader(in io.Reader) (kind string, hook interface{}, err error)
- type ArtifactFile
- type Build
- type BuildCommit
- type BuildHook
- type Commit
- type Diff
- type Hook
- type Issue
- type IssueHook
- type Label
- type MergeRequest
- type MergeRequestHook
- type Note
- type NoteHook
- type Pipeline
- type PipelineHook
- type Project
- type PushHook
- type Repository
- type Snippet
- type TagHook
- type User
- type Wiki
- type WikiPage
- type WikiPageHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArtifactFile ¶
type Build ¶
type Build struct {
Id int `json:"id"`
Stage string `json:"stage"`
Name string `json:"name"`
Status string `json:"status"`
CreatedAt string `json:"created_at"`
StartedAt *string `json:"started_at"`
FinishedAt *string `json:"finished_at"`
When string `json:"when"`
Manual bool `json:"manual"`
User User `json:"user"`
Runner *string `json:"runner"`
ArtifactsFile ArtifactFile `json:"artifacts_file"`
}
type BuildCommit ¶
type BuildCommit struct {
Id int `json:"id"`
Sha string `json:"sha"`
Message string `json:"message"`
AuthorName string `json:"author_name,omitempty"`
AuthorEmail string `json:"author_email,omitempty"`
Status string `json:"status"`
Duration *int `json:"duration"`
StartedAt *string `json:"started_at"`
FinishedAt *string `json:"finished_at"`
}
type BuildHook ¶
type BuildHook struct {
Hook
Ref string `json:"ref"`
Tag bool `json:"tag"`
BeforeSHA string `json:"before_sha"`
SHA string `json:"sha"`
BuildID int `json:"build_id"`
BuildName string `json:"build_name"`
BuildStage string `json:"build_stage"`
BuildStatus string `json:"build_status"`
BuildStartedAt *string `json:"build_started_at"`
BuildFinishedAt *string `json:"build_finished_at"`
BuildDuration *int `json:"build_duration"`
BuildAllowFailure bool `json:"build_allow_failure"`
ProjectID int `json:"project_id"`
ProjectName string `json:"project_name"`
User User `json:"user"`
Commit BuildCommit `json:"commit"`
Repository Repository `json:"repository"`
}
See https://gitlab.com/help/user/project/integrations/webhooks.md#build-events
type Issue ¶
type Issue struct {
Id int `json:"id"`
Title string `json:"title"`
AssigneeIDs []int `json:"assignee_ids"`
AssigneeID *int `json:"assignee_id"`
AuthorID int `json:"author_id"`
ProjectID int `json:"project_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Position int `json:"position"`
BranchName *string `json:"branch_name"`
Description string `json:"description"`
MilestoneId *int `json:"milestone_id"`
State string `json:"state"`
IId int `json:"iid"`
Url string `json:"url"`
Action string `json:"action"`
}
type IssueHook ¶
type IssueHook struct {
Hook
User User `json:"user"`
Project Project `json:"project"`
Repository Repository `json:"repository"`
ObjectAttributes Issue `json:"object_attributes"`
Assignees []User `json:"assignees"`
Assignee *User `json:"assignee"`
Labels []Label `json:"labels"`
}
See https://gitlab.com/help/user/project/integrations/webhooks.md#issues-events
type Label ¶
type Label struct {
Id int `json:"id"`
Title string `json:"title"`
Color string `json:"color"`
ProjectID int `json:"project_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Template bool `json:"template"`
Description string `json:"description"`
Type string `json:"type"`
GroupID int `json:"group_id"`
}
type MergeRequest ¶
type MergeRequest struct {
Id int `json:"id"`
TargetBranch string `json:"target_branch"`
SourceBranch string `json:"source_branch"`
SourceProjectID int `json:"source_project_id"`
AuthorID int `json:"author_id"`
AssigneeID *int `json:"assignee_id"`
Title string `json:"title"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
StCommits []Commit `json:"st_commits"`
StDiffs []Diff `json:"st_diffs"`
MilestoneId *int `json:"milestone_id"`
State string `json:"state"`
MergeStatus string `json:"merge_status"`
TargetProjectID int `json:"target_project_id"`
IId int `json:"iid"`
Description string `json:"description"`
Position int `json:"position"`
Source Project `json:"source"`
Target Project `json:"target"`
LastCommit Commit `json:"last_commit"`
WorkInProgress bool `json:"work_in_progress"`
Url string `json:"url"`
Action string `json:"action"`
Assignee User `json:"assignee"`
}
type MergeRequestHook ¶
type MergeRequestHook struct {
Hook
User User `json:"user"`
ObjectAttributes MergeRequest `json:"object_attributes"`
}
See https://gitlab.com/help/user/project/integrations/webhooks.md#merge-request-events
type Note ¶
type Note struct {
Id int `json:"id"`
Note string `json:"note"`
NoteableType string `json:"noteable_type"`
AuthorID int `json:"author_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ProjectID int `json:"project_id"`
Attachment *string `json:"attachment"`
LineCode *string `json:"line_code"`
CommitID string `json:"commit_id"`
NoteableID *int `json:"noteable_id"`
System bool `json:"system"`
StDiff *Diff `json:"st_diff"`
Url string `json:"url"`
}
type NoteHook ¶
type NoteHook struct {
Hook
User User `json:"user"`
ProjectID int `json:"project_id"`
Project Project `json:"project"`
Repository Repository `json:"repository"`
ObjectAttributes Note `json:"object_attributes"`
Commit Commit `json:"commit"`
MergeRequest MergeRequest `json:"merge_request"`
Issue Issue `json:"issue"`
Snippet Snippet `json:"snippet"`
}
See https://gitlab.com/help/user/project/integrations/webhooks.md#comment-events
type Pipeline ¶
type Pipeline struct {
Id int `json:"id"`
Ref string `json:"ref"`
Tag bool `json:"tag"`
SHA string `json:"sha"`
BeforeSHA string `json:"before_sha"`
Status string `json:"status"`
Stages []string `json:"stages"`
CreatedAt string `json:"created_at"`
FinishedAt string `json:"finished_at"`
Duration *int `json:"duration"`
}
type PipelineHook ¶
type PipelineHook struct {
Hook
ObjectAttributes Pipeline `json:"object_attributes"`
User User `json:"user"`
Project Project `json:"project"`
Commit Commit `json:"commit"`
Builds []Build `json:"builds"`
}
See https://gitlab.com/help/user/project/integrations/webhooks.md#pipeline-events
type Project ¶
type Project struct {
Name string `json:"name"`
Description string `json:"description"`
WebUrl string `json:"web_url"`
AvatarUrl *string `json:"avatar_url"`
GitSshUrl string `json:"git_ssh_url"`
GitHttpUrl string `json:"git_http_url"`
Namespace string `json:"namespace"`
VisibilityLevel int `json:"visibility_level"`
PathWithNamespace string `json:"path_with_namespace"`
DefaultBranch string `json:"default_branch"`
Homepage string `json:"homepage"`
Url string `json:"url"`
SshUrl string `json:"ssh_url"`
HttpUrl string `json:"http_url"`
}
type PushHook ¶
type PushHook struct {
Hook
Before string `json:"before"`
After string `json:"after"`
Ref string `json:"ref"`
CheckoutSHA string `json:"checkout_sha"`
UserID int `json:"user_id"`
UserName string `json:"user_name"`
UserUsername string `json:"user_username"`
UserEmail string `json:"user_email"`
UserAvatar string `json:"user_avatar"`
ProjectID int `json:"project_id"`
Project Project `json:"project"`
Repository Repository `json:"repository"`
Commits []Commit `json:"commits"`
TotalCommitsCount int `json:"total_commits_count"`
}
See https://gitlab.com/help/user/project/integrations/webhooks.md#push-events
type Repository ¶
type Snippet ¶
type Snippet struct {
Id int `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
AuthorID int `json:"author_id"`
ProjectID int `json:"project_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
FileName string `json:"file_name"`
ExpiresAt string `json:"expires_at"`
Type string `json:"type"`
VisibilityLevel int `json:"visibility_level"`
}
type TagHook ¶
type TagHook struct {
Hook
Before string `json:"before"`
After string `json:"after"`
Ref string `json:"ref"`
CheckoutSHA string `json:"checkout_sha"`
UserID int `json:"user_id"`
UserName string `json:"user_name"`
UserAvatar string `json:"user_avatar"`
ProjectID int `json:"project_id"`
Project Project `json:"project"`
Repository Repository `json:"repository"`
Commits []Commit `json:"commits"`
TotalCommitsCount int `json:"total_commits_count"`
}
See https://gitlab.com/help/user/project/integrations/webhooks.md#tag-events
type WikiPageHook ¶
type WikiPageHook struct {
Hook
User User `json:"user"`
Project Project `json:"project"`
Wiki Wiki `json:"wiki"`
ObjectAttributes WikiPage `json:"object_attributes"`
}
See https://gitlab.com/help/user/project/integrations/webhooks.md#wiki-page-events
Source Files
¶
Click to show internal directories.
Click to hide internal directories.