Documentation ¶
Index ¶
- type APIDetails
- type APIListObject
- type APIObject
- type APIReference
- type Acknowledgement
- type Addon
- type Agent
- type Alert
- type AlertCounts
- type Assignment
- type Channel
- type Client
- func (c *Client) AddEscalationPolicyToTeam(teamID, epID string) error
- func (c *Client) AddUserToTeam(teamID, userID string) error
- func (c *Client) CreateEscalationPolicy(e EscalationPolicy) (*EscalationPolicy, error)
- func (c *Client) CreateEscalationRule(escID string, e EscalationRule) (*EscalationRule, error)
- func (c *Client) CreateIncident(from string, o *CreateIncidentOptions) (*Incident, error)
- func (c *Client) CreateIncidentNote(id string, note IncidentNote) error
- func (c *Client) CreateIntegration(id string, i Integration) (*Integration, error)
- func (c *Client) CreateMaintenanceWindow(from string, o MaintenanceWindow) (*MaintenanceWindow, error)
- func (c *Client) CreateMaintenanceWindows(o MaintenanceWindow) (*MaintenanceWindow, error)
- func (c *Client) CreateOverride(id string, o Override) (*Override, error)
- func (c *Client) CreateSchedule(s Schedule) (*Schedule, error)
- func (c *Client) CreateService(s Service) (*Service, error)
- func (c *Client) CreateTeam(t *Team) (*Team, error)
- func (c *Client) CreateUser(u User) (*User, error)
- func (c *Client) DeleteAddon(id string) error
- func (c *Client) DeleteEscalationPolicy(id string) error
- func (c *Client) DeleteEscalationRule(escID string, id string) error
- func (c *Client) DeleteIntegration(serviceID string, integrationID string) error
- func (c *Client) DeleteMaintenanceWindow(id string) error
- func (c *Client) DeleteOverride(scheduleID, overrideID string) error
- func (c *Client) DeleteSchedule(id string) error
- func (c *Client) DeleteService(id string) error
- func (c *Client) DeleteTeam(id string) error
- func (c *Client) DeleteUser(id string) error
- func (c *Client) GetAddon(id string) (*Addon, error)
- func (c *Client) GetEscalationPolicy(id string, o *GetEscalationPolicyOptions) (*EscalationPolicy, error)
- func (c *Client) GetEscalationRule(escID string, id string, o *GetEscalationRuleOptions) (*EscalationRule, error)
- func (c *Client) GetIncident(id string) (*Incident, error)
- func (c *Client) GetIntegration(serviceID, integrationID string, o GetIntegrationOptions) (*Integration, error)
- func (c *Client) GetLogEntry(id string, o GetLogEntryOptions) (*LogEntry, error)
- func (c *Client) GetMaintenanceWindow(id string, o GetMaintenanceWindowOptions) (*MaintenanceWindow, error)
- func (c *Client) GetSchedule(id string, o GetScheduleOptions) (*Schedule, error)
- func (c *Client) GetService(id string, o *GetServiceOptions) (*Service, error)
- func (c *Client) GetTeam(id string) (*Team, error)
- func (c *Client) GetUser(id string, o GetUserOptions) (*User, error)
- func (c *Client) GetUserContactMethod(userID, id string) (*ContactMethod, error)
- func (c *Client) GetVendor(id string) (*Vendor, error)
- func (c *Client) InstallAddon(a Addon) (*Addon, error)
- func (c *Client) ListAbilities() (*ListAbilityResponse, error)
- func (c *Client) ListAddons(o ListAddonOptions) (*ListAddonResponse, error)
- func (c *Client) ListEscalationPolicies(o ListEscalationPoliciesOptions) (*ListEscalationPoliciesResponse, error)
- func (c *Client) ListEscalationRules(escID string) (*ListEscalationRulesResponse, error)
- func (c *Client) ListIncidentAlerts(id string) (*ListAlertsResponse, error)
- func (c *Client) ListIncidentLogEntries(id string, o ListIncidentLogEntriesOptions) (*ListIncidentLogEntriesResponse, error)
- func (c *Client) ListIncidentNotes(id string) ([]IncidentNote, error)
- func (c *Client) ListIncidents(o ListIncidentsOptions) (*ListIncidentsResponse, error)
- func (c *Client) ListLogEntries(o ListLogEntriesOptions) (*ListLogEntryResponse, error)
- func (c *Client) ListMaintenanceWindows(o ListMaintenanceWindowsOptions) (*ListMaintenanceWindowsResponse, error)
- func (c *Client) ListNotifications(o ListNotificationOptions) (*ListNotificationsResponse, error)
- func (c *Client) ListOnCallUsers(id string, o ListOnCallUsersOptions) ([]User, error)
- func (c *Client) ListOnCalls(o ListOnCallOptions) (*ListOnCallsResponse, error)
- func (c *Client) ListOverrides(id string, o ListOverridesOptions) ([]Override, error)
- func (c *Client) ListPriorities() (*Priorities, error)
- func (c *Client) ListSchedules(o ListSchedulesOptions) (*ListSchedulesResponse, error)
- func (c *Client) ListServices(o ListServiceOptions) (*ListServiceResponse, error)
- func (c *Client) ListTeams(o ListTeamOptions) (*ListTeamResponse, error)
- func (c *Client) ListUserContactMethods(userId string) (*ListContactMethodsResponse, error)
- func (c *Client) ListUsers(o ListUsersOptions) (*ListUsersResponse, error)
- func (c *Client) ListVendors(o ListVendorOptions) (*ListVendorResponse, error)
- func (c *Client) ManageIncidents(from string, incidents []Incident) error
- func (c *Client) MergeIncidents(from string, id string, incidents []Incident) error
- func (c *Client) PreviewSchedule(s Schedule, o PreviewScheduleOptions) error
- func (c *Client) RemoveEscalationPolicyFromTeam(teamID, epID string) error
- func (c *Client) RemoveUserFromTeam(teamID, userID string) error
- func (c *Client) SnoozeIncident(id string, duration uint) error
- func (c *Client) TestAbility(ability string) error
- func (c *Client) UpdateAddon(id string, a Addon) (*Addon, error)
- func (c *Client) UpdateEscalationPolicy(id string, e *EscalationPolicy) (*EscalationPolicy, error)
- func (c *Client) UpdateEscalationRule(escID string, id string, e *EscalationRule) (*EscalationRule, error)
- func (c *Client) UpdateIntegration(serviceID string, i Integration) (*Integration, error)
- func (c *Client) UpdateMaintenanceWindow(m MaintenanceWindow) (*MaintenanceWindow, error)
- func (c *Client) UpdateSchedule(id string, s Schedule) (*Schedule, error)
- func (c *Client) UpdateService(s Service) (*Service, error)
- func (c *Client) UpdateTeam(id string, t *Team) (*Team, error)
- func (c *Client) UpdateUser(u User) (*User, error)
- type ContactMethod
- type Context
- type CreateIncidentOptions
- type EscalationPolicy
- type EscalationRule
- type Event
- type EventResponse
- type GetEscalationPolicyOptions
- type GetEscalationRuleOptions
- type GetIntegrationOptions
- type GetLogEntryOptions
- type GetMaintenanceWindowOptions
- type GetScheduleOptions
- type GetServiceOptions
- type GetUserOptions
- type HTTPClient
- type Incident
- type IncidentAlert
- type IncidentBody
- type IncidentDetail
- type IncidentNote
- type IncidentUrgencyRule
- type IncidentUrgencyType
- type InlineModel
- type Integration
- type ListAbilityResponse
- type ListAddonOptions
- type ListAddonResponse
- type ListAlertResponse
- type ListAlertsResponse
- type ListContactMethodsResponse
- type ListEscalationPoliciesOptions
- type ListEscalationPoliciesResponse
- type ListEscalationRulesResponse
- type ListIncidentLogEntriesOptions
- type ListIncidentLogEntriesResponse
- type ListIncidentsOptions
- type ListIncidentsResponse
- type ListLogEntriesOptions
- type ListLogEntryResponse
- type ListMaintenanceWindowsOptions
- type ListMaintenanceWindowsResponse
- type ListNotificationOptions
- type ListNotificationsResponse
- type ListOnCallOptions
- type ListOnCallUsersOptions
- type ListOnCallsResponse
- type ListOverridesOptions
- type ListSchedulesOptions
- type ListSchedulesResponse
- type ListServiceOptions
- type ListServiceResponse
- type ListTeamOptions
- type ListTeamResponse
- type ListUsersOptions
- type ListUsersResponse
- type ListVendorOptions
- type ListVendorResponse
- type LogEntry
- type MaintenanceWindow
- type Notification
- type NotificationRule
- type OnCall
- type Override
- type PendingAction
- type PreviewScheduleOptions
- type Priorities
- type Priority
- type PriorityProperty
- type RenderedScheduleEntry
- type ResolveReason
- type Restriction
- type Schedule
- type ScheduleLayer
- type ScheduledAction
- type Service
- type SupportHours
- type Team
- type UpdateScheduleOptions
- type User
- type UserReference
- type V2Event
- type V2EventResponse
- type V2Payload
- type Vendor
- type WebhookPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIDetails ¶
type APIListObject ¶
type APIListObject struct { Limit uint `url:"limit,omitempty"` Offset uint `url:"offset,omitempty"` More bool `url:"more,omitempty"` Total uint `url:"total,omitempty"` }
APIListObject are the fields used to control pagination when listing objects.
type APIObject ¶
type APIObject struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Summary string `json:"summary,omitempty"` Self string `json:"self,omitempty"` HTMLURL string `json:"html_url,omitempty"` }
APIObject represents generic api json response that is shared by most domain object (like escalation
type APIReference ¶
APIReference are the fields required to reference another API object.
type Acknowledgement ¶
type Acknowledgement struct { At string `json:"at,omitempty"` Acknowledger APIObject `json:"acknowledger,omitempty"` }
Acknowledgement is the data structure of an acknowledgement of an incident.
type Addon ¶
type Addon struct { APIObject Name string `json:"name,omitempty"` Src string `json:"src,omitempty"` Services []APIObject `json:"services,omitempty"` }
Addon is a third-party add-on to PagerDuty's UI.
type Alert ¶
type Alert struct { APIObject Service APIObject `json:"service,omitempty"` CreatedAt string `json:"created_at,omitempty"` Status string `json:"status,omitempty"` AlertKey string `json:"alert_key,omitempty"` Incident APIObject `json:"incident,omitempty"` }
Alert is a list of all of the alerts that happened to an incident.
type AlertCounts ¶
type AlertCounts struct { Triggered uint `json:"triggered,omitempty"` Resolved uint `json:"resolved,omitempty"` All uint `json:"all,omitempty"` }
AlertCounts is the data structure holding a summary of the number of alerts by status of an incident.
type Assignment ¶
type Assignment struct { At string `json:"at,omitempty"` Assignee APIObject `json:"assignee,omitempty"` }
Assignment is the data structure for an assignment of an incident
type Channel ¶
type Channel struct {
Type string
}
Channel is the means by which the action was carried out.
type Client ¶
type Client struct { // HTTPClient is the HTTP client used for making requests against the // PagerDuty API. You can use either *http.Client here, or your own // implementation. HTTPClient HTTPClient // contains filtered or unexported fields }
Client wraps http client
func (*Client) AddEscalationPolicyToTeam ¶
AddEscalationPolicyToTeam adds an escalation policy to a team.
func (*Client) AddUserToTeam ¶
AddUserToTeam adds a user to a team.
func (*Client) CreateEscalationPolicy ¶
func (c *Client) CreateEscalationPolicy(e EscalationPolicy) (*EscalationPolicy, error)
CreateEscalationPolicy creates a new escalation policy.
func (*Client) CreateEscalationRule ¶
func (c *Client) CreateEscalationRule(escID string, e EscalationRule) (*EscalationRule, error)
CreateEscalationRule creates a new escalation rule for an escalation policy and appends it to the end of the existing escalation rules.
func (*Client) CreateIncident ¶
func (c *Client) CreateIncident(from string, o *CreateIncidentOptions) (*Incident, error)
CreateIncident creates an incident synchronously without a corresponding event from a monitoring service.
func (*Client) CreateIncidentNote ¶
func (c *Client) CreateIncidentNote(id string, note IncidentNote) error
CreateIncidentNote creates a new note for the specified incident.
func (*Client) CreateIntegration ¶
func (c *Client) CreateIntegration(id string, i Integration) (*Integration, error)
CreateIntegration creates a new integration belonging to a service.
func (*Client) CreateMaintenanceWindow ¶
func (c *Client) CreateMaintenanceWindow(from string, o MaintenanceWindow) (*MaintenanceWindow, error)
CreateMaintenanceWindow creates a new maintenance window for the specified services.
func (*Client) CreateMaintenanceWindows ¶
func (c *Client) CreateMaintenanceWindows(o MaintenanceWindow) (*MaintenanceWindow, error)
CreateMaintenanceWindows creates a new maintenance window for the specified services. Deprecated: Use `CreateMaintenanceWindow` instead.
func (*Client) CreateOverride ¶
CreateOverride creates an override for a specific user covering the specified time range.
func (*Client) CreateSchedule ¶
CreateSchedule creates a new on-call schedule.
func (*Client) CreateService ¶
CreateService creates a new service.
func (*Client) CreateTeam ¶
CreateTeam creates a new team.
func (*Client) CreateUser ¶
CreateUser creates a new user.
func (*Client) DeleteAddon ¶
DeleteAddon deletes an add-on from your account.
func (*Client) DeleteEscalationPolicy ¶
DeleteEscalationPolicy deletes an existing escalation policy and rules.
func (*Client) DeleteEscalationRule ¶
DeleteEscalationRule deletes an existing escalation rule.
func (*Client) DeleteIntegration ¶
DeleteIntegration deletes an existing integration.
func (*Client) DeleteMaintenanceWindow ¶
DeleteMaintenanceWindow deletes an existing maintenance window if it's in the future, or ends it if it's currently on-going.
func (*Client) DeleteOverride ¶
DeleteOverride removes an override.
func (*Client) DeleteSchedule ¶
DeleteSchedule deletes an on-call schedule.
func (*Client) DeleteService ¶
DeleteService deletes an existing service.
func (*Client) DeleteTeam ¶
DeleteTeam removes an existing team.
func (*Client) GetEscalationPolicy ¶
func (c *Client) GetEscalationPolicy(id string, o *GetEscalationPolicyOptions) (*EscalationPolicy, error)
GetEscalationPolicy gets information about an existing escalation policy and its rules.
func (*Client) GetEscalationRule ¶
func (c *Client) GetEscalationRule(escID string, id string, o *GetEscalationRuleOptions) (*EscalationRule, error)
GetEscalationRule gets information about an existing escalation rule.
func (*Client) GetIncident ¶
GetIncident shows detailed information about an incident.
func (*Client) GetIntegration ¶
func (c *Client) GetIntegration(serviceID, integrationID string, o GetIntegrationOptions) (*Integration, error)
GetIntegration gets details about an integration belonging to a service.
func (*Client) GetLogEntry ¶
func (c *Client) GetLogEntry(id string, o GetLogEntryOptions) (*LogEntry, error)
GetLogEntry list log entries for the specified incident.
func (*Client) GetMaintenanceWindow ¶
func (c *Client) GetMaintenanceWindow(id string, o GetMaintenanceWindowOptions) (*MaintenanceWindow, error)
GetMaintenanceWindow gets an existing maintenance window.
func (*Client) GetSchedule ¶
func (c *Client) GetSchedule(id string, o GetScheduleOptions) (*Schedule, error)
GetSchedule shows detailed information about a schedule, including entries for each layer and sub-schedule.
func (*Client) GetService ¶
func (c *Client) GetService(id string, o *GetServiceOptions) (*Service, error)
GetService gets details about an existing service.
func (*Client) GetUser ¶
func (c *Client) GetUser(id string, o GetUserOptions) (*User, error)
GetUser gets details about an existing user.
func (*Client) GetUserContactMethod ¶
func (c *Client) GetUserContactMethod(userID, id string) (*ContactMethod, error)
GetContactMethod gets details about a contact method.
func (*Client) InstallAddon ¶
InstallAddon installs an add-on for your account.
func (*Client) ListAbilities ¶
func (c *Client) ListAbilities() (*ListAbilityResponse, error)
ListAbilities lists all abilities on your account.
func (*Client) ListAddons ¶
func (c *Client) ListAddons(o ListAddonOptions) (*ListAddonResponse, error)
ListAddons lists all of the add-ons installed on your account.
func (*Client) ListEscalationPolicies ¶
func (c *Client) ListEscalationPolicies(o ListEscalationPoliciesOptions) (*ListEscalationPoliciesResponse, error)
ListEscalationPolicies lists all of the existing escalation policies.
func (*Client) ListEscalationRules ¶
func (c *Client) ListEscalationRules(escID string) (*ListEscalationRulesResponse, error)
ListEscalationRules lists all of the escalation rules for an existing escalation policy.
func (*Client) ListIncidentAlerts ¶
func (c *Client) ListIncidentAlerts(id string) (*ListAlertsResponse, error)
ListIncidentAlerts lists existing alerts for the specified incident.
func (*Client) ListIncidentLogEntries ¶
func (c *Client) ListIncidentLogEntries(id string, o ListIncidentLogEntriesOptions) (*ListIncidentLogEntriesResponse, error)
ListIncidentLogEntries lists existing log entries for the specified incident.
func (*Client) ListIncidentNotes ¶
func (c *Client) ListIncidentNotes(id string) ([]IncidentNote, error)
ListIncidentNotes lists existing notes for the specified incident.
func (*Client) ListIncidents ¶
func (c *Client) ListIncidents(o ListIncidentsOptions) (*ListIncidentsResponse, error)
ListIncidents lists existing incidents.
func (*Client) ListLogEntries ¶
func (c *Client) ListLogEntries(o ListLogEntriesOptions) (*ListLogEntryResponse, error)
ListLogEntries lists all of the incident log entries across the entire account.
func (*Client) ListMaintenanceWindows ¶
func (c *Client) ListMaintenanceWindows(o ListMaintenanceWindowsOptions) (*ListMaintenanceWindowsResponse, error)
ListMaintenanceWindows lists existing maintenance windows, optionally filtered by service and/or team, or whether they are from the past, present or future.
func (*Client) ListNotifications ¶
func (c *Client) ListNotifications(o ListNotificationOptions) (*ListNotificationsResponse, error)
ListNotifications lists notifications for a given time range, optionally filtered by type (sms_notification, email_notification, phone_notification, or push_notification).
func (*Client) ListOnCallUsers ¶
func (c *Client) ListOnCallUsers(id string, o ListOnCallUsersOptions) ([]User, error)
ListOnCallUsers lists all of the users on call in a given schedule for a given time range.
func (*Client) ListOnCalls ¶
func (c *Client) ListOnCalls(o ListOnCallOptions) (*ListOnCallsResponse, error)
ListOnCalls list the on-call entries during a given time range.
func (*Client) ListOverrides ¶
func (c *Client) ListOverrides(id string, o ListOverridesOptions) ([]Override, error)
ListOverrides lists overrides for a given time range.
func (*Client) ListPriorities ¶
func (c *Client) ListPriorities() (*Priorities, error)
ListPriorities lists existing priorities
func (*Client) ListSchedules ¶
func (c *Client) ListSchedules(o ListSchedulesOptions) (*ListSchedulesResponse, error)
ListSchedules lists the on-call schedules.
func (*Client) ListServices ¶
func (c *Client) ListServices(o ListServiceOptions) (*ListServiceResponse, error)
ListServices lists existing services.
func (*Client) ListTeams ¶
func (c *Client) ListTeams(o ListTeamOptions) (*ListTeamResponse, error)
ListTeams lists teams of your PagerDuty account, optionally filtered by a search query.
func (*Client) ListUserContactMethods ¶
func (c *Client) ListUserContactMethods(userId string) (*ListContactMethodsResponse, error)
ListUserContactMethod fetches contact methods of the existing user.
func (*Client) ListUsers ¶
func (c *Client) ListUsers(o ListUsersOptions) (*ListUsersResponse, error)
ListUsers lists users of your PagerDuty account, optionally filtered by a search query.
func (*Client) ListVendors ¶
func (c *Client) ListVendors(o ListVendorOptions) (*ListVendorResponse, error)
ListVendors lists existing vendors.
func (*Client) ManageIncidents ¶
ManageIncidents acknowledges, resolves, escalates, or reassigns one or more incidents.
func (*Client) MergeIncidents ¶
MergeIncidents a list of source incidents into a specified incident.
func (*Client) PreviewSchedule ¶
func (c *Client) PreviewSchedule(s Schedule, o PreviewScheduleOptions) error
PreviewSchedule previews what an on-call schedule would look like without saving it.
func (*Client) RemoveEscalationPolicyFromTeam ¶
RemoveEscalationPolicyFromTeam removes an escalation policy from a team.
func (*Client) RemoveUserFromTeam ¶
RemoveUserFromTeam removes a user from a team.
func (*Client) SnoozeIncident ¶
SnoozeIncident sets an incident to not alert for a specified period of time.
func (*Client) TestAbility ¶
TestAbility Check if your account has the given ability.
func (*Client) UpdateAddon ¶
UpdateAddon updates an existing add-on.
func (*Client) UpdateEscalationPolicy ¶
func (c *Client) UpdateEscalationPolicy(id string, e *EscalationPolicy) (*EscalationPolicy, error)
UpdateEscalationPolicy updates an existing escalation policy and its rules.
func (*Client) UpdateEscalationRule ¶
func (c *Client) UpdateEscalationRule(escID string, id string, e *EscalationRule) (*EscalationRule, error)
UpdateEscalationRule updates an existing escalation rule.
func (*Client) UpdateIntegration ¶
func (c *Client) UpdateIntegration(serviceID string, i Integration) (*Integration, error)
UpdateIntegration updates an integration belonging to a service.
func (*Client) UpdateMaintenanceWindow ¶
func (c *Client) UpdateMaintenanceWindow(m MaintenanceWindow) (*MaintenanceWindow, error)
UpdateMaintenanceWindow updates an existing maintenance window.
func (*Client) UpdateSchedule ¶
UpdateSchedule updates an existing on-call schedule.
func (*Client) UpdateService ¶
UpdateService updates an existing service.
func (*Client) UpdateTeam ¶
UpdateTeam updates an existing team.
type ContactMethod ¶
type ContactMethod struct { ID string `json:"id"` Type string `json:"type"` Summary string `json:"summary"` Self string `json:"self"` Label string `json:"label"` Address string `json:"address"` SendShortEmail bool `json:"send_short_email,omitempty"` SendHTMLEmail bool `json:"send_html_email,omitempty"` Blacklisted bool `json:"blacklisted,omitempty"` CountryCode int `json:"country_code,omitempty"` Enabled bool `json:"enabled,omitempty"` HTMLUrl string `json:"html_url"` }
ContactMethod is a way of contacting the user.
type CreateIncidentOptions ¶
type CreateIncidentOptions struct { Type string `json:"type"` Title string `json:"title"` Service *APIReference `json:"service"` Priority *APIReference `json:"priority,omitempty"` IncidentKey string `json:"incident_key,omitempty"` Body *APIDetails `json:"body,omitempty"` EscalationPolicy *APIReference `json:"escalation_policy,omitempty"` }
CreateIncidentOptions is the structure used when POSTing to the CreateIncident API endpoint.
type EscalationPolicy ¶
type EscalationPolicy struct { APIObject Name string `json:"name,omitempty"` EscalationRules []EscalationRule `json:"escalation_rules,omitempty"` Services []APIObject `json:"services,omitempty"` NumLoops uint `json:"num_loops,omitempty"` Teams []APIReference `json:"teams"` Description string `json:"description,omitempty"` RepeatEnabled bool `json:"repeat_enabled,omitempty"` }
EscalationPolicy is a collection of escalation rules.
type EscalationRule ¶
type EscalationRule struct { ID string `json:"id,omitempty"` Delay uint `json:"escalation_delay_in_minutes,omitempty"` Targets []APIObject `json:"targets"` }
EscalationRule is a rule for an escalation policy to trigger.
type Event ¶
type Event struct { ServiceKey string `json:"service_key"` Type string `json:"event_type"` IncidentKey string `json:"incident_key,omitempty"` Description string `json:"description"` Client string `json:"client,omitempty"` ClientURL string `json:"client_url,omitempty"` Details interface{} `json:"details,omitempty"` Contexts []interface{} `json:"contexts,omitempty"` }
Event stores data for problem reporting, acknowledgement, and resolution.
type EventResponse ¶
type EventResponse struct { Status string `json:"status"` Message string `json:"message"` IncidentKey string `json:"incident_key"` }
EventResponse is the data returned from the CreateEvent API endpoint.
func CreateEvent ¶
func CreateEvent(e Event) (*EventResponse, error)
CreateEvent sends PagerDuty an event to trigger, acknowledge, or resolve a problem. If you need to provide a custom HTTP client, please use CreateEventWithHTTPClient.
func CreateEventWithHTTPClient ¶
func CreateEventWithHTTPClient(e Event, client HTTPClient) (*EventResponse, error)
CreateEventWithHTTPClient sends PagerDuty an event to trigger, acknowledge, or resolve a problem. This function accepts a custom HTTP Client, if the default one used by this package doesn't fit your needs. If you don't need a custom HTTP client, please use CreateEvent instead.
type GetEscalationPolicyOptions ¶
type GetEscalationPolicyOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetEscalationPolicyOptions is the data structure used when calling the GetEscalationPolicy API endpoint.
type GetEscalationRuleOptions ¶
type GetEscalationRuleOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetEscalationRuleOptions is the data structure used when calling the GetEscalationRule API endpoint.
type GetIntegrationOptions ¶
type GetIntegrationOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetIntegrationOptions is the data structure used when calling the GetIntegration API endpoint.
type GetLogEntryOptions ¶
type GetLogEntryOptions struct { TimeZone string `url:"time_zone,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
GetLogEntryOptions is the data structure used when calling the GetLogEntry API endpoint.
type GetMaintenanceWindowOptions ¶
type GetMaintenanceWindowOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetMaintenanceWindowOptions is the data structure used when calling the GetMaintenanceWindow API endpoint.
type GetScheduleOptions ¶
type GetScheduleOptions struct { APIListObject TimeZone string `url:"time_zone,omitempty"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` }
GetScheduleOptions is the data structure used when calling the GetSchedule API endpoint.
type GetServiceOptions ¶
type GetServiceOptions struct {
Includes []string `url:"include,brackets,omitempty"`
}
GetServiceOptions is the data structure used when calling the GetService API endpoint.
type GetUserOptions ¶
type GetUserOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetUserOptions is the data structure used when calling the GetUser API endpoint.
type HTTPClient ¶
HTTPClient is an interface which declares the functionality we need from an HTTP client. This is to allow consumers to provide their own HTTP client as needed, without restricting them to only using *http.Client.
type Incident ¶
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"` Service APIObject `json:"service,omitempty"` Assignments []Assignment `json:"assignments,omitempty"` Acknowledgements []Acknowledgement `json:"acknowledgements,omitempty"` LastStatusChangeAt string `json:"last_status_change_at,omitempty"` LastStatusChangeBy APIObject `json:"last_status_change_by,omitempty"` FirstTriggerLogEntry APIObject `json:"first_trigger_log_entry,omitempty"` EscalationPolicy APIObject `json:"escalation_policy,omitempty"` Teams []APIObject `json:"teams,omitempty"` Priority *Priority `json:"priority,omitempty"` Urgency string `json:"urgency,omitempty"` Status string `json:"status,omitempty"` Id string `json:"id,omitempty"` ResolveReason ResolveReason `json:"resolve_reason,omitempty"` AlertCounts AlertCounts `json:"alert_counts,omitempty"` Body IncidentBody `json:"body,omitempty"` IsMergeable bool `json:"is_mergeable,omitempty"` }
Incident is a normalized, de-duplicated event generated by a PagerDuty integration.
type IncidentAlert ¶
type IncidentAlert struct { APIObject CreatedAt string `json:"created_at,omitempty"` Status string `json:"status,omitempty"` AlertKey string `json:"alert_key,omitempty"` Service APIObject `json:"service,omitempty"` Body map[string]interface{} `json:"body,omitempty"` Incident APIReference `json:"incident,omitempty"` Suppressed bool `json:"suppressed,omitempty"` Severity string `json:"severity,omitempty"` Integration APIObject `json:"integration,omitempty"` }
IncidentAlert is a alert for the specified incident.
type IncidentBody ¶
type IncidentBody struct { Type string `json:"type,omitempty"` Details string `json:"details,omitempty"` }
IncidentBody is the datastructure containing data describing the incident.
type IncidentDetail ¶
type IncidentDetail struct { ID string `json:"id"` IncidentNumber uint `json:"incident_number"` CreatedOn string `json:"created_on"` Status string `json:"status"` HTMLUrl string `json:"html_url"` Service string `json:"service"` AssignedToUser *json.RawMessage `json:"assigned_to_user"` AssignedTo []string `json:"assigned_to"` TriggerSummaryData *json.RawMessage `json:"trigger_summary_data"` TriggerDetailsHTMLUrl string `json:"trigger_details_html_url"` }
IncidentDetail contains a representation of the incident associated with the action that caused this webhook message.
type IncidentNote ¶
type IncidentNote struct { ID string `json:"id,omitempty"` User APIObject `json:"user,omitempty"` Content string `json:"content,omitempty"` CreatedAt string `json:"created_at,omitempty"` }
IncidentNote is a note for the specified incident.
type IncidentUrgencyRule ¶
type IncidentUrgencyRule struct { Type string `json:"type,omitempty"` Urgency string `json:"urgency,omitempty"` DuringSupportHours *IncidentUrgencyType `json:"during_support_hours,omitempty"` OutsideSupportHours *IncidentUrgencyType `json:"outside_support_hours,omitempty"` }
IncidentUrgencyRule is the default urgency for new incidents.
type IncidentUrgencyType ¶
type IncidentUrgencyType struct { Type string `json:"type,omitempty"` Urgency string `json:"urgency,omitempty"` }
IncidentUrgencyType are the incidents urgency during or outside support hours.
type InlineModel ¶
InlineModel represents when a scheduled action will occur.
type Integration ¶
type Integration struct { APIObject Name string `json:"name,omitempty"` Service *APIObject `json:"service,omitempty"` CreatedAt string `json:"created_at,omitempty"` Vendor *APIObject `json:"vendor,omitempty"` Type string `json:"type,omitempty"` IntegrationKey string `json:"integration_key,omitempty"` IntegrationEmail string `json:"integration_email,omitempty"` }
Integration is an endpoint (like Nagios, email, or an API call) that generates events, which are normalized and de-duplicated by PagerDuty to create incidents.
type ListAbilityResponse ¶
type ListAbilityResponse struct {
Abilities []string `json:"abilities"`
}
ListAbilityResponse is the response when calling the ListAbility API endpoint.
type ListAddonOptions ¶
type ListAddonOptions struct { APIListObject Includes []string `url:"include,omitempty,brackets"` ServiceIDs []string `url:"service_ids,omitempty,brackets"` Filter string `url:"filter,omitempty"` }
ListAddonOptions are the options available when calling the ListAddons API endpoint.
type ListAddonResponse ¶
type ListAddonResponse struct { APIListObject Addons []Addon `json:"addons"` }
ListAddonResponse is the response when calling the ListAddons API endpoint.
type ListAlertResponse ¶
type ListAlertResponse struct { APIListObject Alerts []Alert `json:"alerts,omitempty"` }
type ListAlertsResponse ¶
type ListAlertsResponse struct { APIListObject Alerts []IncidentAlert `json:"alerts,omitempty"` }
ListAlertsResponse is the response structure when calling the ListAlert API endpoint.
type ListContactMethodsResponse ¶
type ListContactMethodsResponse struct { APIListObject ContactMethods []ContactMethod `json:"contact_methods"` }
ListContactMethodResponse is the data structure returned from calling the GetUserContactMethod API endpoint.
type ListEscalationPoliciesOptions ¶
type ListEscalationPoliciesOptions struct { APIListObject Query string `url:"query,omitempty"` UserIDs []string `url:"user_ids,omitempty,brackets"` TeamIDs []string `url:"team_ids,omitempty,brackets"` Includes []string `url:"include,omitempty,brackets"` SortBy string `url:"sort_by,omitempty"` }
ListEscalationPoliciesOptions is the data structure used when calling the ListEscalationPolicies API endpoint.
type ListEscalationPoliciesResponse ¶
type ListEscalationPoliciesResponse struct { APIListObject EscalationPolicies []EscalationPolicy `json:"escalation_policies"` }
ListEscalationPoliciesResponse is the data structure returned from calling the ListEscalationPolicies API endpoint.
type ListEscalationRulesResponse ¶
type ListEscalationRulesResponse struct { APIListObject EscalationRules []EscalationRule `json:"escalation_rules"` }
type ListIncidentLogEntriesOptions ¶
type ListIncidentLogEntriesOptions struct { APIListObject Includes []string `url:"include,omitempty,brackets"` IsOverview bool `url:"is_overview,omitempty"` TimeZone string `url:"time_zone,omitempty"` }
ListIncidentLogEntriesOptions is the structure used when passing parameters to the ListIncidentLogEntries API endpoint.
type ListIncidentLogEntriesResponse ¶
type ListIncidentLogEntriesResponse struct { APIListObject LogEntries []LogEntry `json:"log_entries,omitempty"` }
ListIncidentLogEntriesResponse is the response structure when calling the ListIncidentLogEntries API endpoint.
type ListIncidentsOptions ¶
type ListIncidentsOptions struct { APIListObject Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` DateRange string `url:"date_range,omitempty"` Statuses []string `url:"statuses,omitempty,brackets"` IncidentKey string `url:"incident_key,omitempty"` ServiceIDs []string `url:"service_ids,omitempty,brackets"` TeamIDs []string `url:"team_ids,omitempty,brackets"` UserIDs []string `url:"user_ids,omitempty,brackets"` Urgencies []string `url:"urgencies,omitempty,brackets"` TimeZone string `url:"time_zone,omitempty"` SortBy string `url:"sort_by,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
ListIncidentsOptions is the structure used when passing parameters to the ListIncident API endpoint.
type ListIncidentsResponse ¶
type ListIncidentsResponse struct { APIListObject Incidents []Incident `json:"incidents,omitempty"` }
ListIncidentsResponse is the response structure when calling the ListIncident API endpoint.
type ListLogEntriesOptions ¶
type ListLogEntriesOptions struct { APIListObject TimeZone string `url:"time_zone"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` IsOverview bool `url:"is_overview,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
ListLogEntriesOptions is the data structure used when calling the ListLogEntry API endpoint.
type ListLogEntryResponse ¶
type ListLogEntryResponse struct { APIListObject LogEntries []LogEntry `json:"log_entries"` }
ListLogEntryResponse is the response data when calling the ListLogEntry API endpoint.
type ListMaintenanceWindowsOptions ¶
type ListMaintenanceWindowsOptions struct { APIListObject Query string `url:"query,omitempty"` Includes []string `url:"include,omitempty,brackets"` TeamIDs []string `url:"team_ids,omitempty,brackets"` ServiceIDs []string `url:"service_ids,omitempty,brackets"` Filter string `url:"filter,omitempty,brackets"` }
ListMaintenanceWindowsOptions is the data structure used when calling the ListMaintenanceWindows API endpoint.
type ListMaintenanceWindowsResponse ¶
type ListMaintenanceWindowsResponse struct { APIListObject MaintenanceWindows []MaintenanceWindow `json:"maintenance_windows"` }
ListMaintenanceWindowsResponse is the data structur returned from calling the ListMaintenanceWindows API endpoint.
type ListNotificationOptions ¶
type ListNotificationOptions struct { APIListObject TimeZone string `url:"time_zone,omitempty"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` Filter string `url:"filter,omitempty"` Includes []string `url:"include,omitempty"` }
ListNotificationOptions is the data structure used when calling the ListNotifications API endpoint.
type ListNotificationsResponse ¶
type ListNotificationsResponse struct { APIListObject Notifications []Notification }
ListNotificationsResponse is the data structure returned from the ListNotifications API endpoint.
type ListOnCallOptions ¶
type ListOnCallOptions struct { APIListObject TimeZone string `url:"time_zone,omitempty"` Includes []string `url:"include,omitempty,brackets"` UserIDs []string `url:"user_ids,omitempty,brackets"` EscalationPolicyIDs []string `url:"escalation_policy_ids,omitempty,brackets"` ScheduleIDs []string `url:"schedule_ids,omitempty,brackets"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` Earliest bool `url:"earliest,omitempty"` }
ListOnCallOptions is the data structure used when calling the ListOnCalls API endpoint.
type ListOnCallUsersOptions ¶
type ListOnCallUsersOptions struct { APIListObject Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` }
ListOnCallUsersOptions is the data structure used when calling the ListOnCallUsers API endpoint.
type ListOnCallsResponse ¶
type ListOnCallsResponse struct { APIListObject OnCalls []OnCall `json:"oncalls"` }
ListOnCallsResponse is the data structure returned from calling the ListOnCalls API endpoint.
type ListOverridesOptions ¶
type ListOverridesOptions struct { APIListObject Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` Editable bool `url:"editable,omitempty"` Overflow bool `url:"overflow,omitempty"` }
ListOverridesOptions is the data structure used when calling the ListOverrides API endpoint.
type ListSchedulesOptions ¶
type ListSchedulesOptions struct { APIListObject Query string `url:"query,omitempty"` }
ListSchedulesOptions is the data structure used when calling the ListSchedules API endpoint.
type ListSchedulesResponse ¶
type ListSchedulesResponse struct { APIListObject Schedules []Schedule `json:"schedules"` }
ListSchedulesResponse is the data structure returned from calling the ListSchedules API endpoint.
type ListServiceOptions ¶
type ListServiceOptions struct { APIListObject TeamIDs []string `url:"team_ids,omitempty,brackets"` TimeZone string `url:"time_zone,omitempty"` SortBy string `url:"sort_by,omitempty"` Query string `url:"query,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
ListServiceOptions is the data structure used when calling the ListServices API endpoint.
type ListServiceResponse ¶
type ListServiceResponse struct { APIListObject Services []Service }
ListServiceResponse is the data structure returned from calling the ListServices API endpoint.
type ListTeamOptions ¶
type ListTeamOptions struct { APIListObject Query string `url:"query,omitempty"` }
ListTeamOptions are the input parameters used when calling the ListTeams API endpoint.
type ListTeamResponse ¶
type ListTeamResponse struct { APIListObject Teams []Team }
ListTeamResponse is the structure used when calling the ListTeams API endpoint.
type ListUsersOptions ¶
type ListUsersOptions struct { APIListObject Query string `url:"query,omitempty"` TeamIDs []string `url:"team_ids,omitempty,brackets"` Includes []string `url:"include,omitempty,brackets"` }
ListUsersOptions is the data structure used when calling the ListUsers API endpoint.
type ListUsersResponse ¶
type ListUsersResponse struct { APIListObject Users []User }
ListUsersResponse is the data structure returned from calling the ListUsers API endpoint.
type ListVendorOptions ¶
type ListVendorOptions struct { APIListObject Query string `url:"query,omitempty"` }
ListVendorOptions is the data structure used when calling the ListVendors API endpoint.
type ListVendorResponse ¶
type ListVendorResponse struct { APIListObject Vendors []Vendor }
ListVendorResponse is the data structure returned from calling the ListVendors API endpoint.
type LogEntry ¶
type LogEntry struct { APIObject CreatedAt string `json:"created_at"` Agent Agent Channel Channel Incident Incident Teams []Team Contexts []Context AcknowledgementTimeout int `json:"acknowledgement_timeout"` EventDetails map[string]string }
LogEntry is a list of all of the events that happened to an incident.
type MaintenanceWindow ¶
type MaintenanceWindow struct { APIObject SequenceNumber uint `json:"sequence_number,omitempty"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` Description string `json:"description"` Services []APIObject `json:"services"` Teams []APIListObject `json:"teams"` CreatedBy APIListObject `json:"created_by"` }
MaintenanceWindow is used to temporarily disable one or more services for a set period of time.
type Notification ¶
type Notification struct { ID string `json:"id"` Type string StartedAt string `json:"started_at"` Address string User APIObject }
Notification is a message containing the details of the incident.
type NotificationRule ¶
type NotificationRule struct { ID string `json:"id"` StartDelayInMinutes uint `json:"start_delay_in_minutes"` CreatedAt string `json:"created_at"` ContactMethod ContactMethod `json:"contact_method"` Urgency string `json:"urgency"` Type string `json:"type"` }
NotificationRule is a rule for notifying the user.
type OnCall ¶
type OnCall struct { User User `json:"user,omitempty"` Schedule Schedule `json:"schedule,omitempty"` EscalationPolicy EscalationPolicy `json:"escalation_policy,omitempty"` EscalationLevel uint `json:"escalation_level,omitempty"` Start string `json:"start,omitempty"` End string `json:"end,omitempty"` }
OnCall represents a contiguous unit of time for which a user will be on call for a given escalation policy and escalation rule.
type Override ¶
type Override struct { ID string `json:"id,omitempty"` Start string `json:"start,omitempty"` End string `json:"end,omitempty"` User APIObject `json:"user,omitempty"` }
Overrides are any schedule layers from the override layer.
type PendingAction ¶
PendingAction is the data structure for any pending actions on an incident.
type PreviewScheduleOptions ¶
type PreviewScheduleOptions struct { APIListObject Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` Overflow bool `url:"overflow,omitempty"` }
PreviewScheduleOptions is the data structure used when calling the PreviewSchedule API endpoint.
type Priorities ¶
type Priorities struct { APIListObject Priorities []PriorityProperty `json:"priorities"` }
type Priority ¶
type Priority struct { APIObject Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
Priority is the data structure describing the priority of an incident.
type PriorityProperty ¶
type PriorityProperty struct { APIObject Name string `json:"name"` Description string `json:"description"` }
PriorityProperty is a single priorty object returned from the Priorities endpoint
type RenderedScheduleEntry ¶
type RenderedScheduleEntry struct { Start string `json:"start,omitempty"` End string `json:"end,omitempty"` User APIObject `json:"user,omitempty"` }
RenderedScheduleEntry represents the computed set of schedule layer entries that put users on call for a schedule, and cannot be modified directly.
type ResolveReason ¶
type ResolveReason struct { Type string `json:"type,omitempty"` Incident APIObject `json:"incident"` }
Resolve reason is the data structure describing the reason an incident was resolved
type Restriction ¶
type Restriction struct { Type string `json:"type,omitempty"` StartTimeOfDay string `json:"start_time_of_day,omitempty"` StartDayOfWeek uint `json:"start_day_of_week,omitempty"` DurationSeconds uint `json:"duration_seconds,omitempty"` }
Restriction limits on-call responsibility for a layer to certain times of the day or week.
type Schedule ¶
type Schedule struct { APIObject Name string `json:"name,omitempty"` TimeZone string `json:"time_zone,omitempty"` Description string `json:"description,omitempty"` EscalationPolicies []APIObject `json:"escalation_policies,omitempty"` Users []APIObject `json:"users,omitempty"` ScheduleLayers []ScheduleLayer `json:"schedule_layers,omitempty"` OverrideSubschedule ScheduleLayer `json:"override_subschedule,omitempty"` FinalSchedule ScheduleLayer `json:"final_schedule,omitempty"` }
Schedule determines the time periods that users are on call.
type ScheduleLayer ¶
type ScheduleLayer struct { APIObject Name string `json:"name,omitempty"` Start string `json:"start,omitempty"` End string `json:"end,omitempty"` RotationVirtualStart string `json:"rotation_virtual_start,omitempty"` RotationTurnLengthSeconds uint `json:"rotation_turn_length_seconds,omitempty"` Users []UserReference `json:"users,omitempty"` Restrictions []Restriction `json:"restrictions,omitempty"` RenderedScheduleEntries []RenderedScheduleEntry `json:"rendered_schedule_entries,omitempty"` RenderedCoveragePercentage float64 `json:"rendered_coverage_percentage,omitempty"` }
ScheduleLayer is an entry that puts users on call for a schedule.
type ScheduledAction ¶
type ScheduledAction struct { Type string `json:"type,omitempty"` At InlineModel `json:"at,omitempty"` ToUrgency string `json:"to_urgency"` }
ScheduledAction contains scheduled actions for the service.
type Service ¶
type Service struct { APIObject Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` AutoResolveTimeout *uint `json:"auto_resolve_timeout"` AcknowledgementTimeout *uint `json:"acknowledgement_timeout"` CreateAt string `json:"created_at,omitempty"` Status string `json:"status,omitempty"` LastIncidentTimestamp string `json:"last_incident_timestamp,omitempty"` Integrations []Integration `json:"integrations,omitempty"` EscalationPolicy EscalationPolicy `json:"escalation_policy,omitempty"` Teams []Team `json:"teams,omitempty"` IncidentUrgencyRule *IncidentUrgencyRule `json:"incident_urgency_rule,omitempty"` SupportHours *SupportHours `json:"support_hours,omitempty"` ScheduledActions []ScheduledAction `json:"scheduled_actions,omitempty"` AlertCreation string `json:"alert_creation,omitempty"` }
Service represents something you monitor (like a web service, email service, or database service).
type SupportHours ¶
type SupportHours struct { Type string `json:"type,omitempty"` Timezone string `json:"time_zone,omitempty"` StartTime string `json:"start_time,omitempty"` EndTime string `json:"end_time,omitempty"` DaysOfWeek []uint `json:"days_of_week,omitempty"` }
SupportHours are the support hours for the service.
type Team ¶
type Team struct { APIObject Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
Team is a collection of users and escalation policies that represent a group of people within an organization.
type UpdateScheduleOptions ¶
type UpdateScheduleOptions struct {
Overflow bool `url:"overflow,omitempty"`
}
UpdateScheduleOptions is the data structure used when calling the UpdateSchedule API endpoint.
type User ¶
type User struct { APIObject Type string `json:"type"` Name string `json:"name"` Summary string `json:"summary"` Email string `json:"email"` Timezone string `json:"time_zone,omitempty"` Color string `json:"color,omitempty"` Role string `json:"role,omitempty"` AvatarURL string `json:"avatar_url,omitempty"` Description string `json:"description,omitempty"` InvitationSent bool `json:"invitation_sent,omitempty"` ContactMethods []ContactMethod `json:"contact_methods"` NotificationRules []NotificationRule `json:"notification_rules"` JobTitle string `json:"job_title,omitempty"` Teams []Team }
User is a member of a PagerDuty account that has the ability to interact with incidents and other data on the account.
type UserReference ¶
type UserReference struct {
User APIObject `json:"user"`
}
UserReference is a reference to an authorized PagerDuty user.
type V2Event ¶
type V2Event struct { RoutingKey string `json:"routing_key"` Action string `json:"event_action"` DedupKey string `json:"dedup_key,omitempty"` Images []interface{} `json:"images,omitempty"` Links []interface{} `json:"links,omitempty"` Client string `json:"client,omitempty"` ClientURL string `json:"client_url,omitempty"` Payload *V2Payload `json:"payload,omitempty"` }
Event includes the incident/alert details
type V2EventResponse ¶
type V2EventResponse struct { RoutingKey string `json:"routing_key"` DedupKey string `json:"dedup_key"` EventAction string `json:"event_action"` }
Response is the json response body for an event
func ManageEvent ¶
func ManageEvent(e V2Event) (*V2EventResponse, error)
ManageEvent handles the trigger, acknowledge, and resolve methods for an event
type V2Payload ¶
type V2Payload struct { Summary string `json:"summary"` Source string `json:"source"` Severity string `json:"severity"` Timestamp string `json:"timestamp,omitempty"` Component string `json:"component,omitempty"` Group string `json:"group,omitempty"` Class string `json:"class,omitempty"` Details interface{} `json:"custom_details,omitempty"` }
Payload represents the individual event details for an event
type Vendor ¶
type Vendor struct { APIObject Name string `json:"name,omitempty"` LogoURL string `json:"logo_url,omitempty"` LongName string `json:"long_name,omitempty"` WebsiteURL string `json:"website_url,omitempty"` Description string `json:"description,omitempty"` Connectable bool `json:"connectable,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` GenericServiceType string `json:"generic_service_type,omitempty"` IntegrationGuideURL string `json:"integration_guide_url,omitempty"` AlertCreationDefault string `json:"alert_creation_default,omitempty"` AlertCreationEditable bool `json:"alert_creation_editable,omitempty"` IsPDCEF bool `json:"is_pd_cef,omitempty"` }
Vendor represents a specific type of integration. AWS Cloudwatch, Splunk, Datadog, etc are all examples of vendors that can be integrated in PagerDuty by making an integration.
type WebhookPayload ¶
type WebhookPayload struct { ID string `json:"id"` Type string `json:"type"` CreatedOn string `json:"created_on"` Data *json.RawMessage `json:"data"` }
WebhookPayload is a single message array for a webhook.
func DecodeWebhook ¶
func DecodeWebhook(r io.Reader) (*WebhookPayload, error)
DecodeWebhook decodes a webhook from a response object.