Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating incident.go #75

Merged
merged 1 commit into from
Aug 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions incident.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,25 @@ type Assignment struct {
Assignee APIObject
}

// AlertCounts is the data structure for the alert counts of an incident
type AlertCounts struct {
All uint `json:"all"`
Triggered uint `json:"triggered"`
Resolved uint `json:"resolved"`
}

// AlertCounts is the data structure for the resolve reason of an incident
type ResolveReason struct {
Type string `json:"type"`
Incident APIObject `json:"incident"`
}

// Incident is a normalized, de-duplicated event generated by a PagerDuty integration.
type Incident struct {
APIObject
IncidentNumber uint `json:"incident_number,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
PendingActions []PendingAction `json:"pending_actions,omitempty"`
IncidentKey string `json:"incident_key,omitempty"`
Expand All @@ -41,6 +56,11 @@ type Incident struct {
Teams []APIObject `json:"teams,omitempty"`
Urgency string `json:"urgency,omitempty"`
Status string `json:"status,omitempty"`
ImpactedServices []APIObject `json:"impacted_services,omitempty"`
AlertCounts AlertCounts `json:"alert_counts,omitempty"`
IsMergeable bool `json:"is_mergeable,omitempty"`
Importance string `json:"importance,omitempty"`
ResolveReason ResolveReason `json:"resolve_reason,omitempty"`
}

// ListIncidentsResponse is the response structure when calling the ListIncident API endpoint.
Expand Down