...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package gitlab
18
19 import "time"
20
21
22
23 type systemHookEvent struct {
24 BaseSystemEvent
25 ObjectKind string `json:"object_kind"`
26 }
27
28
29
30
31
32 type BaseSystemEvent struct {
33 EventName string `json:"event_name"`
34 CreatedAt string `json:"created_at"`
35 UpdatedAt string `json:"updated_at"`
36 }
37
38
39
40
41
42 type ProjectSystemEvent struct {
43 BaseSystemEvent
44 Name string `json:"name"`
45 Path string `json:"path"`
46 PathWithNamespace string `json:"path_with_namespace"`
47 ProjectID int `json:"project_id"`
48 OwnerName string `json:"owner_name"`
49 OwnerEmail string `json:"owner_email"`
50 ProjectVisibility string `json:"project_visibility"`
51 OldPathWithNamespace string `json:"old_path_with_namespace,omitempty"`
52 }
53
54
55
56
57
58 type GroupSystemEvent struct {
59 BaseSystemEvent
60 Name string `json:"name"`
61 Path string `json:"path"`
62 PathWithNamespace string `json:"full_path"`
63 GroupID int `json:"group_id"`
64 OwnerName string `json:"owner_name"`
65 OwnerEmail string `json:"owner_email"`
66 ProjectVisibility string `json:"project_visibility"`
67 OldPath string `json:"old_path,omitempty"`
68 OldPathWithNamespace string `json:"old_full_path,omitempty"`
69 }
70
71
72
73
74
75 type KeySystemEvent struct {
76 BaseSystemEvent
77 ID int `json:"id"`
78 Username string `json:"username"`
79 Key string `json:"key"`
80 }
81
82
83
84
85
86 type UserSystemEvent struct {
87 BaseSystemEvent
88 ID int `json:"user_id"`
89 Name string `json:"name"`
90 Username string `json:"username"`
91 OldUsername string `json:"old_username,omitempty"`
92 Email string `json:"email"`
93 State string `json:"state,omitempty"`
94 }
95
96
97
98
99
100 type UserGroupSystemEvent struct {
101 BaseSystemEvent
102 ID int `json:"user_id"`
103 Name string `json:"user_name"`
104 Username string `json:"user_username"`
105 Email string `json:"user_email"`
106 GroupID int `json:"group_id"`
107 GroupName string `json:"group_name"`
108 GroupPath string `json:"group_path"`
109 GroupAccess string `json:"group_access"`
110 }
111
112
113
114
115
116 type UserTeamSystemEvent struct {
117 BaseSystemEvent
118 ID int `json:"user_id"`
119 Name string `json:"user_name"`
120 Username string `json:"user_username"`
121 Email string `json:"user_email"`
122 ProjectID int `json:"project_id"`
123 ProjectName string `json:"project_name"`
124 ProjectPath string `json:"project_path"`
125 ProjectPathWithNamespace string `json:"project_path_with_namespace"`
126 ProjectVisibility string `json:"project_visibility"`
127 AccessLevel string `json:"access_level"`
128 }
129
130
131
132
133
134 type PushSystemEvent struct {
135 BaseSystemEvent
136 Before string `json:"before"`
137 After string `json:"after"`
138 Ref string `json:"ref"`
139 CheckoutSHA string `json:"checkout_sha"`
140 UserID int `json:"user_id"`
141 UserName string `json:"user_name"`
142 UserUsername string `json:"user_username"`
143 UserEmail string `json:"user_email"`
144 UserAvatar string `json:"user_avatar"`
145 ProjectID int `json:"project_id"`
146 Project struct {
147 Name string `json:"name"`
148 Description string `json:"description"`
149 WebURL string `json:"web_url"`
150 AvatarURL string `json:"avatar_url"`
151 GitHTTPURL string `json:"git_http_url"`
152 GitSSHURL string `json:"git_ssh_url"`
153 Namespace string `json:"namespace"`
154 VisibilityLevel int `json:"visibility_level"`
155 PathWithNamespace string `json:"path_with_namespace"`
156 DefaultBranch string `json:"default_branch"`
157 Homepage string `json:"homepage"`
158 URL string `json:"url"`
159 } `json:"project"`
160 Commits []struct {
161 ID string `json:"id"`
162 Message string `json:"message"`
163 Timestamp time.Time `json:"timestamp"`
164 URL string `json:"url"`
165 Author struct {
166 Name string `json:"name"`
167 Email string `json:"email"`
168 } `json:"author"`
169 } `json:"commits"`
170 TotalCommitsCount int `json:"total_commits_count"`
171 }
172
173
174
175
176
177 type TagPushSystemEvent struct {
178 BaseSystemEvent
179 Before string `json:"before"`
180 After string `json:"after"`
181 Ref string `json:"ref"`
182 CheckoutSHA string `json:"checkout_sha"`
183 UserID int `json:"user_id"`
184 UserName string `json:"user_name"`
185 UserUsername string `json:"user_username"`
186 UserEmail string `json:"user_email"`
187 UserAvatar string `json:"user_avatar"`
188 ProjectID int `json:"project_id"`
189 Project struct {
190 Name string `json:"name"`
191 Description string `json:"description"`
192 WebURL string `json:"web_url"`
193 AvatarURL string `json:"avatar_url"`
194 GitHTTPURL string `json:"git_http_url"`
195 GitSSHURL string `json:"git_ssh_url"`
196 Namespace string `json:"namespace"`
197 VisibilityLevel int `json:"visibility_level"`
198 PathWithNamespace string `json:"path_with_namespace"`
199 DefaultBranch string `json:"default_branch"`
200 Homepage string `json:"homepage"`
201 URL string `json:"url"`
202 } `json:"project"`
203 Commits []struct {
204 ID string `json:"id"`
205 Message string `json:"message"`
206 Timestamp time.Time `json:"timestamp"`
207 URL string `json:"url"`
208 Author struct {
209 Name string `json:"name"`
210 Email string `json:"email"`
211 } `json:"author"`
212 } `json:"commits"`
213 TotalCommitsCount int `json:"total_commits_count"`
214 }
215
216
217
218
219
220 type RepositoryUpdateSystemEvent struct {
221 BaseSystemEvent
222 UserID int `json:"user_id"`
223 UserName string `json:"user_name"`
224 UserEmail string `json:"user_email"`
225 UserAvatar string `json:"user_avatar"`
226 ProjectID int `json:"project_id"`
227 Project struct {
228 ID int `json:"id"`
229 Name string `json:"name"`
230 Description string `json:"description"`
231 WebURL string `json:"web_url"`
232 AvatarURL string `json:"avatar_url"`
233 GitHTTPURL string `json:"git_http_url"`
234 GitSSHURL string `json:"git_ssh_url"`
235 Namespace string `json:"namespace"`
236 VisibilityLevel int `json:"visibility_level"`
237 PathWithNamespace string `json:"path_with_namespace"`
238 DefaultBranch string `json:"default_branch"`
239 CiConfigPath string `json:"ci_config_path"`
240 Homepage string `json:"homepage"`
241 URL string `json:"url"`
242 } `json:"project"`
243 Changes []struct {
244 Before string `json:"before"`
245 After string `json:"after"`
246 Ref string `json:"ref"`
247 } `json:"changes"`
248 Refs []string `json:"refs"`
249 }
250
View as plain text