Documentation ¶
Index ¶
- Variables
- func InitCache(c *Client)
- func PopulateCache()
- func PopulateMemoryCache()
- func PopulateMongoCache()
- type AbilityService
- type ActiveBetween
- type Addon
- type AddonPayload
- type AddonReference
- type AddonService
- func (s *AddonService) Delete(id string) (*Response, error)
- func (s *AddonService) Get(id string) (*Addon, *Response, error)
- func (s *AddonService) Install(addon *Addon) (*Addon, *Response, error)
- func (s *AddonService) List(o *ListAddonsOptions) (*ListAddonsResponse, *Response, error)
- func (s *AddonService) Update(id string, addon *Addon) (*Addon, *Response, error)
- type AlertGroupingConfig
- type AlertGroupingParameters
- type At
- type BusinessService
- type BusinessServicePayload
- type BusinessServiceService
- func (s *BusinessServiceService) Create(bservice *BusinessService) (*BusinessService, *Response, error)
- func (s *BusinessServiceService) Delete(ID string) (*Response, error)
- func (s *BusinessServiceService) Get(ID string) (*BusinessService, *Response, error)
- func (s *BusinessServiceService) List() (*ListBusinessServicesResponse, *Response, error)
- func (s *BusinessServiceService) Update(ID string, bserv *BusinessService) (*BusinessService, *Response, error)
- type BusinessServiceSubscriber
- type BusinessServiceSubscriberPayload
- type BusinessServiceSubscriberService
- func (s *BusinessServiceSubscriberService) Create(businessServiceID string, subscriber *BusinessServiceSubscriber) (*Response, error)
- func (s *BusinessServiceSubscriberService) Delete(businessServiceID string, subscriber *BusinessServiceSubscriber) (*Response, error)
- func (s *BusinessServiceSubscriberService) List(businessServiceID string) (*ListBusinessServiceSubscribersResponse, *Response, error)
- type BusinessServiceTeam
- type Client
- type ConditionParameter
- type Config
- type ConnectionConfig
- type ContactMethod
- type ContactMethodPayload
- type ContactMethodReference
- type CreateBusinessServiceSubscribersResponse
- type CreateScheduleOptions
- type DeliveryMethod
- type EmailFilter
- type EmailParser
- type Error
- type EscalationPolicy
- type EscalationPolicyPayload
- type EscalationPolicyReference
- type EscalationPolicyService
- func (s *EscalationPolicyService) Create(escalationPolicy *EscalationPolicy) (*EscalationPolicy, *Response, error)
- func (s *EscalationPolicyService) Delete(id string) (*Response, error)
- func (s *EscalationPolicyService) Get(id string, o *GetEscalationPolicyOptions) (*EscalationPolicy, *Response, error)
- func (s *EscalationPolicyService) List(o *ListEscalationPoliciesOptions) (*ListEscalationPoliciesResponse, *Response, error)
- func (s *EscalationPolicyService) Update(id string, escalationPolicy *EscalationPolicy) (*EscalationPolicy, *Response, error)
- type EscalationRule
- type EscalationTargetReference
- type EventRule
- type EventRuleService
- func (s *EventRuleService) Create(eventRule *EventRule) (*EventRule, *Response, error)
- func (s *EventRuleService) Delete(id string) (*Response, error)
- func (s *EventRuleService) List() (*ListEventRulesResponse, *Response, error)
- func (s *EventRuleService) Update(id string, eventRule *EventRule) (*EventRule, *Response, error)
- type Extension
- type ExtensionPayload
- type ExtensionSchema
- type ExtensionSchemaPayload
- type ExtensionSchemaReference
- type ExtensionSchemaService
- type ExtensionService
- func (s *ExtensionService) Create(extension *Extension) (*Extension, *Response, error)
- func (s *ExtensionService) Delete(id string) (*Response, error)
- func (s *ExtensionService) Get(id string) (*Extension, *Response, error)
- func (s *ExtensionService) List(o *ListExtensionsOptions) (*ListExtensionsResponse, *Response, error)
- func (s *ExtensionService) Update(id string, extension *Extension) (*Extension, *Response, error)
- type Filter
- type FullUser
- type FullUserPayload
- type GetEscalationPolicyOptions
- type GetEscalationRuleOptions
- type GetIntegrationOptions
- type GetMembersOptions
- type GetMembersResponse
- type GetScheduleOptions
- type GetServiceOptions
- type GetUserOptions
- type IncidentUrgencyRule
- type IncidentUrgencyType
- type Integration
- type IntegrationPayload
- type IntegrationReference
- type ListAbilitiesResponse
- type ListAddonsOptions
- type ListAddonsResponse
- type ListBusinessServiceSubscribersResponse
- type ListBusinessServicesResponse
- type ListContactMethodsResponse
- type ListEscalationPoliciesOptions
- type ListEscalationPoliciesResponse
- type ListEscalationRulesResponse
- type ListEventRulesResponse
- type ListExtensionSchemasOptions
- type ListExtensionSchemasResponse
- type ListExtensionsOptions
- type ListExtensionsResponse
- type ListFullUsersResponse
- type ListMaintenanceWindowsOptions
- type ListMaintenanceWindowsResponse
- type ListOnCallsOptions
- type ListOnCallsResponse
- type ListOverridesOptions
- type ListOverridesResponse
- type ListPrioritiesResponse
- type ListResp
- type ListResponsePlayOptions
- type ListResponsePlaysResponse
- type ListRulesetRulesResponse
- type ListRulesetsResponse
- type ListSchedulesOptions
- type ListSchedulesResponse
- type ListServiceDependencies
- type ListServiceEventRuleOptions
- type ListServiceEventRuleResponse
- type ListServicesOptions
- type ListServicesResponse
- type ListSlackConnectionsResponse
- type ListTagsOptions
- type ListTagsResponse
- type ListTeamsOptions
- type ListTeamsResponse
- type ListUsersOptions
- type ListUsersResponse
- type ListVendorsOptions
- type ListVendorsResponse
- type ListWebhookSubscriptionsResponse
- type MaintenanceWindow
- type MaintenanceWindowPayload
- type MaintenanceWindowService
- func (s *MaintenanceWindowService) Create(maintenanceWindow *MaintenanceWindow) (*MaintenanceWindow, *Response, error)
- func (s *MaintenanceWindowService) Delete(id string) (*Response, error)
- func (s *MaintenanceWindowService) Get(id string) (*MaintenanceWindow, *Response, error)
- func (s *MaintenanceWindowService) List(o *ListMaintenanceWindowsOptions) (*ListMaintenanceWindowsResponse, *Response, error)
- func (s *MaintenanceWindowService) Update(id string, maintenanceWindow *MaintenanceWindow) (*MaintenanceWindow, *Response, error)
- type MatchPredicate
- type Member
- type NotificationRule
- type NotificationRulePayload
- type Override
- type OverridePayload
- type Predicate
- type Priority
- type PriorityService
- type PushContactMethodSound
- type RequestOptions
- type Responder
- type Response
- type ResponsePlay
- type ResponsePlayPayload
- type ResponsePlayService
- func (s *ResponsePlayService) Create(responsePlay *ResponsePlay) (*ResponsePlay, *Response, error)
- func (s *ResponsePlayService) Delete(ID, From string) (*Response, error)
- func (s *ResponsePlayService) Get(ID, From string) (*ResponsePlay, *Response, error)
- func (s *ResponsePlayService) List(o *ListResponsePlayOptions) (*ListResponsePlaysResponse, *Response, error)
- func (s *ResponsePlayService) Update(ID string, responsePlay *ResponsePlay) (*ResponsePlay, *Response, error)
- type Restriction
- type RuleActionExtraction
- type RuleActionIntParameter
- type RuleActionParameter
- type RuleActionSuppress
- type RuleActions
- type RuleConditions
- type RuleSubcondition
- type RuleTimeFrame
- type RuleVariable
- type RuleVariableParameter
- type Ruleset
- type RulesetObject
- type RulesetPayload
- type RulesetReference
- type RulesetRule
- type RulesetRulePayload
- type RulesetService
- func (s *RulesetService) Create(ruleset *Ruleset) (*Ruleset, *Response, error)
- func (s *RulesetService) CreateRule(rulesetID string, rule *RulesetRule) (*RulesetRule, *Response, error)
- func (s *RulesetService) Delete(ID string) (*Response, error)
- func (s *RulesetService) DeleteRule(rulesetID, ruleID string) (*Response, error)
- func (s *RulesetService) Get(ID string) (*Ruleset, *Response, error)
- func (s *RulesetService) GetRule(rulesetID, ruleID string) (*RulesetRule, *Response, error)
- func (s *RulesetService) List() (*ListRulesetsResponse, *Response, error)
- func (s *RulesetService) ListRules(rulesetID string) (*ListRulesetRulesResponse, *Response, error)
- func (s *RulesetService) Update(ID string, ruleset *Ruleset) (*Ruleset, *Response, error)
- func (s *RulesetService) UpdateRule(rulesetID, ruleID string, rule *RulesetRule) (*RulesetRule, *Response, error)
- type Schedule
- type ScheduleLayer
- type ScheduleLayerEntry
- type SchedulePayload
- type ScheduleReference
- type ScheduleService
- func (s *ScheduleService) Create(schedule *Schedule, o *CreateScheduleOptions) (*Schedule, *Response, error)
- func (s *ScheduleService) CreateOverride(id string, override *Override) (*Override, *Response, error)
- func (s *ScheduleService) Delete(id string) (*Response, error)
- func (s *ScheduleService) DeleteOverride(id string, overrideID string) (*Response, error)
- func (s *ScheduleService) Get(id string, o *GetScheduleOptions) (*Schedule, *Response, error)
- func (s *ScheduleService) List(o *ListSchedulesOptions) (*ListSchedulesResponse, *Response, error)
- func (s *ScheduleService) ListOnCalls(scheduleID string, o *ListOnCallsOptions) (*ListOnCallsResponse, *Response, error)
- func (s *ScheduleService) ListOverrides(scheduleID string, o *ListOverridesOptions) (*ListOverridesResponse, *Response, error)
- func (s *ScheduleService) Update(id string, schedule *Schedule, o *UpdateScheduleOptions) (*Schedule, *Response, error)
- type ScheduledAction
- type ScheduledWeekly
- type Service
- type ServiceDependency
- type ServiceDependencyService
- func (s *ServiceDependencyService) AssociateServiceDependencies(dependencies *ListServiceDependencies) (*ListServiceDependencies, *Response, error)
- func (s *ServiceDependencyService) DisassociateServiceDependencies(dependencies *ListServiceDependencies) (*ListServiceDependencies, *Response, error)
- func (s *ServiceDependencyService) GetServiceDependenciesForType(serviceID, serviceType string) (*ListServiceDependencies, *Response, error)
- type ServiceEventRule
- type ServiceEventRulePayload
- type ServiceObj
- type ServicePayload
- type ServiceReference
- type ServicesService
- func (s *ServicesService) Create(service *Service) (*Service, *Response, error)
- func (s *ServicesService) CreateEventRule(serviceID string, eventRule *ServiceEventRule) (*ServiceEventRule, *Response, error)
- func (s *ServicesService) CreateIntegration(serviceID string, integration *Integration) (*Integration, *Response, error)
- func (s *ServicesService) Delete(id string) (*Response, error)
- func (s *ServicesService) DeleteEventRule(serviceID, ruleID string) (*Response, error)
- func (s *ServicesService) DeleteIntegration(serviceID, integrationID string) (*Response, error)
- func (s *ServicesService) Get(id string, o *GetServiceOptions) (*Service, *Response, error)
- func (s *ServicesService) GetEventRule(serviceID, ruleID string) (*ServiceEventRule, *Response, error)
- func (s *ServicesService) GetIntegration(serviceID, integrationID string, o *GetIntegrationOptions) (*Integration, *Response, error)
- func (s *ServicesService) List(o *ListServicesOptions) (*ListServicesResponse, *Response, error)
- func (s *ServicesService) ListEventRules(serviceID string, o *ListServiceEventRuleOptions) (*ListServiceEventRuleResponse, *Response, error)
- func (s *ServicesService) Update(id string, service *Service) (*Service, *Response, error)
- func (s *ServicesService) UpdateEventRule(serviceID, ruleID string, eventRule *ServiceEventRule) (*ServiceEventRule, *Response, error)
- func (s *ServicesService) UpdateIntegration(serviceID, integrationID string, integration *Integration) (*Integration, *Response, error)
- type SlackConnection
- type SlackConnectionPayload
- type SlackConnectionService
- func (s *SlackConnectionService) Create(workspaceID string, sconn *SlackConnection) (*SlackConnection, *Response, error)
- func (s *SlackConnectionService) Delete(workspaceID, ID string) (*Response, error)
- func (s *SlackConnectionService) Get(workspaceID, ID string) (*SlackConnection, *Response, error)
- func (s *SlackConnectionService) List(workspaceID string) (*ListSlackConnectionsResponse, *Response, error)
- func (s *SlackConnectionService) Update(workspaceID, ID string, sconn *SlackConnection) (*SlackConnection, *Response, error)
- type SubSchedule
- type SubscriberReference
- type SupportHours
- type Tag
- type TagAssignment
- type TagAssignments
- type TagPayload
- type TagService
- func (s *TagService) Assign(e, eid string, a *TagAssignments) (*Response, error)
- func (s *TagService) Create(tag *Tag) (*Tag, *Response, error)
- func (s *TagService) Delete(id string) (*Response, error)
- func (s *TagService) Get(id string) (*Tag, *Response, error)
- func (s *TagService) List(o *ListTagsOptions) (*ListTagsResponse, *Response, error)
- func (s *TagService) ListTagsForEntity(e, eid string) (*ListTagsResponse, *Response, error)
- type Team
- type TeamPayload
- type TeamReference
- type TeamService
- func (s *TeamService) AddEscalationPolicy(teamID, escID string) (*Response, error)
- func (s *TeamService) AddUser(teamID, userID string) (*Response, error)
- func (s *TeamService) AddUserWithRole(teamID, userID string, role string) (*Response, error)
- func (s *TeamService) Create(team *Team) (*Team, *Response, error)
- func (s *TeamService) Delete(id string) (*Response, error)
- func (s *TeamService) Get(id string) (*Team, *Response, error)
- func (s *TeamService) GetMembers(teamID string, o *GetMembersOptions) (*GetMembersResponse, *Response, error)
- func (s *TeamService) List(o *ListTeamsOptions) (*ListTeamsResponse, *Response, error)
- func (s *TeamService) RemoveEscalationPolicy(teamID, escID string) (*Response, error)
- func (s *TeamService) RemoveUser(teamID, userID string) (*Response, error)
- func (s *TeamService) Update(id string, team *Team) (*Team, *Response, error)
- type UpdateScheduleOptions
- type User
- type UserPayload
- type UserReference
- type UserReferenceWrapper
- type UserService
- func (s *UserService) Create(user *User) (*User, *Response, error)
- func (s *UserService) CreateContactMethod(userID string, contactMethod *ContactMethod) (*ContactMethod, *Response, error)
- func (s *UserService) CreateNotificationRule(userID string, rule *NotificationRule) (*NotificationRule, *Response, error)
- func (s *UserService) Delete(id string) (*Response, error)
- func (s *UserService) DeleteContactMethod(userID, contactMethodID string) (*Response, error)
- func (s *UserService) DeleteNotificationRule(userID, ruleID string) (*Response, error)
- func (s *UserService) Get(id string, o *GetUserOptions) (*User, *Response, error)
- func (s *UserService) GetContactMethod(userID string, contactMethodID string) (*ContactMethod, *Response, error)
- func (s *UserService) GetFull(id string) (*FullUser, *Response, error)
- func (s *UserService) GetNotificationRule(userID string, ruleID string) (*NotificationRule, *Response, error)
- func (s *UserService) List(o *ListUsersOptions) (*ListUsersResponse, *Response, error)
- func (s *UserService) ListAll(o *ListUsersOptions) ([]*FullUser, error)
- func (s *UserService) ListContactMethods(userID string) (*ListContactMethodsResponse, *Response, error)
- func (s *UserService) Update(id string, user *User) (*User, *Response, error)
- func (s *UserService) UpdateContactMethod(userID, contactMethodID string, contactMethod *ContactMethod) (*ContactMethod, *Response, error)
- func (s *UserService) UpdateNotificationRule(userID, ruleID string, rule *NotificationRule) (*NotificationRule, *Response, error)
- type ValueExtractor
- type Vendor
- type VendorPayload
- type VendorReference
- type VendorService
- type WebhookSubscription
- type WebhookSubscriptionPayload
- type WebhookSubscriptionService
- func (s *WebhookSubscriptionService) Create(sub *WebhookSubscription) (*WebhookSubscription, *Response, error)
- func (s *WebhookSubscriptionService) Delete(ID string) (*Response, error)
- func (s *WebhookSubscriptionService) Get(ID string) (*WebhookSubscription, *Response, error)
- func (s *WebhookSubscriptionService) List() (*ListWebhookSubscriptionsResponse, *Response, error)
- func (s *WebhookSubscriptionService) Update(ID string, sub *WebhookSubscription) (*WebhookSubscription, *Response, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoToken is returned by NewClient if a user // passed an empty/missing token. ErrNoToken = errors.New("an empty token was provided") // ErrAuthFailure is returned by NewClient if a user // passed an invalid token and failed validation against the PagerDuty API. ErrAuthFailure = errors.New("failed to authenticate using the provided token") )
Functions ¶
func InitCache ¶
func InitCache(c *Client)
InitCache initializes the cache according to the setting in TF_PAGERDUTY_CACHE
func PopulateMemoryCache ¶
func PopulateMemoryCache()
PopulateMemoryCache does initial population of the cache if memory caching is selected
func PopulateMongoCache ¶
func PopulateMongoCache()
PopulateMongoCache does initial population of the cache if Mongo caching is selected
Types ¶
type AbilityService ¶
type AbilityService service
AbilityService handles the communication with ability related methods of the PagerDuty API.
func (*AbilityService) List ¶
func (s *AbilityService) List() (*ListAbilitiesResponse, *Response, error)
List lists available abilities.
type ActiveBetween ¶
type ActiveBetween struct { StartTime int `json:"start_time,omitempty"` EndTime int `json:"end_time,omitempty"` }
ActiveBetween represents an active_between object for setting a timeline for rules
type Addon ¶
type Addon struct { HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Self string `json:"self,omitempty"` Src string `json:"src,omitempty"` Summary string `json:"summary,omitempty"` Type string `json:"type,omitempty"` }
Addon represents a PagerDuty add-on.
type AddonPayload ¶
type AddonPayload struct {
Addon *Addon `json:"addon,omitempty"`
}
AddonPayload represents an addon.
type AddonReference ¶
type AddonReference resourceReference
AddonReference represents a reference to an add-on.
type AddonService ¶
type AddonService service
AddonService handles the communication with add-on related methods of the PagerDuty API.
func (*AddonService) Delete ¶
func (s *AddonService) Delete(id string) (*Response, error)
Delete removes an existing add-on.
func (*AddonService) Get ¶
func (s *AddonService) Get(id string) (*Addon, *Response, error)
Get retrieves information about an add-on.
func (*AddonService) Install ¶
func (s *AddonService) Install(addon *Addon) (*Addon, *Response, error)
Install installs an add-on.
func (*AddonService) List ¶
func (s *AddonService) List(o *ListAddonsOptions) (*ListAddonsResponse, *Response, error)
List lists installed add-ons.
type AlertGroupingConfig ¶
type AlertGroupingConfig struct { Timeout *int `json:"timeout,omitempty"` Aggregate *string `json:"aggregate,omitempty"` Fields []string `json:"fields,omitempty"` }
AlertGroupingConfig - populate timeout if AlertGroupingParameters Type is 'time', populate Aggregate & Fields if Type is 'content_grouping'
type AlertGroupingParameters ¶
type AlertGroupingParameters struct { Type *string `json:"type,omitempty"` Config *AlertGroupingConfig `json:"config,omitempty"` }
AlertGroupingParameters defines how alerts are grouped into incidents
type BusinessService ¶
type BusinessService struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Summary string `json:"summary,omitempty"` Self string `json:"self,omitempty"` PointOfContact string `json:"point_of_contact,omitempty"` HTMLUrl string `json:"html_url,omitempty"` Description string `json:"description,omitempty"` Team *BusinessServiceTeam `json:"team,omitempty"` }
BusinessService represents a business service.
type BusinessServicePayload ¶
type BusinessServicePayload struct {
BusinessService *BusinessService `json:"business_service,omitempty"`
}
BusinessServicePayload represents payload with a business service object
type BusinessServiceService ¶
type BusinessServiceService service
BusinessServiceService handles the communication with business service related methods of the PagerDuty API.
func (*BusinessServiceService) Create ¶
func (s *BusinessServiceService) Create(bservice *BusinessService) (*BusinessService, *Response, error)
Create creates a new business service.
func (*BusinessServiceService) Delete ¶
func (s *BusinessServiceService) Delete(ID string) (*Response, error)
Delete deletes a business service.
func (*BusinessServiceService) Get ¶
func (s *BusinessServiceService) Get(ID string) (*BusinessService, *Response, error)
Get gets a business service.
func (*BusinessServiceService) List ¶
func (s *BusinessServiceService) List() (*ListBusinessServicesResponse, *Response, error)
List lists existing business services.
func (*BusinessServiceService) Update ¶
func (s *BusinessServiceService) Update(ID string, bserv *BusinessService) (*BusinessService, *Response, error)
Update updates a business service.
type BusinessServiceSubscriber ¶
type BusinessServiceSubscriber struct { ID string `json:"subscriber_id,omitempty"` Type string `json:"subscriber_type,omitempty"` SubscribableID string `json:"subscribable_id,omitempty"` SubscribableType string `json:"subscribable_type,omitempty"` Result string `json:"result,omitempty"` }
BusinessService represents a business service.
type BusinessServiceSubscriberPayload ¶
type BusinessServiceSubscriberPayload struct {
BusinessServiceSubscriber []*BusinessServiceSubscriber `json:"subscribers,omitempty"`
}
BusinessServiceSubscriberPayload represents payload with a business service subscriber object
type BusinessServiceSubscriberService ¶
type BusinessServiceSubscriberService service
BusinessServiceSubscriberService handles the communication with business service subscriber related methods of the PagerDuty API.
func (*BusinessServiceSubscriberService) Create ¶
func (s *BusinessServiceSubscriberService) Create(businessServiceID string, subscriber *BusinessServiceSubscriber) (*Response, error)
Create creates a new business service subscriber.
func (*BusinessServiceSubscriberService) Delete ¶
func (s *BusinessServiceSubscriberService) Delete(businessServiceID string, subscriber *BusinessServiceSubscriber) (*Response, error)
Delete deletes a business service subscriber.
func (*BusinessServiceSubscriberService) List ¶
func (s *BusinessServiceSubscriberService) List(businessServiceID string) (*ListBusinessServiceSubscribersResponse, *Response, error)
List lists existing business service subscribers.
type BusinessServiceTeam ¶
type BusinessServiceTeam struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Self string `json:"self,omitempty"` }
BusinessServiceTeam represents a team object in a business service
type Client ¶
type Client struct { Config *Config Abilities *AbilityService Addons *AddonService EscalationPolicies *EscalationPolicyService Extensions *ExtensionService MaintenanceWindows *MaintenanceWindowService Rulesets *RulesetService Schedules *ScheduleService Services *ServicesService Teams *TeamService ExtensionSchemas *ExtensionSchemaService Users *UserService Vendors *VendorService EventRules *EventRuleService BusinessServices *BusinessServiceService ServiceDependencies *ServiceDependencyService Priorities *PriorityService ResponsePlays *ResponsePlayService SlackConnections *SlackConnectionService Tags *TagService WebhookSubscriptions *WebhookSubscriptionService BusinessServiceSubscribers *BusinessServiceSubscriberService // contains filtered or unexported fields }
Client manages the communication with the PagerDuty API
func (*Client) DecodeJSON ¶
DecodeJSON decodes json body to given interface
func (*Client) ValidateAuth ¶
ValidateAuth validates a token against the PagerDuty API
type ConditionParameter ¶
type ConditionParameter struct { Path string `json:"path,omitempty"` Value string `json:"value,omitempty"` }
ConditionParameter represents parameters in a rule condition
type Config ¶
type Config struct { BaseURL string HTTPClient *http.Client Token string UserAgent string Debug bool }
Config represents the configuration for a PagerDuty client
type ConnectionConfig ¶
type ConnectionConfig struct { Events []string `json:"events,omitempty"` Priorities []string `json:"priorities"` Urgency *string `json:"urgency"` }
ConnectionConfig represents a config object in a slack connection
type ContactMethod ¶
type ContactMethod struct { ID string `json:"id,omitempty"` Summary string `json:"summary,omitempty"` Type string `json:"type,omitempty"` Self string `json:"self,omitempty"` HTMLURL string `json:"html_url,omitempty"` Label string `json:"label,omitempty"` Address string `json:"address,omitempty"` BlackListed bool `json:"blacklisted,omitempty"` // Email contact method options SendShortEmail bool `json:"send_short_email,omitempty"` // Phone contact method options CountryCode int `json:"country_code,omitempty"` Enabled bool `json:"enabled,omitempty"` // Push contact method options DeviceType string `json:"device_type,omitempty"` Sounds []*PushContactMethodSound `json:"sounds,omitempty"` CreatedAt string `json:"created_at,omitempty"` }
ContactMethod represents a contact method for a user.
type ContactMethodPayload ¶
type ContactMethodPayload struct {
ContactMethod *ContactMethod `json:"contact_method"`
}
ContactMethodPayload represents a contact method.
type ContactMethodReference ¶
type ContactMethodReference resourceReference
ContactMethodReference represents a reference to a contact method.
type CreateBusinessServiceSubscribersResponse ¶
type CreateBusinessServiceSubscribersResponse struct {
BusinessServiceSubscriber []*BusinessServiceSubscriber `json:"subscriptions,omitempty"`
}
CreateBusinessServiceSubscribersResponse represents a create response of business service subscription result.
type CreateScheduleOptions ¶
type CreateScheduleOptions struct {
Overflow bool `url:"overflow,omitempty"`
}
CreateScheduleOptions represents options when creating a schedule.
type DeliveryMethod ¶
type DeliveryMethod struct { TemporarilyDisabled bool `json:"temporarily_disabled,omitempty"` Type string `json:"type,omitempty"` URL string `json:"url,omitempty"` }
DeliveryMethod represents a webhook delivery method
type EmailFilter ¶
type EmailFilter struct { BodyMode string `json:"body_mode,omitempty"` BodyRegex string `json:"body_regex,omitempty"` FromEmailMode string `json:"from_email_mode,omitempty"` FromEmailRegex string `json:"from_email_regex,omitempty"` ID string `json:"id,omitempty"` SubjectMode string `json:"subject_mode,omitempty"` SubjectRegex string `json:"subject_regex,omitempty"` }
EmailFilter represents a integration email filters
type EmailParser ¶
type EmailParser struct { Action string `json:"action,omitempty"` ID *int `json:"id,omitempty"` MatchPredicate *MatchPredicate `json:"match_predicate,omitempty"` ValueExtractors []*ValueExtractor `json:"value_extractors,omitempty"` }
EmailParser represents a integration email parsers
type Error ¶
type Error struct { ErrorResponse *Response Code int `json:"code,omitempty"` Errors interface{} `json:"errors,omitempty"` Message string `json:"message,omitempty"` }
Error represents an error response from the PagerDuty API.
type EscalationPolicy ¶
type EscalationPolicy struct { Description string `json:"description,omitempty"` EscalationRules []*EscalationRule `json:"escalation_rules,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` NumLoops *int `json:"num_loops,omitempty"` RepeatEnabled bool `json:"repeat_enabled,omitempty"` Self string `json:"self,omitempty"` Services []*ServiceReference `json:"services,omitempty"` Summary string `json:"summary,omitempty"` Teams []*TeamReference `json:"teams"` Type string `json:"type,omitempty"` }
EscalationPolicy represents an escalation policy.
type EscalationPolicyPayload ¶
type EscalationPolicyPayload struct {
EscalationPolicy *EscalationPolicy `json:"escalation_policy"`
}
EscalationPolicyPayload represents an escalation policy.
type EscalationPolicyReference ¶
type EscalationPolicyReference resourceReference
EscalationPolicyReference represents a reference to an escalation policy.
type EscalationPolicyService ¶
type EscalationPolicyService service
EscalationPolicyService handles the communication with escalation policy related methods of the PagerDuty API.
func (*EscalationPolicyService) Create ¶
func (s *EscalationPolicyService) Create(escalationPolicy *EscalationPolicy) (*EscalationPolicy, *Response, error)
Create creates a new escalation policy.
func (*EscalationPolicyService) Delete ¶
func (s *EscalationPolicyService) Delete(id string) (*Response, error)
Delete deletes an existing escalation policy.
func (*EscalationPolicyService) Get ¶
func (s *EscalationPolicyService) Get(id string, o *GetEscalationPolicyOptions) (*EscalationPolicy, *Response, error)
Get retrieves information about an escalation policy.
func (*EscalationPolicyService) List ¶
func (s *EscalationPolicyService) List(o *ListEscalationPoliciesOptions) (*ListEscalationPoliciesResponse, *Response, error)
List lists existing escalation policies.
func (*EscalationPolicyService) Update ¶
func (s *EscalationPolicyService) Update(id string, escalationPolicy *EscalationPolicy) (*EscalationPolicy, *Response, error)
Update updates an existing escalation policy.
type EscalationRule ¶
type EscalationRule struct { EscalationDelayInMinutes int `json:"escalation_delay_in_minutes,omitempty"` ID string `json:"id,omitempty"` Targets []*EscalationTargetReference `json:"targets,omitempty"` }
EscalationRule represents an escalation rule.
type EscalationTargetReference ¶
type EscalationTargetReference resourceReference
EscalationTargetReference represents a reference to an escalation target
type EventRule ¶
type EventRule struct { Actions []interface{} `json:"actions,omitempty"` AdvancedCondition []interface{} `json:"advanced_condition,omitempty"` CatchAll bool `json:"catch_all,omitempty"` Condition []interface{} `json:"condition,omitempty"` ID string `json:"id,omitempty"` }
EventRule represents an event rule.
type EventRuleService ¶
type EventRuleService service
EventRuleService handles the communication with event rules related methods of the PagerDuty API.
func (*EventRuleService) Create ¶
func (s *EventRuleService) Create(eventRule *EventRule) (*EventRule, *Response, error)
Create creates a new event rule.
func (*EventRuleService) Delete ¶
func (s *EventRuleService) Delete(id string) (*Response, error)
Delete deletes an existing event rule.
func (*EventRuleService) List ¶
func (s *EventRuleService) List() (*ListEventRulesResponse, *Response, error)
List lists existing event rules.
type Extension ¶
type Extension struct { ID string `json:"id,omitempty"` Summary string `json:"summary,omitempty"` Type string `json:"type,omitempty"` Self string `json:"self,omitempty"` HTMLURL string `json:"html_url,omitempty"` Name string `json:"name"` EndpointURL string `json:"endpoint_url,omitempty"` ExtensionObjects []*ServiceReference `json:"extension_objects,omitempty"` ExtensionSchema *ExtensionSchemaReference `json:"extension_schema"` Config interface{} `json:"config,omitempty"` }
Extension represents an extension.
type ExtensionPayload ¶
type ExtensionPayload struct {
Extension *Extension `json:"extension"`
}
ExtensionPayload represents an extension.
type ExtensionSchema ¶
type ExtensionSchema struct { Description string `json:"description,omitempty"` GuideURL string `json:"guide_url,omitempty"` HTMLURL string `json:"html_url,omitempty"` IconURL string `json:"icon_url,omitempty"` ID string `json:"id,omitempty"` Key string `json:"key,omitempty"` Label string `json:"label,omitempty"` LogoURL string `json:"logo_url,omitempty"` Self string `json:"self,omitempty"` SendTypes []string `json:"send_types,omitempty"` Summary string `json:"summary,omitempty"` Type string `json:"type,omitempty"` URL string `json:"url,omitempty"` }
ExtensionSchema represents an extension schema.
type ExtensionSchemaPayload ¶
type ExtensionSchemaPayload struct {
ExtensionSchema *ExtensionSchema `json:"extension_schema"`
}
ExtensionSchemaPayload represents an extension schema.
type ExtensionSchemaReference ¶
type ExtensionSchemaReference resourceReference
ExtensionSchemaReference represents a reference to an extension schema
type ExtensionSchemaService ¶
type ExtensionSchemaService service
ExtensionSchemaService handles the communication with extension schemas related methods of the PagerDuty API.
func (*ExtensionSchemaService) Get ¶
func (s *ExtensionSchemaService) Get(id string) (*ExtensionSchema, *Response, error)
Get retrieves information about an extension schema.
func (*ExtensionSchemaService) List ¶
func (s *ExtensionSchemaService) List(o *ListExtensionSchemasOptions) (*ListExtensionSchemasResponse, *Response, error)
List lists extension schemas.
type ExtensionService ¶
type ExtensionService service
ExtensionService handles the communication with extension related methods of the PagerDuty API.
func (*ExtensionService) Create ¶
func (s *ExtensionService) Create(extension *Extension) (*Extension, *Response, error)
Create creates a new extension.
func (*ExtensionService) Delete ¶
func (s *ExtensionService) Delete(id string) (*Response, error)
Delete removes an existing extension.
func (*ExtensionService) Get ¶
func (s *ExtensionService) Get(id string) (*Extension, *Response, error)
Get retrieves information about an extension.
func (*ExtensionService) List ¶
func (s *ExtensionService) List(o *ListExtensionsOptions) (*ListExtensionsResponse, *Response, error)
List lists existing extensions.
type FullUser ¶
type FullUser struct { AvatarURL string `json:"avatar_url,omitempty"` Color string `json:"color,omitempty"` ContactMethods []*ContactMethod `json:"contact_methods,omitempty"` Description string `json:"description,omitempty"` Email string `json:"email,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` InvitationSent bool `json:"invitation_sent,omitempty"` JobTitle string `json:"job_title,omitempty"` Name string `json:"name,omitempty"` NotificationRules []*NotificationRule `json:"notification_rules,omitempty"` Role string `json:"role,omitempty"` Self string `json:"self,omitempty"` Summary string `json:"summary,omitempty"` Teams []*Team `json:"teams,omitempty"` TimeZone string `json:"time_zone,omitempty"` Type string `json:"type,omitempty"` }
FullUser represents a user fetched with include[]=contact_methods,notification_rules. This is only used when caching is enabled
type FullUserPayload ¶
type FullUserPayload struct {
User *FullUser `json:"user,omitempty"`
}
FullUserPayload represents a user.
type GetEscalationPolicyOptions ¶
type GetEscalationPolicyOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetEscalationPolicyOptions represents options when retrieving an escalation policy.
type GetEscalationRuleOptions ¶
type GetEscalationRuleOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetEscalationRuleOptions represents options when retrieving an escalation rule.
type GetIntegrationOptions ¶
type GetIntegrationOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetIntegrationOptions represents options when retrieving a service integration.
type GetMembersOptions ¶
type GetMembersOptions struct { Limit int `url:"limit,omitempty"` More bool `url:"more,omitempty"` Offset int `url:"offset,omitempty"` Total int `url:"total,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
GetMembersOptions represents options when getting a list of members.
type GetMembersResponse ¶
type GetMembersResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` Members []*Member `json:"members,omitempty"` }
GetMembersResponse represents a response of a list of members.
type GetScheduleOptions ¶
type GetScheduleOptions struct { Since string `url:"since,omitempty"` TimeZone string `url:"time_zone,omitempty"` Until string `url:"until,omitempty"` }
GetScheduleOptions represents options when retrieving a schedule.
type GetServiceOptions ¶
type GetServiceOptions struct {
Includes []string `url:"include,brackets,omitempty"`
}
GetServiceOptions represents options when retrieving a service.
type GetUserOptions ¶
type GetUserOptions struct {
Include []string `url:"include,omitempty,brackets"`
}
GetUserOptions represents options when retrieving a user.
type IncidentUrgencyRule ¶
type IncidentUrgencyRule struct { DuringSupportHours *IncidentUrgencyType `json:"during_support_hours,omitempty"` OutsideSupportHours *IncidentUrgencyType `json:"outside_support_hours,omitempty"` Type string `json:"type,omitempty"` Urgency string `json:"urgency,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 Integration ¶
type Integration struct { CreatedAt string `json:"created_at,omitempty"` EmailIncidentCreation string `json:"email_incident_creation,omitempty"` EmailFilterMode string `json:"email_filter_mode,omitempty"` EmailParsers []*EmailParser `json:"email_parsers,omitempty"` EmailParsingFallback string `json:"email_parsing_fallback,omitempty"` EmailFilters []*EmailFilter `json:"email_filters,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` Integration *Integration `json:"integration,omitempty"` IntegrationEmail string `json:"integration_email,omitempty"` IntegrationKey string `json:"integration_key,omitempty"` Name string `json:"name,omitempty"` Self string `json:"self,omitempty"` Service *ServiceReference `json:"service,omitempty"` Summary string `json:"summary,omitempty"` Type string `json:"type,omitempty"` Vendor *VendorReference `json:"vendor,omitempty"` }
Integration represents a service integration.
type IntegrationPayload ¶
type IntegrationPayload struct {
Integration *Integration `json:"integration,omitempty"`
}
IntegrationPayload represents an integration.
type IntegrationReference ¶
type IntegrationReference resourceReference
IntegrationReference represents a reference to an integration.
type ListAbilitiesResponse ¶
type ListAbilitiesResponse struct {
Abilities []string `json:"abilities,omitempty"`
}
ListAbilitiesResponse represents a list response of abilities.
type ListAddonsOptions ¶
type ListAddonsOptions struct { Limit int `url:"limit,omitempty"` More bool `url:"more,omitempty"` Offset int `url:"offset,omitempty"` Total int `url:"total,omitempty"` Filter string `url:"filter,omitempty"` Include []string `url:"include,omitempty,brackets"` ServiceIDs []string `url:"service_ids,omitempty,brackets"` }
ListAddonsOptions represents options when listing add-ons.
type ListAddonsResponse ¶
type ListAddonsResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` Addons []*Addon `json:"addons,omitempty"` }
ListAddonsResponse represents a list response of add-ons.
type ListBusinessServiceSubscribersResponse ¶
type ListBusinessServiceSubscribersResponse struct { Total int `json:"total,omitempty"` BusinessServiceSubscribers []*BusinessServiceSubscriber `json:"subscribers,omitempty"` Offset int `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit int `json:"limit,omitempty"` }
ListBusinessServiceSubscribersResponse represents a list response of business service subscribers.
type ListBusinessServicesResponse ¶
type ListBusinessServicesResponse struct { Total int `json:"total,omitempty"` BusinessServices []*BusinessService `json:"business_services,omitempty"` Offset int `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit int `json:"limit,omitempty"` }
ListBusinessServicesResponse represents a list response of business services.
type ListContactMethodsResponse ¶
type ListContactMethodsResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` ContactMethods []*ContactMethod `json:"contact_methods,omitempty"` }
ListContactMethodsResponse represents
type ListEscalationPoliciesOptions ¶
type ListEscalationPoliciesOptions struct { Limit int `url:"limit,omitempty"` More bool `url:"more,omitempty"` Offset int `url:"offset,omitempty"` Total int `url:"total,omitempty"` Includes []string `url:"include,omitempty,brackets"` Query string `url:"query,omitempty"` SortBy string `url:"sort_by,omitempty"` TeamIDs []string `url:"team_ids,omitempty,brackets"` UserIDs []string `url:"user_ids,omitempty,brackets"` }
ListEscalationPoliciesOptions represents options when listing escalation policies.
type ListEscalationPoliciesResponse ¶
type ListEscalationPoliciesResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` EscalationPolicies []*EscalationPolicy `json:"escalation_policies,omitempty"` }
ListEscalationPoliciesResponse represents a list response of escalation policies.
type ListEscalationRulesResponse ¶
type ListEscalationRulesResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` EscalationRules []*EscalationRule `json:"escalation_rules,omitempty"` }
ListEscalationRulesResponse represents a list response of escalation rules.
type ListEventRulesResponse ¶
type ListEventRulesResponse struct { ExternalID string `json:"external_id,omitempty"` ObjectVersion string `json:"object_version,omitempty"` FormatVersion int `json:"format_version,string,omitempty"` EventRules []*EventRule `json:"rules,omitempty"` }
ListEventRulesResponse represents a list response of event rules.
type ListExtensionSchemasOptions ¶
type ListExtensionSchemasOptions struct { Limit int `url:"limit,omitempty"` Offset int `url:"offset,omitempty"` Total int `url:"total,omitempty"` Query string `url:"query,omitempty"` }
ListExtensionSchemasOptions represents options when listing extension schemas.
type ListExtensionSchemasResponse ¶
type ListExtensionSchemasResponse struct { ExtensionSchemas []*ExtensionSchema `json:"extension_schemas,omitempty"` Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` }
ListExtensionSchemasResponse represents a list response of extension schemas.
type ListExtensionsOptions ¶
type ListExtensionsOptions struct { ExtensionObjectID string `url:"extension_object_id,omitempty"` Query string `url:"query,omitempty"` ExtensionSchemaID string `url:"extension_schema_id,omitempty"` Include []string `url:"include,omitempty,brackets"` Limit int `url:"limit,omitempty"` Offset int `url:"offset,omitemtpy"` Total bool `url:"total,omitempty"` }
ListExtensionsOptions represents options when listing extensions.
type ListExtensionsResponse ¶
type ListExtensionsResponse struct { Limit int `json:"limit,omitempty"` Extensions []*Extension `json:"extensions,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` }
ListExtensionsResponse represents a list response of extensions.
type ListFullUsersResponse ¶
type ListFullUsersResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` Users []*FullUser `json:"users,omitempty"` }
ListFullUsersResponse represents a list response containing FullUser objects.
type ListMaintenanceWindowsOptions ¶
type ListMaintenanceWindowsOptions struct { Filter string `url:"filter,omitempty"` Include []string `url:"include,omitempty,brackets"` Query string `url:"query,omitempty"` ServiceIDs []string `url:"service_ids,omitempty,brackets"` TeamIDs []string `url:"team_ids,omitempty,brackets"` }
ListMaintenanceWindowsOptions represents options when listing maintenance windows.
type ListMaintenanceWindowsResponse ¶
type ListMaintenanceWindowsResponse struct { Limit int `json:"limit,omitempty"` MaintenanceWindows []*MaintenanceWindow `json:"maintenance_windows,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` }
ListMaintenanceWindowsResponse represents a list response of maintenance windows.
type ListOnCallsOptions ¶
type ListOnCallsOptions struct { ID string `url:"id,omitempty"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` }
ListOnCallsOptions represents options when listing on calls.
type ListOnCallsResponse ¶
type ListOnCallsResponse struct {
Users []*User `json:"users,omitempty"`
}
ListOnCallsResponse represents a list response of on calls.
type ListOverridesOptions ¶
type ListOverridesOptions struct { Editable bool `url:"editable,omitempty"` ID string `url:"id,omitempty"` Overflow bool `url:"overflow,omitempty"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` }
ListOverridesOptions represents options when listing overrides.
type ListOverridesResponse ¶
type ListOverridesResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Overrides []*Override `json:"overrides,omitempty"` Total int `json:"total,omitempty"` }
ListOverridesResponse represents a list response of schedules.
type ListPrioritiesResponse ¶
type ListPrioritiesResponse struct { Total int `json:"total,omitempty"` Offset int `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit int `json:"limit,omitempty"` Priorities []*Priority `json:"priorities,omitempty"` }
ListPrioritiesResponse represents a list response of abilities.
type ListResp ¶
type ListResp struct { Offset int `json:"offset,omitempty"` Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Total int `json:"total,omitempty"` }
ListResp represents a list response from the PagerDuty API
type ListResponsePlayOptions ¶
type ListResponsePlayOptions struct {
From string `json:"from,omitempty"`
}
ListResponsePlayOptions represents options when listing response plays
type ListResponsePlaysResponse ¶
type ListResponsePlaysResponse struct { Total int `json:"total,omitempty"` ResponsePlays []*ResponsePlay `json:"response_plays,omitempty"` Offset int `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit int `json:"limit,omitempty"` }
ListResponsePlaysResponse represents a list response of response plays.
type ListRulesetRulesResponse ¶
type ListRulesetRulesResponse struct { Total int `json:"total,omitempty"` Rules []*RulesetRule `json:"rules,omitempty"` Offset int `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit int `json:"limit,omitempty"` }
ListRulesetRulesResponse represents a list of rules in a ruleset
type ListRulesetsResponse ¶
type ListRulesetsResponse struct { Total int `json:"total,omitempty"` Rulesets []*Ruleset `json:"rulesets,omitempty"` Offset int `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit int `json:"limit,omitempty"` }
ListRulesetsResponse represents a list response of rulesets.
type ListSchedulesOptions ¶
type ListSchedulesOptions struct { Limit int `url:"limit,omitempty"` More bool `url:"more,omitempty"` Offset int `url:"offset,omitempty"` Query string `url:"query,omitempty"` Total int `url:"total,omitempty"` }
ListSchedulesOptions represents options when listing schedules.
type ListSchedulesResponse ¶
type ListSchedulesResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Schedules []*Schedule `json:"schedules,omitempty"` Total int `json:"total,omitempty"` }
ListSchedulesResponse represents a list response of schedules.
type ListServiceDependencies ¶
type ListServiceDependencies struct {
Relationships []*ServiceDependency `json:"relationships,omitempty"`
}
ListServiceDependencies represents a list of dependencies for a service
type ListServiceEventRuleOptions ¶
type ListServiceEventRuleOptions struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` }
ListServiceEventRuleOptions represents options when retrieving a list of event rules for a service
type ListServiceEventRuleResponse ¶
type ListServiceEventRuleResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` EventRules []*ServiceEventRule `json:"rules,omitempty"` }
ListServiceEventRuleResponse represents a list of event rules for a service
type ListServicesOptions ¶
type ListServicesOptions struct { Limit int `url:"limit,omitempty"` More bool `url:"more,omitempty"` Offset int `url:"offset,omitempty"` Total int `url:"total,omitempty"` Includes []string `url:"include,omitempty,brackets"` Query string `url:"query,omitempty"` SortBy string `url:"sort_by,omitempty"` TeamIDs []string `url:"team_ids,omitempty,brackets"` TimeZone string `url:"time_zone,omitempty"` }
ListServicesOptions represents options when listing services.
type ListServicesResponse ¶
type ListServicesResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` Services []*Service }
ListServicesResponse represents a list response of services.
type ListSlackConnectionsResponse ¶
type ListSlackConnectionsResponse struct { Total int `json:"total,omitempty"` SlackConnections []*SlackConnection `json:"slack_connections,omitempty"` Offset int `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit int `json:"limit,omitempty"` }
ListSlackConnectionsResponse represents a list response of slack connections.
type ListTagsOptions ¶
type ListTagsOptions struct { Limit int `url:"limit,omitempty"` Offset int `url:"offset,omitempty"` Total int `url:"total,omitempty"` Query string `url:"query,omitempty"` }
ListTagsOptions represents options when listing tags.
type ListTagsResponse ¶
type ListTagsResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` Tags []*Tag `json:"tags,omitempty"` }
ListTagsResponse represents a list response of tags.
type ListTeamsOptions ¶
type ListTeamsOptions struct { Limit int `url:"limit,omitempty"` More bool `url:"more,omitempty"` Offset int `url:"offset,omitempty"` Total int `url:"total,omitempty"` Query string `url:"query,omitempty"` }
ListTeamsOptions represents options when listing teams.
type ListTeamsResponse ¶
type ListTeamsResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` Teams []*Team `json:"teams,omitempty"` }
ListTeamsResponse represents a list response of teams.
type ListUsersOptions ¶
type ListUsersOptions struct { Limit int `url:"limit,omitempty"` More bool `url:"more,omitempty"` Offset int `url:"offset,omitempty"` Total int `url:"total,omitempty"` Include []string `url:"include,omitempty,brackets"` Query string `url:"query,omitempty"` TeamIDs []string `url:"team_ids,omitempty,brackets"` }
ListUsersOptions represents options when listing users.
type ListUsersResponse ¶
type ListUsersResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` Users []*User `json:"users,omitempty"` }
ListUsersResponse represents a list response of users.
type ListVendorsOptions ¶
type ListVendorsOptions struct { Limit int `url:"limit,omitempty"` More bool `url:"more,omitempty"` Offset int `url:"offset,omitempty"` Total int `url:"total,omitempty"` Query string `url:"query,omitempty"` }
ListVendorsOptions represents options when listing vendors.
type ListVendorsResponse ¶
type ListVendorsResponse struct { Limit int `json:"limit,omitempty"` More bool `json:"more,omitempty"` Offset int `json:"offset,omitempty"` Total int `json:"total,omitempty"` Vendors []*Vendor `json:"vendors,omitempty"` }
ListVendorsResponse represents a list response of vendors.
type ListWebhookSubscriptionsResponse ¶
type ListWebhookSubscriptionsResponse struct { Total int `json:"total,omitempty"` WebhookSubscriptions []*WebhookSubscription `json:"webhook_subscriptions,omitempty"` Offset int `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit int `json:"limit,omitempty"` }
ListWebhookSubscriptionsResponse represents a list response of webhook subscriptions.
type MaintenanceWindow ¶
type MaintenanceWindow struct { CreatedBy *UserReference `json:"created_by,omitempty"` Description string `json:"description,omitempty"` EndTime string `json:"end_time,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` Self string `json:"self,omitempty"` SequenceNumber int `json:"sequence_number,omitempty"` Services []*ServiceReference `json:"services,omitempty"` Src string `json:"src,omitempty"` StartTime string `json:"start_time,omitempty"` Summary string `json:"summary,omitempty"` Teams []*TeamReference `json:"teams,omitempty"` Type string `json:"type,omitempty"` }
MaintenanceWindow represents a PagerDuty maintenance window.
type MaintenanceWindowPayload ¶
type MaintenanceWindowPayload struct {
MaintenanceWindow *MaintenanceWindow `json:"maintenance_window,omitempty"`
}
MaintenanceWindowPayload represents a maintenance window.
type MaintenanceWindowService ¶
type MaintenanceWindowService service
MaintenanceWindowService handles the communication with add-on related methods of the PagerDuty API.
func (*MaintenanceWindowService) Create ¶
func (s *MaintenanceWindowService) Create(maintenanceWindow *MaintenanceWindow) (*MaintenanceWindow, *Response, error)
Create creates a new maintenancce window.
func (*MaintenanceWindowService) Delete ¶
func (s *MaintenanceWindowService) Delete(id string) (*Response, error)
Delete removes an existing maintenance window.
func (*MaintenanceWindowService) Get ¶
func (s *MaintenanceWindowService) Get(id string) (*MaintenanceWindow, *Response, error)
Get retrieves information about a maintenance window.
func (*MaintenanceWindowService) List ¶
func (s *MaintenanceWindowService) List(o *ListMaintenanceWindowsOptions) (*ListMaintenanceWindowsResponse, *Response, error)
List lists existing maintenance windows.
func (*MaintenanceWindowService) Update ¶
func (s *MaintenanceWindowService) Update(id string, maintenanceWindow *MaintenanceWindow) (*MaintenanceWindow, *Response, error)
Update updates an existing maintenance window.
type MatchPredicate ¶
type MatchPredicate struct { Predicates []*Predicate `json:"children,omitempty"` Type string `json:"type,omitempty"` }
MatchPredicate represents a integration email MatchPredicate
type Member ¶
type Member struct { User *UserReference `json:"user,omitempty"` Role string `json:"role,omitempty"` }
Member represents a team member.
type NotificationRule ¶
type NotificationRule struct { ContactMethod *ContactMethodReference `json:"contact_method,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` Self string `json:"self,omitempty"` StartDelayInMinutes int `json:"start_delay_in_minutes"` Summary string `json:"summary,omitempty"` Type string `json:"type,omitempty"` Urgency string `json:"urgency,omitempty"` }
NotificationRule represents a user notification rule.
type NotificationRulePayload ¶
type NotificationRulePayload struct {
NotificationRule *NotificationRule `json:"notification_rule,omitempty"`
}
NotificationRulePayload represents a notification rule.
type Override ¶
type Override struct { ID string `json:"id,omitempty"` Start string `json:"start,omitempty"` End string `json:"end,omitempty"` User *UserReference `json:"user,omitempty"` }
Override represents an override
type OverridePayload ¶
type OverridePayload struct {
Override *Override `json:"override,omitempty"`
}
OverridePayload represents an override.
type Predicate ¶
type Predicate struct { Matcher string `json:"matcher,omitempty"` Part string `json:"part,omitempty"` Predicates []*Predicate `json:"children,omitempty"` Type string `json:"type,omitempty"` }
Predicate represents a integration email Predicate
type Priority ¶
type Priority struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
Priority represents a priority
type PriorityService ¶
type PriorityService service
PriorityService handles the communication with priority related methods of the PagerDuty API.
func (*PriorityService) List ¶
func (s *PriorityService) List() (*ListPrioritiesResponse, *Response, error)
List lists available priorities.
type PushContactMethodSound ¶
type PushContactMethodSound struct { Type string `json:"type,omitempty"` File string `json:"file,omitempty"` }
PushContactMethodSound represents a sound for a push contact method.
type RequestOptions ¶
RequestOptions is an object to setting options for HTTP requests
type Responder ¶
type Responder struct { Type string `json:"type,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` NumLoops int `json:"num_loops,omitempty"` OnCallHandoffNotifications string `json:"on_call_handoff_notifications,omitempty"` EscalationRules []*EscalationRule `json:"escalation_rules,omitempty"` Services []*ServiceReference `json:"services,omitempty"` Teams []*TeamReference `json:"teams,omitempty"` }
Responder represents a responder within a response play object (keeps linter happy)
type ResponsePlay ¶
type ResponsePlay struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Description string `json:"description,omitempty"` Team *TeamReference `json:"team,omitempty"` Subscribers []*SubscriberReference `json:"subscribers,omitempty"` SubscribersMessage string `json:"subscribers_message"` Responders []*Responder `json:"responders,omitempty"` RespondersMessage string `json:"responders_message"` Runnability string `json:"runnability,omitempty"` ConferenceNumber string `json:"conference_number,omitempty"` ConferenceURL string `json:"conference_url,omitempty"` FromEmail string `json:"from_email,omitempty"` }
ResponsePlay represents a response play.
type ResponsePlayPayload ¶
type ResponsePlayPayload struct {
ResponsePlay *ResponsePlay `json:"response_play,omitempty"`
}
ResponsePlayPayload represents payload with a response play object
type ResponsePlayService ¶
type ResponsePlayService service
ResponsePlayService handles the communication with response_plays related methods of the PagerDuty API.
func (*ResponsePlayService) Create ¶
func (s *ResponsePlayService) Create(responsePlay *ResponsePlay) (*ResponsePlay, *Response, error)
Create creates a new response play.
func (*ResponsePlayService) Delete ¶
func (s *ResponsePlayService) Delete(ID, From string) (*Response, error)
Delete deletes an existing response_play.
func (*ResponsePlayService) Get ¶
func (s *ResponsePlayService) Get(ID, From string) (*ResponsePlay, *Response, error)
Get gets a new response play.
func (*ResponsePlayService) List ¶
func (s *ResponsePlayService) List(o *ListResponsePlayOptions) (*ListResponsePlaysResponse, *Response, error)
List lists existing response_plays.
func (*ResponsePlayService) Update ¶
func (s *ResponsePlayService) Update(ID string, responsePlay *ResponsePlay) (*ResponsePlay, *Response, error)
Update updates an existing response_play.
type Restriction ¶
type Restriction struct { DurationSeconds int `json:"duration_seconds,omitempty"` StartDayOfWeek int `json:"start_day_of_week,omitempty"` StartTimeOfDay string `json:"start_time_of_day,omitempty"` Type string `json:"type,omitempty"` }
Restriction represents a schedule layer restriction.
type RuleActionExtraction ¶
type RuleActionExtraction struct { Target string `json:"target,omitempty"` Source string `json:"source,omitempty"` Regex string `json:"regex,omitempty"` Template string `json:"template,omitempty"` }
RuleActionExtraction represents a rule extraction action object
type RuleActionIntParameter ¶
type RuleActionIntParameter struct {
Value int `json:"value"`
}
RuleActionIntParameter represents an integer parameter object on a rule action
type RuleActionParameter ¶
type RuleActionParameter struct {
Value string `json:"value,omitempty"`
}
RuleActionParameter represents a string parameter object on a rule action
type RuleActionSuppress ¶
type RuleActionSuppress struct { Value bool `json:"value"` ThresholdValue int `json:"threshold_value,omitempty"` ThresholdTimeUnit string `json:"threshold_time_unit,omitempty"` ThresholdTimeAmount int `json:"threshold_time_amount,omitempty"` }
RuleActionSuppress represents a rule suppress action object
type RuleActions ¶
type RuleActions struct { Suppress *RuleActionSuppress `json:"suppress,omitempty"` Annotate *RuleActionParameter `json:"annotate,omitempty"` Severity *RuleActionParameter `json:"severity,omitempty"` Priority *RuleActionParameter `json:"priority,omitempty"` Route *RuleActionParameter `json:"route,omitempty"` EventAction *RuleActionParameter `json:"event_action,omitempty"` Extractions []*RuleActionExtraction `json:"extractions,omitempty"` Suspend *RuleActionIntParameter `json:"suspend,omitempty"` }
RuleActions represents a rule action
type RuleConditions ¶
type RuleConditions struct { Operator string `json:"operator,omitempty"` RuleSubconditions []*RuleSubcondition `json:"subconditions,omitempty"` }
RuleConditions represents the conditions field for a Ruleset
type RuleSubcondition ¶
type RuleSubcondition struct { Operator string `json:"operator,omitempty"` Parameters *ConditionParameter `json:"parameters,omitempty"` }
RuleSubcondition represents a subcondition of a ruleset condition
type RuleTimeFrame ¶
type RuleTimeFrame struct { ScheduledWeekly *ScheduledWeekly `json:"scheduled_weekly,omitempty"` ActiveBetween *ActiveBetween `json:"active_between,omitempty"` }
RuleTimeFrame represents a time_frame object on the rule object
type RuleVariable ¶
type RuleVariable struct { Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Parameters *RuleVariableParameter `json:"parameters,omitempty"` }
RuleVariable represents a rule variable
type RuleVariableParameter ¶
RuleVariableParameter represents a rule variable parameter
type Ruleset ¶
type Ruleset struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` RoutingKeys []string `json:"routing_keys,omitempty"` Team *RulesetObject `json:"team,omitempty"` Updater *RulesetObject `json:"updater,omitempty"` Creator *RulesetObject `json:"creator,omitempty"` }
Ruleset represents a ruleset.
type RulesetObject ¶
RulesetObject represents a generic object that is common within a ruleset object
type RulesetPayload ¶
type RulesetPayload struct {
Ruleset *Ruleset `json:"ruleset,omitempty"`
}
RulesetPayload represents payload with a ruleset object
type RulesetReference ¶
type RulesetReference resourceReference
RulesetReference represents a reference to a ruleset schema
type RulesetRule ¶
type RulesetRule struct { ID string `json:"id,omitempty"` Position *int `json:"position,omitempty"` Disabled bool `json:"disabled"` Conditions *RuleConditions `json:"conditions,omitempty"` Actions *RuleActions `json:"actions,omitempty"` Ruleset *RulesetReference `json:"ruleset,omitempty"` Self string `json:"self,omitempty"` CatchAll bool `json:"catch_all,omitempty"` TimeFrame *RuleTimeFrame `json:"time_frame,omitempty"` Variables []*RuleVariable `json:"variables,omitempty"` }
RulesetRule represents a Ruleset rule
type RulesetRulePayload ¶
type RulesetRulePayload struct {
Rule *RulesetRule `json:"rule,omitempty"`
}
RulesetRulePayload represents a payload for ruleset rules
type RulesetService ¶
type RulesetService service
RulesetService handles the communication with rulesets related methods of the PagerDuty API.
func (*RulesetService) Create ¶
func (s *RulesetService) Create(ruleset *Ruleset) (*Ruleset, *Response, error)
Create creates a new ruleset.
func (*RulesetService) CreateRule ¶
func (s *RulesetService) CreateRule(rulesetID string, rule *RulesetRule) (*RulesetRule, *Response, error)
CreateRule for Ruleset
func (*RulesetService) Delete ¶
func (s *RulesetService) Delete(ID string) (*Response, error)
Delete deletes an existing ruleset.
func (*RulesetService) DeleteRule ¶
func (s *RulesetService) DeleteRule(rulesetID, ruleID string) (*Response, error)
DeleteRule deletes an existing rule from the ruleset.
func (*RulesetService) Get ¶
func (s *RulesetService) Get(ID string) (*Ruleset, *Response, error)
Get gets a new ruleset.
func (*RulesetService) GetRule ¶
func (s *RulesetService) GetRule(rulesetID, ruleID string) (*RulesetRule, *Response, error)
GetRule for Ruleset
func (*RulesetService) List ¶
func (s *RulesetService) List() (*ListRulesetsResponse, *Response, error)
List lists existing rulesets.
func (*RulesetService) ListRules ¶
func (s *RulesetService) ListRules(rulesetID string) (*ListRulesetRulesResponse, *Response, error)
ListRules Lists Event Rules for Ruleset
func (*RulesetService) UpdateRule ¶
func (s *RulesetService) UpdateRule(rulesetID, ruleID string, rule *RulesetRule) (*RulesetRule, *Response, error)
UpdateRule for Ruleset
type Schedule ¶
type Schedule struct { Description string `json:"description,omitempty"` EscalationPolicies []*EscalationPolicyReference `json:"escalation_policies,omitempty"` FinalSchedule *SubSchedule `json:"final_schedule,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` OverridesSubSchedule *SubSchedule `json:"overrides_subschedule,omitempty"` ScheduleLayers []*ScheduleLayer `json:"schedule_layers,omitempty"` Self string `json:"self,omitempty"` Summary string `json:"summary,omitempty"` TimeZone string `json:"time_zone,omitempty"` Type string `json:"type,omitempty"` Users []*UserReference `json:"users,omitempty"` Teams []*TeamReference `json:"teams,omitempty"` }
Schedule represents a schedule.
type ScheduleLayer ¶
type ScheduleLayer struct { End string `json:"end,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` RenderedCoveragePercentage float64 `json:"rendered_coverage_percentage,omitempty"` RenderedScheduleEntries []*ScheduleLayerEntry `json:"rendered_schedule_entries,omitempty"` Restrictions []*Restriction `json:"restrictions,omitempty"` RotationTurnLengthSeconds int `json:"rotation_turn_length_seconds,omitempty"` RotationVirtualStart string `json:"rotation_virtual_start,omitempty"` Start string `json:"start,omitempty"` Users []*UserReferenceWrapper `json:"users,omitempty"` }
ScheduleLayer represents a schedule layer in a schedule
type ScheduleLayerEntry ¶
type ScheduleLayerEntry struct { End string `json:"end,omitempty"` Start string `json:"start,omitempty"` User *UserReference `json:"user,omitempty"` }
ScheduleLayerEntry represents a rendered schedule layer entry.
type SchedulePayload ¶
type SchedulePayload struct {
Schedule *Schedule `json:"schedule,omitempty"`
}
SchedulePayload represents a schedule.
type ScheduleReference ¶
type ScheduleReference resourceReference
ScheduleReference represents a reference to a schedule.
type ScheduleService ¶
type ScheduleService service
ScheduleService handles the communication with schedule related methods of the PagerDuty API.
func (*ScheduleService) Create ¶
func (s *ScheduleService) Create(schedule *Schedule, o *CreateScheduleOptions) (*Schedule, *Response, error)
Create creates a new schedule.
func (*ScheduleService) CreateOverride ¶
func (s *ScheduleService) CreateOverride(id string, override *Override) (*Override, *Response, error)
CreateOverride creates an override for a specific user covering the specified time range.
func (*ScheduleService) Delete ¶
func (s *ScheduleService) Delete(id string) (*Response, error)
Delete removes an existing schedule.
func (*ScheduleService) DeleteOverride ¶
func (s *ScheduleService) DeleteOverride(id string, overrideID string) (*Response, error)
DeleteOverride deletes an override.
func (*ScheduleService) Get ¶
func (s *ScheduleService) Get(id string, o *GetScheduleOptions) (*Schedule, *Response, error)
Get retrieves information about a schedule.
func (*ScheduleService) List ¶
func (s *ScheduleService) List(o *ListSchedulesOptions) (*ListSchedulesResponse, *Response, error)
List lists existing schedules.
func (*ScheduleService) ListOnCalls ¶
func (s *ScheduleService) ListOnCalls(scheduleID string, o *ListOnCallsOptions) (*ListOnCallsResponse, *Response, error)
ListOnCalls lists all of the users on call in a given schedule for a given time range.
func (*ScheduleService) ListOverrides ¶
func (s *ScheduleService) ListOverrides(scheduleID string, o *ListOverridesOptions) (*ListOverridesResponse, *Response, error)
ListOverrides lists existing overrides.
func (*ScheduleService) Update ¶
func (s *ScheduleService) Update(id string, schedule *Schedule, o *UpdateScheduleOptions) (*Schedule, *Response, error)
Update updates an existing schedule.
type ScheduledAction ¶
type ScheduledAction struct { At *At `json:"at,omitempty"` ToUrgency string `json:"to_urgency,omitempty"` Type string `json:"type,omitempty"` }
ScheduledAction contains scheduled actions for the service.
type ScheduledWeekly ¶
type ScheduledWeekly struct { Weekdays []int `json:"weekdays,omitempty"` Timezone string `json:"timezone,omitempty"` StartTime int `json:"start_time,omitempty"` Duration int `json:"duration,omitempty"` }
ScheduledWeekly represents a time_frame object for scheduling rules weekly
type Service ¶
type Service struct { AcknowledgementTimeout *int `json:"acknowledgement_timeout"` Addons []*AddonReference `json:"addons,omitempty"` AlertCreation string `json:"alert_creation,omitempty"` AlertGrouping *string `json:"alert_grouping"` AlertGroupingTimeout *int `json:"alert_grouping_timeout,omitempty"` AlertGroupingParameters *AlertGroupingParameters `json:"alert_grouping_parameters,omitempty"` AutoResolveTimeout *int `json:"auto_resolve_timeout"` CreatedAt string `json:"created_at,omitempty"` Description string `json:"description,omitempty"` EscalationPolicy *EscalationPolicyReference `json:"escalation_policy,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` IncidentUrgencyRule *IncidentUrgencyRule `json:"incident_urgency_rule,omitempty"` Integrations []*IntegrationReference `json:"integrations,omitempty"` LastIncidentTimestamp string `json:"last_incident_timestamp,omitempty"` Name string `json:"name,omitempty"` ScheduledActions []*ScheduledAction `json:"scheduled_actions,omitempty"` Self string `json:"self,omitempty"` Status string `json:"status,omitempty"` Summary string `json:"summary,omitempty"` SupportHours *SupportHours `json:"support_hours,omitempty"` Teams []*TeamReference `json:"teams,omitempty"` Type string `json:"type,omitempty"` }
Service represents a service.
type ServiceDependency ¶
type ServiceDependency struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` SupportingService *ServiceObj `json:"supporting_service,omitempty"` DependentService *ServiceObj `json:"dependent_service,omitempty"` }
ServiceDependency represents a relationship between a business and technical service
type ServiceDependencyService ¶
type ServiceDependencyService service
ServiceDependencyService handles the communication with service dependency related methods of the PagerDuty API.
func (*ServiceDependencyService) AssociateServiceDependencies ¶
func (s *ServiceDependencyService) AssociateServiceDependencies(dependencies *ListServiceDependencies) (*ListServiceDependencies, *Response, error)
AssociateServiceDependencies Create new dependencies between two services
func (*ServiceDependencyService) DisassociateServiceDependencies ¶
func (s *ServiceDependencyService) DisassociateServiceDependencies(dependencies *ListServiceDependencies) (*ListServiceDependencies, *Response, error)
DisassociateServiceDependencies Disassociate dependencies between two services.
func (*ServiceDependencyService) GetServiceDependenciesForType ¶
func (s *ServiceDependencyService) GetServiceDependenciesForType(serviceID, serviceType string) (*ListServiceDependencies, *Response, error)
GetServiceDependenciesForType gets all immediate dependencies of a dependent service.
type ServiceEventRule ¶
type ServiceEventRule struct { ID string `json:"id,omitempty"` Self string `json:"self,omitempty"` Disabled bool `json:"disabled"` Conditions *RuleConditions `json:"conditions,omitempty"` TimeFrame *RuleTimeFrame `json:"time_frame,omitempty"` Variables []*RuleVariable `json:"variables,omitempty"` Position *int `json:"position,omitempty"` Actions *RuleActions `json:"actions,omitempty"` Service *ServiceReference `json:"service_id,omitempty"` }
ServiceEventRule represents a service event rule
type ServiceEventRulePayload ¶
type ServiceEventRulePayload struct {
Rule *ServiceEventRule `json:"rule,omitempty"`
}
ServiceEventRulePayload represents a payload for service event rules
type ServiceObj ¶
ServiceObj represents a service object in service relationship
type ServicePayload ¶
type ServicePayload struct {
Service *Service `json:"service,omitempty"`
}
ServicePayload represents a service.
type ServiceReference ¶
type ServiceReference resourceReference
ServiceReference represents a reference to a service.
type ServicesService ¶
type ServicesService service
ServicesService handles the communication with service related methods of the PagerDuty API.
func (*ServicesService) Create ¶
func (s *ServicesService) Create(service *Service) (*Service, *Response, error)
Create creates a new service.
func (*ServicesService) CreateEventRule ¶
func (s *ServicesService) CreateEventRule(serviceID string, eventRule *ServiceEventRule) (*ServiceEventRule, *Response, error)
CreateEventRule creates a new service event rule.
func (*ServicesService) CreateIntegration ¶
func (s *ServicesService) CreateIntegration(serviceID string, integration *Integration) (*Integration, *Response, error)
CreateIntegration creates a new service integration.
func (*ServicesService) Delete ¶
func (s *ServicesService) Delete(id string) (*Response, error)
Delete removes an existing service.
func (*ServicesService) DeleteEventRule ¶
func (s *ServicesService) DeleteEventRule(serviceID, ruleID string) (*Response, error)
DeleteEventRule removes an existing service event rule.
func (*ServicesService) DeleteIntegration ¶
func (s *ServicesService) DeleteIntegration(serviceID, integrationID string) (*Response, error)
DeleteIntegration removes an existing service integration.
func (*ServicesService) Get ¶
func (s *ServicesService) Get(id string, o *GetServiceOptions) (*Service, *Response, error)
Get retrieves information about a service.
func (*ServicesService) GetEventRule ¶
func (s *ServicesService) GetEventRule(serviceID, ruleID string) (*ServiceEventRule, *Response, error)
GetEventRule retrieves information about a service event rule.
func (*ServicesService) GetIntegration ¶
func (s *ServicesService) GetIntegration(serviceID, integrationID string, o *GetIntegrationOptions) (*Integration, *Response, error)
GetIntegration retrieves information about a service integration.
func (*ServicesService) List ¶
func (s *ServicesService) List(o *ListServicesOptions) (*ListServicesResponse, *Response, error)
List lists existing services.
func (*ServicesService) ListEventRules ¶
func (s *ServicesService) ListEventRules(serviceID string, o *ListServiceEventRuleOptions) (*ListServiceEventRuleResponse, *Response, error)
ListEventRules lists existing service event rules.
func (*ServicesService) UpdateEventRule ¶
func (s *ServicesService) UpdateEventRule(serviceID, ruleID string, eventRule *ServiceEventRule) (*ServiceEventRule, *Response, error)
UpdateEventRule updates an existing service event rule.
func (*ServicesService) UpdateIntegration ¶
func (s *ServicesService) UpdateIntegration(serviceID, integrationID string, integration *Integration) (*Integration, *Response, error)
UpdateIntegration updates an existing service integration.
type SlackConnection ¶
type SlackConnection struct { ID string `json:"id,omitempty"` SourceID string `json:"source_id,omitempty"` SourceName string `json:"source_name,omitempty"` SourceType string `json:"source_type,omitempty"` ChannelID string `json:"channel_id,omitempty"` ChannelName string `json:"channel_name,omitempty"` WorkspaceID string `json:"workspace_id,omitempty"` Config ConnectionConfig `json:"config,omitempty"` NotificationType string `json:"notification_type,omitempty"` }
SlackConnection represents a slack connection.
type SlackConnectionPayload ¶
type SlackConnectionPayload struct {
SlackConnection *SlackConnection `json:"slack_connection,omitempty"`
}
SlackConnectionPayload represents payload with a slack connect object
type SlackConnectionService ¶
type SlackConnectionService service
SlackConnectionService handles the communication with the integration slack related methods of the PagerDuty API.
func (*SlackConnectionService) Create ¶
func (s *SlackConnectionService) Create(workspaceID string, sconn *SlackConnection) (*SlackConnection, *Response, error)
Create creates a new slack connection.
func (*SlackConnectionService) Delete ¶
func (s *SlackConnectionService) Delete(workspaceID, ID string) (*Response, error)
Delete deletes a slack connection.
func (*SlackConnectionService) Get ¶
func (s *SlackConnectionService) Get(workspaceID, ID string) (*SlackConnection, *Response, error)
Get gets a slack connection.
func (*SlackConnectionService) List ¶
func (s *SlackConnectionService) List(workspaceID string) (*ListSlackConnectionsResponse, *Response, error)
List lists existing slack connections.
func (*SlackConnectionService) Update ¶
func (s *SlackConnectionService) Update(workspaceID, ID string, sconn *SlackConnection) (*SlackConnection, *Response, error)
Update updates a slack connection.
type SubSchedule ¶
type SubSchedule struct { Name string `json:"name,omitempty"` RenderedCoveragePercentage float64 `json:"rendered_coverage_percentage,omitempty"` RenderedScheduleEntries []*ScheduleLayerEntry `json:"rendered_schedule_entries,omitempty"` }
SubSchedule represents a sub-schedule of a schedule.
type SubscriberReference ¶
type SubscriberReference resourceReference
SubscriberReference represents a reference to a subscriber schema
type SupportHours ¶
type SupportHours struct { DaysOfWeek []int `json:"days_of_week,omitempty"` EndTime string `json:"end_time,omitempty"` StartTime string `json:"start_time,omitempty"` TimeZone string `json:"time_zone,omitempty"` Type string `json:"type,omitempty"` }
SupportHours are the support hours for the service.
type Tag ¶
type Tag struct { Label string `json:"label,omitempty"` 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"` }
Tag represents a tag.
type TagAssignment ¶
type TagAssignment struct { Type string `json:"type"` TagID string `json:"id,omitempty"` Label string `json:"label,omitempty"` EntityType string `json:"entity_type,omitempty"` EntityID string `json:"entity_id,omitempty"` }
TagAssignment represents a single tag assignment to an entity
type TagAssignments ¶
type TagAssignments struct { Add []*TagAssignment `json:"add,omitempty"` Remove []*TagAssignment `json:"remove,omitempty"` }
TagAssignments represent an object for adding and removing tag to entity assignments.
type TagPayload ¶
type TagPayload struct {
Tag *Tag `json:"tag,omitempty"`
}
TagPayload represents payload with a tag object
type TagService ¶
type TagService service
TagService handles the communication with tag related methods of the PagerDuty API.
func (*TagService) Assign ¶
func (s *TagService) Assign(e, eid string, a *TagAssignments) (*Response, error)
Assign adds and removes tag assignments with entities
func (*TagService) Create ¶
func (s *TagService) Create(tag *Tag) (*Tag, *Response, error)
Create creates a new tag.
func (*TagService) Delete ¶
func (s *TagService) Delete(id string) (*Response, error)
Delete removes an existing tag.
func (*TagService) Get ¶
func (s *TagService) Get(id string) (*Tag, *Response, error)
Get retrieves information about a tag.
func (*TagService) List ¶
func (s *TagService) List(o *ListTagsOptions) (*ListTagsResponse, *Response, error)
List lists existing tags.
func (*TagService) ListTagsForEntity ¶
func (s *TagService) ListTagsForEntity(e, eid string) (*ListTagsResponse, *Response, error)
List Tags for a given Entity.
type Team ¶
type Team struct { Description string `json:"description,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Self string `json:"self,omitempty"` Summary string `json:"summary,omitempty"` Type string `json:"type,omitempty"` Parent *TeamReference `json:"parent,omitempty"` }
Team represents a team.
type TeamPayload ¶
type TeamPayload struct {
Team *Team `json:"team,omitempty"`
}
TeamPayload represents a team.
type TeamReference ¶
type TeamReference resourceReference
TeamReference represents a reference to a team.
type TeamService ¶
type TeamService service
TeamService handles the communication with team related methods of the PagerDuty API.
func (*TeamService) AddEscalationPolicy ¶
func (s *TeamService) AddEscalationPolicy(teamID, escID string) (*Response, error)
AddEscalationPolicy adds an escalation policy to a team.
func (*TeamService) AddUser ¶
func (s *TeamService) AddUser(teamID, userID string) (*Response, error)
AddUser adds a user to a team.
func (*TeamService) AddUserWithRole ¶
func (s *TeamService) AddUserWithRole(teamID, userID string, role string) (*Response, error)
AddUserWithRole adds a user with the specified role (one of observer, manager, or responder[default])
func (*TeamService) Create ¶
func (s *TeamService) Create(team *Team) (*Team, *Response, error)
Create creates a new team.
func (*TeamService) Delete ¶
func (s *TeamService) Delete(id string) (*Response, error)
Delete removes an existing team.
func (*TeamService) Get ¶
func (s *TeamService) Get(id string) (*Team, *Response, error)
Get retrieves information about a team.
func (*TeamService) GetMembers ¶
func (s *TeamService) GetMembers(teamID string, o *GetMembersOptions) (*GetMembersResponse, *Response, error)
GetMembers retrieves information about members on a team.
func (*TeamService) List ¶
func (s *TeamService) List(o *ListTeamsOptions) (*ListTeamsResponse, *Response, error)
List lists existing teams.
func (*TeamService) RemoveEscalationPolicy ¶
func (s *TeamService) RemoveEscalationPolicy(teamID, escID string) (*Response, error)
RemoveEscalationPolicy removes an escalation policy from a team.
func (*TeamService) RemoveUser ¶
func (s *TeamService) RemoveUser(teamID, userID string) (*Response, error)
RemoveUser removes a user from a team.
type UpdateScheduleOptions ¶
type UpdateScheduleOptions struct {
Overflow bool `url:"overflow,omitempty"`
}
UpdateScheduleOptions represents options when updating a schedule.
type User ¶
type User struct { AvatarURL string `json:"avatar_url,omitempty"` Color string `json:"color,omitempty"` ContactMethods []*ContactMethodReference `json:"contact_methods,omitempty"` Description string `json:"description,omitempty"` Email string `json:"email,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` InvitationSent bool `json:"invitation_sent,omitempty"` JobTitle string `json:"job_title,omitempty"` Name string `json:"name,omitempty"` NotificationRules []*NotificationRule `json:"notification_rules,omitempty"` Role string `json:"role,omitempty"` Self string `json:"self,omitempty"` Summary string `json:"summary,omitempty"` Teams []*TeamReference `json:"teams,omitempty"` TimeZone string `json:"time_zone,omitempty"` Type string `json:"type,omitempty"` }
User represents a user.
type UserPayload ¶
type UserPayload struct {
User *User `json:"user,omitempty"`
}
UserPayload represents a user.
type UserReference ¶
type UserReference resourceReference
UserReference represents a reference to a user.
type UserReferenceWrapper ¶
type UserReferenceWrapper struct {
User *UserReference `json:"user,omitempty"`
}
UserReferenceWrapper is a wrapper around UserReference
type UserService ¶
type UserService service
UserService handles the communication with user related methods of the PagerDuty API.
func (*UserService) Create ¶
func (s *UserService) Create(user *User) (*User, *Response, error)
Create creates a new user.
func (*UserService) CreateContactMethod ¶
func (s *UserService) CreateContactMethod(userID string, contactMethod *ContactMethod) (*ContactMethod, *Response, error)
CreateContactMethod creates a new contact method for a user. If the same contact method already exists, it will fetch the existing one, return a 200 instead of fail. This feature is useful in terraform provider, as when the desired user contact method already exists, terraform will be able to sync it to the state automatically. Otherwise, we need to manually fix the conflicts.
func (*UserService) CreateNotificationRule ¶
func (s *UserService) CreateNotificationRule(userID string, rule *NotificationRule) (*NotificationRule, *Response, error)
CreateNotificationRule creates a new notification rule for a user.
func (*UserService) Delete ¶
func (s *UserService) Delete(id string) (*Response, error)
Delete removes an existing user.
func (*UserService) DeleteContactMethod ¶
func (s *UserService) DeleteContactMethod(userID, contactMethodID string) (*Response, error)
DeleteContactMethod deletes a contact method for a user.
func (*UserService) DeleteNotificationRule ¶
func (s *UserService) DeleteNotificationRule(userID, ruleID string) (*Response, error)
DeleteNotificationRule deletes a notification rule for a user.
func (*UserService) Get ¶
func (s *UserService) Get(id string, o *GetUserOptions) (*User, *Response, error)
Get retrieves information about a user.
func (*UserService) GetContactMethod ¶
func (s *UserService) GetContactMethod(userID string, contactMethodID string) (*ContactMethod, *Response, error)
GetContactMethod retrieves a contact method for a user.
func (*UserService) GetFull ¶
func (s *UserService) GetFull(id string) (*FullUser, *Response, error)
GetFull retrieves information about a user including contact methods and notification rules.
func (*UserService) GetNotificationRule ¶
func (s *UserService) GetNotificationRule(userID string, ruleID string) (*NotificationRule, *Response, error)
GetNotificationRule retrieves a notification rule for a user.
func (*UserService) List ¶
func (s *UserService) List(o *ListUsersOptions) (*ListUsersResponse, *Response, error)
List lists existing users.
func (*UserService) ListAll ¶
func (s *UserService) ListAll(o *ListUsersOptions) ([]*FullUser, error)
ListAll lists users into FullUser objects
func (*UserService) ListContactMethods ¶
func (s *UserService) ListContactMethods(userID string) (*ListContactMethodsResponse, *Response, error)
ListContactMethods lists contact methods for a user.
func (*UserService) UpdateContactMethod ¶
func (s *UserService) UpdateContactMethod(userID, contactMethodID string, contactMethod *ContactMethod) (*ContactMethod, *Response, error)
UpdateContactMethod updates a contact method for a user.
func (*UserService) UpdateNotificationRule ¶
func (s *UserService) UpdateNotificationRule(userID, ruleID string, rule *NotificationRule) (*NotificationRule, *Response, error)
UpdateNotificationRule updates a notification rulefor a user.
type ValueExtractor ¶
type ValueExtractor struct { ValueName string `json:"value_name,omitempty"` Part string `json:"part,omitempty"` StartsAfter string `json:"starts_after,omitempty"` EndsBefore string `json:"ends_before,omitempty"` Type string `json:"type,omitempty"` Regex string `json:"regex,omitempty"` }
ValueExtractor represents a integration email ValueExtractor
type Vendor ¶
type Vendor struct { Description string `json:"description,omitempty"` GenericServiceType string `json:"generic_service_type,omitempty"` HTMLURL string `json:"html_url,omitempty"` ID string `json:"id,omitempty"` IntegrationGuideURL string `json:"integration_guide_url,omitempty"` LogoURL string `json:"logo_url,omitempty"` Name string `json:"name,omitempty"` Self string `json:"self,omitempty"` Summary string `json:"summary,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` Type string `json:"type,omitempty"` WebsiteURL string `json:"website_url,omitempty"` }
Vendor represents a vendor.
type VendorPayload ¶
type VendorPayload struct {
Vendor *Vendor `json:"vendor,omitempty"`
}
VendorPayload represents a vendor.
type VendorReference ¶
type VendorReference resourceReference
VendorReference represents a reference to a vendor
type VendorService ¶
type VendorService service
VendorService handles the communication with vendor related methods of the PagerDuty API.
func (*VendorService) Get ¶
func (s *VendorService) Get(id string) (*Vendor, *Response, error)
Get retrieves information about a vendor.
func (*VendorService) List ¶
func (s *VendorService) List(o *ListVendorsOptions) (*ListVendorsResponse, *Response, error)
List lists existing vendors.
type WebhookSubscription ¶
type WebhookSubscription struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Active bool `json:"active,omitempty"` Description string `json:"description,omitempty"` DeliveryMethod DeliveryMethod `json:"delivery_method,omitempty"` Events []string `json:"events,omitempty"` Filter Filter `json:"filter,omitempty"` }
WebhookSubscription represents a webhook subscription.
type WebhookSubscriptionPayload ¶
type WebhookSubscriptionPayload struct {
WebhookSubscription *WebhookSubscription `json:"webhook_subscription,omitempty"`
}
WebhookSubscriptionPayload represents payload with a slack connect object
type WebhookSubscriptionService ¶
type WebhookSubscriptionService service
WebhookSubscriptionService handle v3 webhooks from PagerDuty.
func (*WebhookSubscriptionService) Create ¶
func (s *WebhookSubscriptionService) Create(sub *WebhookSubscription) (*WebhookSubscription, *Response, error)
Create creates a new webhook subscription.
func (*WebhookSubscriptionService) Delete ¶
func (s *WebhookSubscriptionService) Delete(ID string) (*Response, error)
Delete deletes a webhook subscription.
func (*WebhookSubscriptionService) Get ¶
func (s *WebhookSubscriptionService) Get(ID string) (*WebhookSubscription, *Response, error)
Get gets a webhook subscription.
func (*WebhookSubscriptionService) List ¶
func (s *WebhookSubscriptionService) List() (*ListWebhookSubscriptionsResponse, *Response, error)
List lists existing webhook subscriptions.
func (*WebhookSubscriptionService) Update ¶
func (s *WebhookSubscriptionService) Update(ID string, sub *WebhookSubscription) (*WebhookSubscription, *Response, error)
Update updates a webhook subscription.
Source Files ¶
- ability.go
- addon.go
- business_service.go
- business_service_subscriber.go
- cache.go
- error.go
- escalation_policy.go
- event_rule.go
- extension.go
- extension_schema.go
- maintenance_window.go
- pagerduty.go
- priority.go
- references.go
- response_play.go
- ruleset.go
- schedule.go
- service.go
- service_dependency.go
- slack_connection.go
- tag.go
- team.go
- user.go
- vendor.go
- webhook_subscription.go