-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathwebhook_events.go
131 lines (114 loc) · 3.59 KB
/
webhook_events.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
package buildkite
// agentEvent is a wrapper for an agent event notification
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentEvent struct {
Event string `json:"event"`
Agent Agent `json:"agent"`
Sender User `json:"sender"`
}
// AgentConnectedEvent is triggered when an agent has connected to the API
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentConnectedEvent struct {
AgentEvent
}
// AgentDisconnectedEvent is triggered when an agent has disconnected.
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentDisconnectedEvent struct {
AgentEvent
}
// AgentLostEvent is triggered when an agent has been marked as lost.
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentLostEvent struct {
AgentEvent
}
// AgentStoppedEvent is triggered when an agent has stopped.
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentStoppedEvent struct {
AgentEvent
}
// AgentStoppingEvent is triggered when an agent is stopping.
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/agent-events
type AgentStoppingEvent struct {
AgentEvent
}
// buildEvent is a wrapper for a build event notification
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildEvent struct {
Event string `json:"event"`
Build Build `json:"build"`
Pipeline Pipeline `json:"pipeline"`
Sender User `json:"sender"`
}
// BuildFailingEvent is triggered when a build enters a failing state
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildFailingEvent struct {
BuildEvent
}
// BuildFinishedEvent is triggered when a build finishes
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildFinishedEvent struct {
BuildEvent
}
// BuildRunningEvent is triggered when a build starts running
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildRunningEvent struct {
BuildEvent
}
// BuildScheduledEvent is triggered when a build is scheduled
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/build-events
type BuildScheduledEvent struct {
BuildEvent
}
// jobEvent is a wrapper for a job event notification
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobEvent struct {
Event string `json:"event"`
Build Build `json:"build"`
Job Job `json:"job"`
Pipeline Pipeline `json:"pipeline"`
Sender User `json:"sender"`
}
// JobActivatedEvent is triggered when a job is activated
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobActivatedEvent struct {
JobEvent
}
// JobFinishedEvent is triggered when a job is finished
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobFinishedEvent struct {
JobEvent
}
// JobScheduledEvent is triggered when a job is scheduled
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobScheduledEvent struct {
JobEvent
}
// JobStartedEvent is triggered when a job is started
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/job-events
type JobStartedEvent struct {
JobEvent
}
// PingEvent is triggered when a webhook notification setting is changed
//
// Buildkite API docs: https://buildkite.com/docs/apis/webhooks/ping-events
type PingEvent struct {
Event string `json:"event"`
Organization Organization `json:"organization"`
Sender User `json:"sender"`
}