aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/xanzy/go-gitlab/events.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/events.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/events.go343
1 files changed, 174 insertions, 169 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/events.go b/vendor/github.com/xanzy/go-gitlab/events.go
index 7ba02df..9f63fb0 100644
--- a/vendor/github.com/xanzy/go-gitlab/events.go
+++ b/vendor/github.com/xanzy/go-gitlab/events.go
@@ -1,5 +1,5 @@
//
-// Copyright 2015, Sander van Harmelen
+// Copyright 2017, Sander van Harmelen
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import "time"
// PushEvent represents a push event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#push-events
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#push-events
type PushEvent struct {
ObjectKind string `json:"object_kind"`
Before string `json:"before"`
@@ -34,20 +34,20 @@ type PushEvent struct {
UserAvatar string `json:"user_avatar"`
ProjectID int `json:"project_id"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
Repository *Repository `json:"repository"`
Commits []*Commit `json:"commits"`
@@ -57,7 +57,7 @@ type PushEvent struct {
// TagEvent represents a tag event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#tag-events
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#tag-events
type TagEvent struct {
ObjectKind string `json:"object_kind"`
Before string `json:"before"`
@@ -69,20 +69,20 @@ type TagEvent struct {
UserAvatar string `json:"user_avatar"`
ProjectID int `json:"project_id"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
Repository *Repository `json:"repository"`
Commits []*Commit `json:"commits"`
@@ -92,25 +92,25 @@ type TagEvent struct {
// IssueEvent represents a issue event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#issues-events
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#issues-events
type IssueEvent struct {
ObjectKind string `json:"object_kind"`
User *User `json:"user"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
Repository *Repository `json:"repository"`
ObjectAttributes struct {
@@ -140,26 +140,26 @@ type IssueEvent struct {
// CommitCommentEvent represents a comment on a commit event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#comment-on-commit
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#comment-on-commit
type CommitCommentEvent struct {
ObjectKind string `json:"object_kind"`
User *User `json:"user"`
ProjectID int `json:"project_id"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
Repository *Repository `json:"repository"`
ObjectAttributes struct {
@@ -192,26 +192,26 @@ type CommitCommentEvent struct {
// MergeCommentEvent represents a comment on a merge event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#comment-on-merge-request
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#comment-on-merge-request
type MergeCommentEvent struct {
ObjectKind string `json:"object_kind"`
User *User `json:"user"`
ProjectID int `json:"project_id"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
Repository *Repository `json:"repository"`
ObjectAttributes struct {
@@ -236,26 +236,26 @@ type MergeCommentEvent struct {
// IssueCommentEvent represents a comment on an issue event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#comment-on-issue
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#comment-on-issue
type IssueCommentEvent struct {
ObjectKind string `json:"object_kind"`
User *User `json:"user"`
ProjectID int `json:"project_id"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
Repository *Repository `json:"repository"`
ObjectAttributes struct {
@@ -280,26 +280,26 @@ type IssueCommentEvent struct {
// SnippetCommentEvent represents a comment on a snippet event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#comment-on-code-snippet
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#comment-on-code-snippet
type SnippetCommentEvent struct {
ObjectKind string `json:"object_kind"`
User *User `json:"user"`
ProjectID int `json:"project_id"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
Repository *Repository `json:"repository"`
ObjectAttributes struct {
@@ -324,25 +324,25 @@ type SnippetCommentEvent struct {
// MergeEvent represents a merge event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#merge-request-events
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#merge-request-events
type MergeEvent struct {
ObjectKind string `json:"object_kind"`
User *User `json:"user"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
ObjectAttributes struct {
ID int `json:"id"`
@@ -407,25 +407,25 @@ type MergeEvent struct {
// WikiPageEvent represents a wiki page event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#wiki-page-events
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#wiki-page-events
type WikiPageEvent struct {
ObjectKind string `json:"object_kind"`
User *User `json:"user"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
Wiki struct {
WebURL string `json:"web_url"`
@@ -448,7 +448,7 @@ type WikiPageEvent struct {
// PipelineEvent represents a pipeline event.
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#pipeline-events
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#pipeline-events
type PipelineEvent struct {
ObjectKind string `json:"object_kind"`
ObjectAttributes struct {
@@ -469,20 +469,20 @@ type PipelineEvent struct {
AvatarURL string `json:"avatar_url"`
} `json:"user"`
Project struct {
- Name string `json:"name"`
- Description string `json:"description"`
- AvatarURL string `json:"avatar_url"`
- GitSSHURL string `json:"git_ssh_url"`
- GitHTTPURL string `json:"git_http_url"`
- Namespace string `json:"namespace"`
- 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"`
- WebURL string `json:"web_url"`
- VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ AvatarURL string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ 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"`
+ WebURL string `json:"web_url"`
+ Visibility VisibilityValue `json:"visibility"`
} `json:"project"`
Commit struct {
ID string `json:"id"`
@@ -509,10 +509,15 @@ type PipelineEvent struct {
Username string `json:"username"`
AvatarURL string `json:"avatar_url"`
} `json:"user"`
- Runner string `json:"runner"`
+ Runner struct {
+ ID int `json:"id"`
+ Description string `json:"description"`
+ Active bool `json:"active"`
+ IsShared bool `json:"is_shared"`
+ } `json:"runner"`
ArtifactsFile struct {
Filename string `json:"filename"`
- Size string `json:"size"`
+ Size int `json:"size"`
} `json:"artifacts_file"`
} `json:"builds"`
}
@@ -520,23 +525,23 @@ type PipelineEvent struct {
//BuildEvent represents a build event
//
// GitLab API docs:
-// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/web_hooks/web_hooks.md#build-events
+// https://docs.gitlab.com/ce/web_hooks/web_hooks.html#build-events
type BuildEvent struct {
- ObjectKind string `json:"object_kind"`
- 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 string `json:"build_duration"`
- BuildAllowFailure bool `json:"build_allow_failure"`
- ProjectID int `json:"project_id"`
- ProjectName string `json:"project_name"`
+ ObjectKind string `json:"object_kind"`
+ 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 float64 `json:"build_duration"`
+ BuildAllowFailure bool `json:"build_allow_failure"`
+ ProjectID int `json:"project_id"`
+ ProjectName string `json:"project_name"`
User struct {
ID int `json:"id"`
Name string `json:"name"`