pagerduty

package
v0.0.0-...-5876af2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: MPL-2.0 Imports: 25 Imported by: 9

Documentation

Index

Constants

View Source
const CacheVariableTypeGlobal string = "global"
View Source
const CacheVariableTypeService string = "service"
View Source
const PathTypeGlobal string = "global"
View Source
const PathTypeRouter string = "router"
View Source
const PathTypeService string = "service"
View Source
const PathTypeUnrouted string = "unrouted"

Variables

View Source
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 PopulateCache

func PopulateCache()

PopulateCache does initial population of the 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

List lists available abilities.

func (*AbilityService) Test

func (s *AbilityService) Test(id string) (*Response, error)

Test tests whether the account has a given ability.

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

List lists installed add-ons.

func (*AddonService) Update

func (s *AddonService) Update(id string, addon *Addon) (*Addon, *Response, error)

Update updates an existing add-on.

type AlertCounts

type AlertCounts struct {
	All       int `json:"all"`
	Resolved  int `json:"resolved"`
	Triggered int `json:"triggered"`
}

type AlertGroupingConfig

type AlertGroupingConfig struct {
	Timeout    *int     `json:"timeout,omitempty"`
	TimeWindow *int     `json:"time_window,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 At

type At struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

At represents when a scheduled action will occur.

type AuthTokenType

type AuthTokenType int64

AuthTokenType is an enum of available tokens types authenticating calls

const (
	AuthTokenTypeAPIToken AuthTokenType = iota
	AuthTokenTypeScopedOauthToken
	AuthTokenTypeUseAppCredentials
)

func (AuthTokenType) String

func (d AuthTokenType) String() string

type AutoPauseNotificationsParameters

type AutoPauseNotificationsParameters struct {
	Enabled bool `json:"enabled"`
	Timeout *int `json:"timeout"`
}

AutoPauseNotificationsParameters defines how alerts on this service are automatically suspended for a period of time before triggering, when identified as likely being transient.

type AutomationActionsAction

type AutomationActionsAction struct {
	ID                   string                               `json:"id"`
	Name                 string                               `json:"name"`
	Description          *string                              `json:"description,omitempty"`
	ActionType           string                               `json:"action_type"`
	RunnerID             *string                              `json:"runner,omitempty"`
	ActionDataReference  AutomationActionsActionDataReference `json:"action_data_reference"`
	Services             []*ServiceReference                  `json:"services,omitempty"`
	Teams                []*TeamReference                     `json:"teams,omitempty"`
	Privileges           *AutomationActionsPrivileges         `json:"privileges,omitempty"`
	Type                 *string                              `json:"type,omitempty"`
	ActionClassification *string                              `json:"action_classification,omitempty"`
	RunnerType           *string                              `json:"runner_type,omitempty"`
	CreationTime         *string                              `json:"creation_time,omitempty"`
	ModifyTime           *string                              `json:"modify_time,omitempty"`
}

type AutomationActionsActionDataReference

type AutomationActionsActionDataReference struct {
	ProcessAutomationJobId        *string `json:"process_automation_job_id,omitempty"`
	ProcessAutomationJobArguments *string `json:"process_automation_job_arguments,omitempty"`
	ProcessAutomationNodeFilter   *string `json:"process_automation_node_filter,omitempty"`
	Script                        *string `json:"script,omitempty"`
	InvocationCommand             *string `json:"invocation_command,omitempty"`
}

type AutomationActionsActionPayload

type AutomationActionsActionPayload struct {
	Action *AutomationActionsAction `json:"action,omitempty"`
}

type AutomationActionsActionService

type AutomationActionsActionService service

AutomationActionsAction handles the communication with Automation Actions related methods of the PagerDuty API.

func (*AutomationActionsActionService) AssociateToService

Associate an Automation Action with a service

func (*AutomationActionsActionService) AssociateToTeam

Associate an Automation Action with a team

func (*AutomationActionsActionService) Create

Create creates a new action

func (*AutomationActionsActionService) Delete

Delete deletes an existing action.

func (*AutomationActionsActionService) DissociateFromService

func (s *AutomationActionsActionService) DissociateFromService(actionID, serviceID string) (*Response, error)

Dissociate an Automation Action with a service

func (*AutomationActionsActionService) DissociateToTeam

func (s *AutomationActionsActionService) DissociateToTeam(actionID, teamID string) (*Response, error)

Dissociate an Automation Action with a team

func (*AutomationActionsActionService) Get

Get retrieves information about an action.

func (*AutomationActionsActionService) GetAssociationToService

func (s *AutomationActionsActionService) GetAssociationToService(actionID, serviceID string) (*AutomationActionsActionServiceAssociationPayload, *Response, error)

Gets the details of an Automation Action / service relation

func (*AutomationActionsActionService) GetAssociationToTeam

Gets the details of an Automation Action / team relation

func (*AutomationActionsActionService) Update

Update an existing action

type AutomationActionsActionServiceAssociationPayload

type AutomationActionsActionServiceAssociationPayload struct {
	Service *ServiceReference `json:"service,omitempty"`
}

type AutomationActionsActionTeamAssociationPayload

type AutomationActionsActionTeamAssociationPayload struct {
	Team *TeamReference `json:"team,omitempty"`
}

type AutomationActionsPrivileges

type AutomationActionsPrivileges struct {
	Permissions []*string `json:"permissions,omitempty"`
}

type AutomationActionsRunner

type AutomationActionsRunner struct {
	ID             string                       `json:"id"`
	Name           string                       `json:"name"`
	Type           string                       `json:"type"`
	RunnerType     string                       `json:"runner_type"`
	CreationTime   string                       `json:"creation_time"`
	LastSeenTime   *string                      `json:"last_seen,omitempty"`
	Summary        string                       `json:"summary,omitempty"`
	Description    *string                      `json:"description,omitempty"`
	RunbookBaseUri *string                      `json:"runbook_base_uri,omitempty"`
	RunbookApiKey  *string                      `json:"runbook_api_key,omitempty"`
	Teams          []*TeamReference             `json:"teams,omitempty"`
	Privileges     *AutomationActionsPrivileges `json:"privileges,omitempty"`
}

type AutomationActionsRunnerPayload

type AutomationActionsRunnerPayload struct {
	Runner *AutomationActionsRunner `json:"runner,omitempty"`
}

type AutomationActionsRunnerService

type AutomationActionsRunnerService service

AutomationActionsRunner handles the communication with schedule related methods of the PagerDuty API.

func (*AutomationActionsRunnerService) AssociateToTeam

Associate a Runner with a team

func (*AutomationActionsRunnerService) Create

Create creates a new runner

func (*AutomationActionsRunnerService) Delete

Delete deletes an existing runner.

func (*AutomationActionsRunnerService) DissociateFromTeam

func (s *AutomationActionsRunnerService) DissociateFromTeam(runnerID, teamID string) (*Response, error)

Dissociate an Runner with a team

func (*AutomationActionsRunnerService) Get

Get retrieves information about a runner.

func (*AutomationActionsRunnerService) GetAssociationToTeam

Gets the details of a Runner / team relation

func (*AutomationActionsRunnerService) Update

Update an existing runner

type AutomationActionsRunnerTeamAssociationPayload

type AutomationActionsRunnerTeamAssociationPayload struct {
	Team *TeamReference `json:"team,omitempty"`
}

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

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

Get gets a business service.

func (*BusinessServiceService) List

List lists existing business services.

func (*BusinessServiceService) Update

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

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
	EventOrchestrations              *EventOrchestrationService
	EventOrchestrationPaths          *EventOrchestrationPathService
	EventOrchestrationIntegrations   *EventOrchestrationIntegrationService
	EventOrchestrationCacheVariables *EventOrchestrationCacheVariableService
	Schedules                        *ScheduleService
	Services                         *ServicesService
	Teams                            *TeamService
	ExtensionSchemas                 *ExtensionSchemaService
	Users                            *UserService
	Licenses                         *LicenseService
	Vendors                          *VendorService
	EventRules                       *EventRuleService
	BusinessServices                 *BusinessServiceService
	ServiceDependencies              *ServiceDependencyService
	Priorities                       *PriorityService
	ResponsePlays                    *ResponsePlayService
	SlackConnections                 *SlackConnectionService
	Tags                             *TagService
	WebhookSubscriptions             *WebhookSubscriptionService
	BusinessServiceSubscribers       *BusinessServiceSubscriberService
	OnCall                           *OnCallService
	AutomationActionsRunner          *AutomationActionsRunnerService
	AutomationActionsAction          *AutomationActionsActionService
	Incidents                        *IncidentService
	IncidentWorkflows                *IncidentWorkflowService
	IncidentWorkflowTriggers         *IncidentWorkflowTriggerService
	CustomFields                     *CustomFieldService
	CustomFieldSchemas               *CustomFieldSchemaService
	CustomFieldSchemaAssignments     *CustomFieldSchemaAssignmentService
	IncidentCustomFields             *IncidentCustomFieldService
	// contains filtered or unexported fields
}

Client manages the communication with the PagerDuty API

func NewClient

func NewClient(config *Config) (*Client, error)

NewClient returns a new PagerDuty API client.

func (*Client) DecodeJSON

func (c *Client) DecodeJSON(res *Response, v interface{}) error

DecodeJSON decodes json body to given interface

func (*Client) ValidateAuth

func (c *Client) ValidateAuth() error

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
	APIAuthTokenType          *AuthTokenType
	AppOauthScopedTokenParams *persistentconfig.AppOauthScopedTokenParams
	// contains filtered or unexported fields
}

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 CursorListResp

type CursorListResp struct {
	NextCursor string
	Limit      int
}

CursorListResp represents a cursor-paginated list response from the PagerDuty API

type CustomField deprecated

type CustomField struct {
	ID           string               `json:"id,omitempty"`
	Name         string               `json:"name,omitempty"`
	DisplayName  string               `json:"display_name,omitempty"`
	Type         string               `json:"type,omitempty"`
	Summary      string               `json:"summary,omitempty"`
	Self         string               `json:"self,omitempty"`
	DataType     CustomFieldDataType  `json:"datatype,omitempty"`
	Description  *string              `json:"description,omitempty"`
	MultiValue   bool                 `json:"multi_value"`
	FixedOptions bool                 `json:"fixed_options"`
	FieldOptions []*CustomFieldOption `json:"field_options,omitempty"`
}

CustomField represents a custom field.

Deprecated: This struct should no longer be used. IncidentCustomField is similar but not identical.

type CustomFieldDataType deprecated

type CustomFieldDataType int64

CustomFieldDataType is an enumeration of available datatypes for fields.

Deprecated: Use IncidentCustomFieldDataType for Incident Custom Fields

const (
	CustomFieldDataTypeUnknown CustomFieldDataType = iota
	CustomFieldDataTypeString
	CustomFieldDataTypeInt
	CustomFieldDataTypeFloat
	CustomFieldDataTypeBool
	CustomFieldDataTypeUrl
	CustomFieldDataTypeDateTime
	CustomFieldDataTypeFieldOption
)

func CustomFieldDataTypeFromString deprecated

func CustomFieldDataTypeFromString(s string) CustomFieldDataType

Deprecated: Use IncidentCustomFieldDataType for Incident Custom Fields

func (*CustomFieldDataType) IsAllowedOnField deprecated

func (d *CustomFieldDataType) IsAllowedOnField() bool

IsAllowedOnField determines if the CustomFieldDataType is a legal value for fields. This enables field_option to be a defined datatype (as is necessary for default values on field configurations) but not on fields.

Deprecated: Use IncidentCustomFieldDataType for Incident Custom Fields

func (*CustomFieldDataType) IsKnown deprecated

func (d *CustomFieldDataType) IsKnown() bool

Deprecated: Use IncidentCustomFieldDataType for Incident Custom Fields

func (CustomFieldDataType) MarshalJSON deprecated

func (d CustomFieldDataType) MarshalJSON() ([]byte, error)

Deprecated: Use IncidentCustomFieldDataType for Incident Custom Fields

func (CustomFieldDataType) String deprecated

func (d CustomFieldDataType) String() string

Deprecated: Use IncidentCustomFieldDataType for Incident Custom Fields

func (*CustomFieldDataType) UnmarshalJSON deprecated

func (d *CustomFieldDataType) UnmarshalJSON(data []byte) error

Deprecated: Use IncidentCustomFieldDataType for Incident Custom Fields

type CustomFieldDefaultValue deprecated

type CustomFieldDefaultValue struct {
	DataType   CustomFieldDataType `json:"datatype,omitempty"`
	MultiValue bool                `json:"multi_value"`
	Value      interface{}         `json:"value,omitempty"`
}

CustomFieldDefaultValue

Deprecated: This struct should no longer be used

func (*CustomFieldDefaultValue) MarshalJSON

func (d *CustomFieldDefaultValue) MarshalJSON() ([]byte, error)

func (*CustomFieldDefaultValue) UnmarshalJSON

func (d *CustomFieldDefaultValue) UnmarshalJSON(data []byte) error

type CustomFieldOption deprecated

type CustomFieldOption struct {
	ID   string                 `json:"id,omitempty"`
	Type string                 `json:"type,omitempty"`
	Data *CustomFieldOptionData `json:"data,omitempty"`
}

CustomFieldOption represents an option for a fixed-value field.

Deprecated: This struct should no longer be used. IncidentCustomFieldOption is similar but not identical.

type CustomFieldOptionData deprecated

type CustomFieldOptionData struct {
	DataType CustomFieldDataType `json:"datatype,omitempty"`
	Value    interface{}         `json:"value,omitempty"`
}

CustomFieldOptionData represents the value of a CustomFieldOption

Deprecated: This struct should no longer be used. IncidentCustomFieldOptionData is similar but not identical.

type CustomFieldOptionPayload deprecated

type CustomFieldOptionPayload struct {
	FieldOption *CustomFieldOption `json:"field_option,omitempty"`
}

CustomFieldOptionPayload represents payload with a field option object

Deprecated: This struct should no longer be used.

type CustomFieldPayload deprecated

type CustomFieldPayload struct {
	Field *CustomField `json:"field,omitempty"`
}

CustomFieldPayload represents payload with a field object

Deprecated: This struct should no longer be used.

type CustomFieldSchema deprecated

type CustomFieldSchema struct {
	ID                  string                                 `json:"id,omitempty"`
	Title               string                                 `json:"title,omitempty"`
	Type                string                                 `json:"type,omitempty"`
	Description         *string                                `json:"description,omitempty"`
	FieldConfigurations []*CustomFieldSchemaFieldConfiguration `json:"field_configurations,omitempty"`
}

CustomFieldSchema represents a field schema.

Deprecated: This struct should no longer be used

type CustomFieldSchemaAssignment deprecated

type CustomFieldSchemaAssignment struct {
	ID      string                      `json:"id,omitempty"`
	Type    string                      `json:"type,omitempty"`
	Service *ServiceReference           `json:"service,omitempty"`
	Schema  *CustomFieldSchemaReference `json:"schema,omitempty"`
}

CustomFieldSchemaAssignment represents a field schema assignment.

Deprecated: This struct should no longer be used

type CustomFieldSchemaAssignmentPayload deprecated

type CustomFieldSchemaAssignmentPayload struct {
	SchemaAssignment *CustomFieldSchemaAssignment `json:"schema_assignment,omitempty"`
}

Deprecated: This struct should no longer be used

type CustomFieldSchemaAssignmentService deprecated

type CustomFieldSchemaAssignmentService service

CustomFieldSchemaAssignmentService handles the communication with field schema assignment related methods of the PagerDuty API.

Deprecated: No current replacement

func (*CustomFieldSchemaAssignmentService) Create deprecated

Create creates a custom field schema assignment.

Deprecated: No current replacement

func (*CustomFieldSchemaAssignmentService) CreateContext deprecated

CreateContext creates a custom field schema assignment.

Deprecated: No current replacement

func (*CustomFieldSchemaAssignmentService) Delete deprecated

Delete removes a schema assignment

Deprecated: No current replacement

func (*CustomFieldSchemaAssignmentService) DeleteContext deprecated

DeleteContext removes a schema assignment

Deprecated: No current replacement

func (*CustomFieldSchemaAssignmentService) ListForSchema deprecated

ListForSchema returns a list of assignments or the passed schema id

Deprecated: No current replacement

func (*CustomFieldSchemaAssignmentService) ListForSchemaContext deprecated

ListForSchemaContext returns a list of assignments for the passed schema id

Deprecated: No current replacement

func (*CustomFieldSchemaAssignmentService) ListForService deprecated

ListForService returns a list of schema assignments for the passed service id.

Deprecated: No current replacement

func (*CustomFieldSchemaAssignmentService) ListForServiceContext deprecated

ListForServiceContext returns a list of schema assignments for the passed service id.

Deprecated: No current replacement

type CustomFieldSchemaFieldConfiguration deprecated

type CustomFieldSchemaFieldConfiguration struct {
	ID           string                   `json:"id,omitempty"`
	Type         string                   `json:"type,omitempty"`
	Required     bool                     `json:"required"`
	Field        *CustomField             `json:"field,omitempty"`
	DefaultValue *CustomFieldDefaultValue `json:"default_value,omitempty"`
}

CustomFieldSchemaFieldConfiguration represents a field configuration in a field schema.

Deprecated: This struct should no longer be used

type CustomFieldSchemaFieldConfigurationPayload deprecated

type CustomFieldSchemaFieldConfigurationPayload struct {
	FieldConfiguration *CustomFieldSchemaFieldConfiguration `json:"field_configuration,omitempty"`
}

Deprecated: This struct should no longer be used

type CustomFieldSchemaPayload deprecated

type CustomFieldSchemaPayload struct {
	Schema *CustomFieldSchema `json:"schema,omitempty"`
}

Deprecated: This struct should no longer be used

type CustomFieldSchemaReference

type CustomFieldSchemaReference resourceReference

CustomFieldSchemaReference represents a reference to a Custom Field schema

type CustomFieldSchemaService deprecated

type CustomFieldSchemaService service

CustomFieldSchemaService handles the communication with field schema related methods of the PagerDuty API.

Deprecated: No current replacement

func (*CustomFieldSchemaService) Create deprecated

Create creates a field schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) CreateContext deprecated

CreateContext creates a field schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) CreateFieldConfiguration deprecated

CreateFieldConfiguration creates a field configuration in a schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) CreateFieldConfigurationContext deprecated

CreateFieldConfigurationContext creates a field configuration in a schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) Delete deprecated

func (s *CustomFieldSchemaService) Delete(id string) (*Response, error)

Delete removes an existing field schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) DeleteContext deprecated

func (s *CustomFieldSchemaService) DeleteContext(_ context.Context, _ string) (*Response, error)

DeleteContext removes an existing field schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) DeleteFieldConfiguration deprecated

func (s *CustomFieldSchemaService) DeleteFieldConfiguration(schemaID string, configurationID string) (*Response, error)

DeleteFieldConfiguration deletes a field configuration for a schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) DeleteFieldConfigurationContext deprecated

func (s *CustomFieldSchemaService) DeleteFieldConfigurationContext(_ context.Context, _ string, _ string) (*Response, error)

DeleteFieldConfigurationContext deletes a field configuration for a schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) Get deprecated

Get gets a field schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) GetContext deprecated

GetContext gets a field schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) GetFieldConfiguration deprecated

GetFieldConfiguration gets a field configuration in a schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) GetFieldConfigurationContext deprecated

GetFieldConfigurationContext gets a field configuration in a schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) List deprecated

List lists existing field schemas. If a non-zero Limit is passed as an option, only a single page of results will be returned. Otherwise, the entire list of fields will be returned.

Deprecated: No current replacement

func (*CustomFieldSchemaService) ListContext deprecated

ListContext lists existing field schemas. If a non-zero Limit is passed as an option, only a single page of results will be returned. Otherwise, the entire list of fields will be returned.

Deprecated: No current replacement

func (*CustomFieldSchemaService) ListFieldConfigurations deprecated

ListFieldConfigurations lists field configurations for a schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) ListFieldConfigurationsContext deprecated

ListFieldConfigurationsContext lists field configurations for a schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) Update deprecated

Update updates a field schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) UpdateContext deprecated

UpdateContext updates a field schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) UpdateFieldConfiguration deprecated

func (s *CustomFieldSchemaService) UpdateFieldConfiguration(schemaID string, configurationID string, configuration *CustomFieldSchemaFieldConfiguration) (*CustomFieldSchemaFieldConfiguration, *Response, error)

UpdateFieldConfiguration updates a field configuration in a schema.

Deprecated: No current replacement

func (*CustomFieldSchemaService) UpdateFieldConfigurationContext deprecated

UpdateFieldConfigurationContext updates a field configuration in a schema.

Deprecated: No current replacement

type CustomFieldService deprecated

type CustomFieldService service

CustomFieldService handles the communication with field related methods of the PagerDuty API.

Deprecated: This service should no longer be used. IncidentCustomFieldService provides similar functionality.

func (*CustomFieldService) Create deprecated

func (s *CustomFieldService) Create(field *CustomField) (*CustomField, *Response, error)

Create creates a new custom field.

Deprecated: Use IncidentCustomFieldService.Create

func (*CustomFieldService) CreateContext deprecated

func (s *CustomFieldService) CreateContext(_ context.Context, _ *CustomField) (*CustomField, *Response, error)

CreateContext creates a new custom field.

Deprecated: Use IncidentCustomFieldService.CreateContext

func (*CustomFieldService) CreateFieldOption deprecated

func (s *CustomFieldService) CreateFieldOption(fieldID string, fieldOption *CustomFieldOption) (*CustomFieldOption, *Response, error)

CreateFieldOption creates a new field option.

Deprecated: Use IncidentCustomFieldService.CreateFieldOption

func (*CustomFieldService) CreateFieldOptionContext deprecated

func (s *CustomFieldService) CreateFieldOptionContext(_ context.Context, _ string, _ *CustomFieldOption) (*CustomFieldOption, *Response, error)

CreateFieldOptionContext creates a new field option.

Deprecated: Use IncidentCustomFieldService.CreateFieldOptionContext

func (*CustomFieldService) Delete deprecated

func (s *CustomFieldService) Delete(id string) (*Response, error)

Delete removes an existing custom field.

Deprecated: Use IncidentCustomFieldService.Delete

func (*CustomFieldService) DeleteContext deprecated

func (s *CustomFieldService) DeleteContext(_ context.Context, _ string) (*Response, error)

DeleteContext removes an existing custom field.

Deprecated: Use IncidentCustomFieldService.DeleteContext

func (*CustomFieldService) DeleteFieldOption deprecated

func (s *CustomFieldService) DeleteFieldOption(fieldID string, fieldOptionID string) (*Response, error)

DeleteFieldOption deletes an existing field option.

Deprecated: Use IncidentCustomFieldService.DeleteFieldOption

func (*CustomFieldService) DeleteFieldOptionContext deprecated

func (s *CustomFieldService) DeleteFieldOptionContext(_ context.Context, _ string, _ string) (*Response, error)

DeleteFieldOptionContext disables an existing field option.

Deprecated: Use IncidentCustomFieldService.DeleteFieldOptionContext

func (*CustomFieldService) Get deprecated

Get gets a custom field.

Deprecated: Use IncidentCustomFieldService.Get

func (*CustomFieldService) GetContext deprecated

GetContext gets a custom field.

Deprecated: Use IncidentCustomFieldService.GetContext

func (*CustomFieldService) GetFieldOption deprecated

func (s *CustomFieldService) GetFieldOption(fieldID string, fieldOptionID string) (*CustomFieldOption, *Response, error)

GetFieldOption gets a field option.

Deprecated: Use IncidentCustomFieldService.GetFieldOption

func (*CustomFieldService) GetFieldOptionContext deprecated

func (s *CustomFieldService) GetFieldOptionContext(_ context.Context, _ string, _ string) (*CustomFieldOption, *Response, error)

GetFieldOptionContext gets a field option.

Deprecated: Use IncidentCustomFieldService.GetFieldOptionContext

func (*CustomFieldService) List deprecated

List lists existing custom fields. If a non-zero Limit is passed as an option, only a single page of results will be returned. Otherwise, the entire list of fields will be returned.

Deprecated: Use IncidentCustomFieldService.List

func (*CustomFieldService) ListContext deprecated

ListContext lists existing custom fields. If a non-zero Limit is passed as an option, only a single page of results will be returned. Otherwise, the entire list of fields will be returned.

Deprecated: Use IncidentCustomFieldService.ListContext

func (*CustomFieldService) ListFieldOptions deprecated

func (s *CustomFieldService) ListFieldOptions(fieldID string) (*ListCustomFieldOptionsResponse, *Response, error)

ListFieldOptions lists the field options for a field.

Deprecated: Use IncidentCustomFieldService.ListFieldOptions

func (*CustomFieldService) ListFieldOptionsContext deprecated

func (s *CustomFieldService) ListFieldOptionsContext(_ context.Context, _ string) (*ListCustomFieldOptionsResponse, *Response, error)

ListFieldOptionsContext lists the field options for a field.

Deprecated: Use IncidentCustomFieldService.ListFieldOptionsContext

func (*CustomFieldService) Update deprecated

func (s *CustomFieldService) Update(id string, field *CustomField) (*CustomField, *Response, error)

Update updates an existing custom field.

Deprecated: Use IncidentCustomFieldService.Update

func (*CustomFieldService) UpdateContext deprecated

func (s *CustomFieldService) UpdateContext(_ context.Context, _ string, _ *CustomField) (*CustomField, *Response, error)

UpdateContext updates an existing custom field.

Deprecated: Use IncidentCustomFieldService.UpdateContext

func (*CustomFieldService) UpdateFieldOption deprecated

func (s *CustomFieldService) UpdateFieldOption(fieldID string, fieldOptionID string, fieldOption *CustomFieldOption) (*CustomFieldOption, *Response, error)

UpdateFieldOption updates an existing field option.

Deprecated: Use IncidentCustomFieldService.UpdateFieldOption

func (*CustomFieldService) UpdateFieldOptionContext deprecated

func (s *CustomFieldService) UpdateFieldOptionContext(_ context.Context, _ string, _ string, _ *CustomFieldOption) (*CustomFieldOption, *Response, error)

UpdateFieldOptionContext updates an existing field option.

Deprecated: Use IncidentCustomFieldService.UpdateFieldOptionContext

type CustomHeaders

type CustomHeaders struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

type DeliveryMethod

type DeliveryMethod struct {
	TemporarilyDisabled bool             `json:"temporarily_disabled,omitempty"`
	Type                string           `json:"type,omitempty"`
	URL                 string           `json:"url,omitempty"`
	CustomHeaders       []*CustomHeaders `json:"custom_headers"`
	Secret              string           `json:"secret,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"`
	RequiredScopes string      `json:"required_scopes,omitempty"`
	TokenScopes    string      `json:"token_scopes,omitempty"`
	// contains filtered or unexported fields
}

Error represents an error response from the PagerDuty API.

func (*Error) Error

func (e *Error) Error() string

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

Get retrieves information about an escalation policy.

func (*EscalationPolicyService) List

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"`
	EscalationRuleAssignmentStrategy *EscalationRuleAssignmentStrategy `json:"escalation_rule_assignment_strategy,omitempty"`
	ID                               string                            `json:"id,omitempty"`
	Targets                          []*EscalationTargetReference      `json:"targets,omitempty"`
}

EscalationRule represents an escalation rule.

type EscalationRuleAssignmentStrategy

type EscalationRuleAssignmentStrategy struct {
	Type string `json:"type,omitempty"`
}

EscalationRuleAssignmentStrategy represents an Escalation rule assignment strategy

type EscalationTargetReference

type EscalationTargetReference resourceReference

EscalationTargetReference represents a reference to an escalation target

type EventOrchestration

type EventOrchestration struct {
	ID           string                           `json:"id,omitempty"`
	Name         string                           `json:"name,omitempty"`
	Description  string                           `json:"description"`
	Team         *EventOrchestrationObject        `json:"team"`
	Routes       int                              `json:"routes,omitempty"`
	Integrations []*EventOrchestrationIntegration `json:"integrations,omitempty"`
}

type EventOrchestrationCacheVariable

type EventOrchestrationCacheVariable struct {
	ID            string                                        `json:"id,omitempty"`
	Name          string                                        `json:"name,omitempty"`
	Disabled      bool                                          `json:"disabled"`
	Conditions    []*EventOrchestrationCacheVariableCondition   `json:"conditions"`
	Configuration *EventOrchestrationCacheVariableConfiguration `json:"configuration,omitempty"`
	CreatedAt     string                                        `json:"created_at,omitempty"`
	CreatedBy     *UserReference                                `json:"created_by,omitempty"`
	UpdatedAt     string                                        `json:"updated_at,omitempty"`
	UpdatedBy     *UserReference                                `json:"updated_by,omitempty"`
}

type EventOrchestrationCacheVariableCondition

type EventOrchestrationCacheVariableCondition struct {
	// A PCL string: https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview
	Expression string `json:"expression,omitempty"`
}

type EventOrchestrationCacheVariableConfiguration

type EventOrchestrationCacheVariableConfiguration struct {
	Type       string `json:"type,omitempty"`
	Regex      string `json:"regex,omitempty"`
	Source     string `json:"source,omitempty"`
	TTLSeconds int    `json:"ttl_seconds,omitempty"`
}

Configuration for a cache variable changes depending on the type:

  • if `Type` is `recent_value`; then use `Regex` and `Source`
  • if `Type` is `trigger_event_count`; then use `TTLSeconds`

type EventOrchestrationCacheVariablePayload

type EventOrchestrationCacheVariablePayload struct {
	CacheVariable *EventOrchestrationCacheVariable `json:"cache_variable,omitempty"`
}

type EventOrchestrationCacheVariableService

type EventOrchestrationCacheVariableService service

func (*EventOrchestrationCacheVariableService) Create

func (*EventOrchestrationCacheVariableService) Delete

func (s *EventOrchestrationCacheVariableService) Delete(ctx context.Context, cacheVariableType string, orchestrationId string, cacheVariableId string) (*Response, error)

func (*EventOrchestrationCacheVariableService) Get

func (s *EventOrchestrationCacheVariableService) Get(ctx context.Context, cacheVariableType string, orchestrationId string, cacheVariableId string) (*EventOrchestrationCacheVariable, *Response, error)

func (*EventOrchestrationCacheVariableService) List

func (*EventOrchestrationCacheVariableService) Update

func (s *EventOrchestrationCacheVariableService) Update(ctx context.Context, cacheVariableType string, orchestrationId string, cacheVariableId string, cacheVariable *EventOrchestrationCacheVariable) (*EventOrchestrationCacheVariable, *Response, error)

type EventOrchestrationIntegration

type EventOrchestrationIntegration struct {
	ID         string                                   `json:"id,omitempty"`
	Label      string                                   `json:"label,omitempty"`
	Parameters *EventOrchestrationIntegrationParameters `json:"parameters,omitempty"`
}

type EventOrchestrationIntegrationMigrationPayload

type EventOrchestrationIntegrationMigrationPayload struct {
	SourceType    string `json:"source_type,omitempty"`
	SourceId      string `json:"source_id,omitempty"`
	IntegrationId string `json:"integration_id,omitempty"`
}

type EventOrchestrationIntegrationParameters

type EventOrchestrationIntegrationParameters struct {
	RoutingKey string `json:"routing_key,omitempty"`
	Type       string `json:"type,omitempty"`
}

type EventOrchestrationIntegrationPayload

type EventOrchestrationIntegrationPayload struct {
	Integration *EventOrchestrationIntegration `json:"integration,omitempty"`
}

type EventOrchestrationIntegrationService

type EventOrchestrationIntegrationService service

func (*EventOrchestrationIntegrationService) CreateContext

func (*EventOrchestrationIntegrationService) DeleteContext

func (s *EventOrchestrationIntegrationService) DeleteContext(ctx context.Context, orchestrationId string, id string) (*Response, error)

func (*EventOrchestrationIntegrationService) GetContext

func (*EventOrchestrationIntegrationService) ListContext

func (*EventOrchestrationIntegrationService) MigrateFromOrchestrationContext

func (s *EventOrchestrationIntegrationService) MigrateFromOrchestrationContext(ctx context.Context, destinationOrchestrationId string, sourceOrchestrationId string, id string) (*ListEventOrchestrationIntegrationsResponse, *Response, error)

func (*EventOrchestrationIntegrationService) UpdateContext

type EventOrchestrationObject

type EventOrchestrationObject struct {
	Type string  `json:"type,omitempty"`
	ID   *string `json:"id"`
}

type EventOrchestrationPath

type EventOrchestrationPath struct {
	Type      string                           `json:"type,omitempty"`
	Self      string                           `json:"self,omitempty"`
	Parent    *EventOrchestrationPathReference `json:"parent,omitempty"`
	Sets      []*EventOrchestrationPathSet     `json:"sets,omitempty"`
	CatchAll  *EventOrchestrationPathCatchAll  `json:"catch_all,omitempty"`
	CreatedAt string                           `json:"created_at,omitempty"`
	CreatedBy *EventOrchestrationPathReference `json:"created_by,omitempty"`
	UpdatedAt string                           `json:"updated_at,omitempty"`
	UpdatedBy *EventOrchestrationPathReference `json:"updated_by,omitempty"`
	Version   string                           `json:"version,omitempty"`
}

type EventOrchestrationPathActionExtractions

type EventOrchestrationPathActionExtractions struct {
	Target   string `json:"target,omitempty"`
	Regex    string `json:"regex,omitempty"`
	Template string `json:"template,omitempty"`
	Source   string `json:"source,omitempty"`
}

type EventOrchestrationPathActionVariables

type EventOrchestrationPathActionVariables struct {
	Name  string `json:"name,omitempty"`
	Path  string `json:"path,omitempty"`
	Type  string `json:"type,omitempty"`
	Value string `json:"value,omitempty"`
}

type EventOrchestrationPathAutomationAction

type EventOrchestrationPathAutomationAction struct {
	Name       string                                          `json:"name,omitempty"`
	Url        string                                          `json:"url,omitempty"`
	AutoSend   bool                                            `json:"auto_send,omitempty"`
	Headers    []*EventOrchestrationPathAutomationActionObject `json:"headers"`
	Parameters []*EventOrchestrationPathAutomationActionObject `json:"parameters"`
}

type EventOrchestrationPathAutomationActionObject

type EventOrchestrationPathAutomationActionObject struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type EventOrchestrationPathCatchAll

type EventOrchestrationPathCatchAll struct {
	Actions *EventOrchestrationPathRuleActions `json:"actions,omitempty"`
}

type EventOrchestrationPathIncidentCustomFieldUpdate

type EventOrchestrationPathIncidentCustomFieldUpdate struct {
	ID    string `json:"id,omitempty"`
	Value string `json:"value,omitempty"`
}

type EventOrchestrationPathPagerdutyAutomationAction

type EventOrchestrationPathPagerdutyAutomationAction struct {
	ActionId string `json:"action_id,omitempty"`
}

type EventOrchestrationPathPayload

type EventOrchestrationPathPayload struct {
	OrchestrationPath *EventOrchestrationPath          `json:"orchestration_path,omitempty"`
	Warnings          []*EventOrchestrationPathWarning `json:"warnings"`
}

type EventOrchestrationPathReference

type EventOrchestrationPathReference struct {
	ID   string `json:"id,omitempty"`
	Type string `json:"type,omitempty"`
	Self string `json:"self,omitempty"`
}

A reference to a related object (e.g. an EventOrchestration, User, Team, etc)

type EventOrchestrationPathRule

type EventOrchestrationPathRule struct {
	ID         string                                 `json:"id,omitempty"`
	Label      string                                 `json:"label,omitempty"`
	Conditions []*EventOrchestrationPathRuleCondition `json:"conditions"`
	Actions    *EventOrchestrationPathRuleActions     `json:"actions,omitempty"`
	Disabled   bool                                   `json:"disabled"`
}

type EventOrchestrationPathRuleActions

type EventOrchestrationPathRuleActions struct {
	DropEvent                  bool                                               `json:"drop_event"`
	RouteTo                    string                                             `json:"route_to"`
	Suppress                   bool                                               `json:"suppress"`
	Suspend                    *int                                               `json:"suspend"`
	Priority                   string                                             `json:"priority"`
	Annotate                   string                                             `json:"annotate"`
	PagerdutyAutomationActions []*EventOrchestrationPathPagerdutyAutomationAction `json:"pagerduty_automation_actions"`
	AutomationActions          []*EventOrchestrationPathAutomationAction          `json:"automation_actions"`
	IncidentCustomFieldUpdates []*EventOrchestrationPathIncidentCustomFieldUpdate `json:"incident_custom_field_updates"`
	Severity                   string                                             `json:"severity"`
	EventAction                string                                             `json:"event_action"`
	Variables                  []*EventOrchestrationPathActionVariables           `json:"variables"`
	Extractions                []*EventOrchestrationPathActionExtractions         `json:"extractions"`
}

See the full list of supported actions for path types: Global: https://developer.pagerduty.com/api-reference/28317f3c2bdfd-get-the-global-orchestration-for-an-event-orchestration Router: https://developer.pagerduty.com/api-reference/f0fae270c70b3-get-the-router-for-a-global-event-orchestration Service: https://developer.pagerduty.com/api-reference/179537b835e2d-get-the-service-orchestration-for-a-service Unrouted: https://developer.pagerduty.com/api-reference/70aa1139e1013-get-the-unrouted-orchestration-for-a-global-event-orchestration

type EventOrchestrationPathRuleCondition

type EventOrchestrationPathRuleCondition struct {
	// A PCL string: https://developer.pagerduty.com/docs/ZG9jOjM1NTE0MDc0-pcl-overview
	Expression string `json:"expression,omitempty"`
}

type EventOrchestrationPathService

type EventOrchestrationPathService service

func (*EventOrchestrationPathService) Get

Get for EventOrchestrationPath

func (*EventOrchestrationPathService) GetContext

func (*EventOrchestrationPathService) GetServiceActiveStatusContext

GetServiceActiveStatus for EventOrchestrationPath

func (*EventOrchestrationPathService) Update

Update for EventOrchestrationPath

func (*EventOrchestrationPathService) UpdateContext

func (*EventOrchestrationPathService) UpdateServiceActiveStatusContext

func (s *EventOrchestrationPathService) UpdateServiceActiveStatusContext(ctx context.Context, id string, isActive bool) (*EventOrchestrationPathServiceActiveStatus, *Response, error)

UpdateServiceActiveStatus for EventOrchestrationPath

type EventOrchestrationPathServiceActiveStatus

type EventOrchestrationPathServiceActiveStatus struct {
	Active bool `json:"active"`
}

type EventOrchestrationPathSet

type EventOrchestrationPathSet struct {
	ID    string                        `json:"id,omitempty"`
	Rules []*EventOrchestrationPathRule `json:"rules"`
}

type EventOrchestrationPathWarning

type EventOrchestrationPathWarning struct {
	Feature     string `json:"feature"`
	FeatureType string `json:"feature_type"`
	Message     string `json:"message"`
	RuleId      string `json:"rule_id"`
	WarningType string `json:"warning_type"`
}

type EventOrchestrationPayload

type EventOrchestrationPayload struct {
	Orchestration *EventOrchestration `json:"orchestration,omitempty"`
}

type EventOrchestrationService

type EventOrchestrationService service

func (*EventOrchestrationService) Create

func (*EventOrchestrationService) Delete

func (s *EventOrchestrationService) Delete(ID string) (*Response, error)

func (*EventOrchestrationService) Get

func (*EventOrchestrationService) List

func (*EventOrchestrationService) Update

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

List lists existing event rules.

func (*EventRuleService) Update

func (s *EventRuleService) Update(id string, eventRule *EventRule) (*EventRule, *Response, error)

Update updates an existing event rule.

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

Get retrieves information about an extension schema.

func (*ExtensionSchemaService) List

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

List lists existing extensions.

func (*ExtensionService) Update

func (s *ExtensionService) Update(id string, extension *Extension) (*Extension, *Response, error)

Update updates an existing extension.

type Filter

type Filter struct {
	ID   string `json:"id,omitempty"`
	Type string `json:"type,omitempty"`
}

Filter represents a webhook subscription filter

type FullUser

type FullUser struct {
	AvatarURL      string `json:"avatar_url,omitempty"`
	Color          string `json:"color,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"`
	Role           string `json:"role,omitempty"`
	Self           string `json:"self,omitempty"`
	Summary        string `json:"summary,omitempty"`
	TimeZone       string `json:"time_zone,omitempty"`
	Type           string `json:"type,omitempty"`

	// User Associations fetched with `include[]` params
	ContactMethods    []*ContactMethod    `json:"contact_methods,omitempty"`
	NotificationRules []*NotificationRule `json:"notification_rules,omitempty"`
	Teams             []*Team             `json:"teams,omitempty"`
}

FullUser represents a user fetched with: `include[]=contact_methods,notification_rules`. This is only used when caching is enabled. Since licenses are not fetched with the `include[]` params, but instead require a new api route, they are not included in the FullUser struct.

type FullUserPayload

type FullUserPayload struct {
	User *FullUser `json:"user,omitempty"`
}

FullUserPayload represents a user.

type GetCustomFieldOptions deprecated

type GetCustomFieldOptions struct {
	Includes []string `url:"include,brackets,omitempty"`
}

GetCustomFieldOptions represents options when retrieving a field.

Deprecated: This struct should no longer be used.

type GetCustomFieldSchemaConfigurationsOptions deprecated

type GetCustomFieldSchemaConfigurationsOptions struct {
	Includes []string `url:"include,brackets,omitempty"`
}

GetCustomFieldSchemaConfigurationsOptions represents options when retrieving a field configuration for a schema

Deprecated: This struct should no longer be used

type GetCustomFieldSchemaOptions deprecated

type GetCustomFieldSchemaOptions struct {
	Includes []string `url:"include,brackets,omitempty"`
}

GetCustomFieldSchemaOptions represents options when retrieving a field schema

Deprecated: This struct should no longer be used

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 GetIncidentCustomFieldOptions

type GetIncidentCustomFieldOptions struct {
	Includes []string `url:"include,brackets,omitempty"`
}

GetIncidentCustomFieldOptions represents options when retrieving a field.

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 Incident

type Incident 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"`
	IncidentNumber       int                         `json:"incident_number,omitempty"`
	CreatedAt            string                      `json:"created_at,omitempty"`
	Status               string                      `json:"status,omitempty"`
	Title                string                      `json:"title,omitempty"`
	Resolution           string                      `json:"resolution,omitempty"`
	AlertCounts          *AlertCounts                `json:"alert_counts,omitempty"`
	PendingActions       []*PendingAction            `json:"pending_actions,omitempty"`
	IncidentKey          string                      `json:"incident_key,omitempty"`
	Service              *ServiceReference           `json:"service,omitempty"`
	AssignedVia          string                      `json:"assigned_via,omitempty"`
	Assignments          []*IncidentAssignment       `json:"assignments,omitempty"`
	Acknowledgements     []*IncidentAcknowledgement  `json:"acknowledgements,omitempty"`
	LastStatusChangeAt   string                      `json:"last_status_change_at,omitempty"`
	LastStatusChangeBy   *IncidentAttributeReference `json:"last_status_change_by,omitempty"`
	FirstTriggerLogEntry *IncidentAttributeReference `json:"first_trigger_log_entry,omitempty"`
	EscalationPolicy     *EscalationPolicyReference  `json:"escalation_policy,omitempty"`
	Teams                []*TeamReference            `json:"teams,omitempty"`
	Urgency              string                      `json:"urgency,omitempty"`
}

Incident represents a incident.

type IncidentAcknowledgement

type IncidentAcknowledgement struct {
	At           string                     `json:"at"`
	Acknowledger IncidentAttributeReference `json:"acknowledger"`
}

type IncidentAssignment

type IncidentAssignment struct {
	At       string        `json:"at"`
	Assignee UserReference `json:"assignee"`
}

type IncidentAttributeReference

type IncidentAttributeReference resourceReference

IncidentAttributeReference represents a reference to a Incident Attribute schema

type IncidentCustomField

type IncidentCustomField struct {
	ID           string                       `json:"id,omitempty"`
	Name         string                       `json:"name,omitempty"`
	DisplayName  string                       `json:"display_name,omitempty"`
	Type         string                       `json:"type,omitempty"`
	Summary      string                       `json:"summary,omitempty"`
	Self         string                       `json:"self,omitempty"`
	DataType     IncidentCustomFieldDataType  `json:"data_type,omitempty"`
	FieldType    IncidentCustomFieldFieldType `json:"field_type,omitempty"`
	Description  *string                      `json:"description,omitempty"`
	DefaultValue interface{}                  `json:"default_value,omitempty"`
	FieldOptions []*IncidentCustomFieldOption `json:"field_options,omitempty"`
}

IncidentCustomField represents an incident custom field.

func (*IncidentCustomField) UnmarshalJSON

func (d *IncidentCustomField) UnmarshalJSON(data []byte) error

type IncidentCustomFieldDataType

type IncidentCustomFieldDataType int64

IncidentCustomFieldDataType is an enumeration of available datatypes for fields.

const (
	IncidentCustomFieldDataTypeUnknown IncidentCustomFieldDataType = iota
	IncidentCustomFieldDataTypeString
	IncidentCustomFieldDataTypeInt
	IncidentCustomFieldDataTypeFloat
	IncidentCustomFieldDataTypeBool
	IncidentCustomFieldDataTypeUrl
	IncidentCustomFieldDataTypeDateTime
)

func IncidentCustomFieldDataTypeFromString

func IncidentCustomFieldDataTypeFromString(s string) IncidentCustomFieldDataType

func (*IncidentCustomFieldDataType) IsKnown

func (d *IncidentCustomFieldDataType) IsKnown() bool

func (IncidentCustomFieldDataType) MarshalJSON

func (d IncidentCustomFieldDataType) MarshalJSON() ([]byte, error)

func (IncidentCustomFieldDataType) String

func (*IncidentCustomFieldDataType) UnmarshalJSON

func (d *IncidentCustomFieldDataType) UnmarshalJSON(data []byte) error

type IncidentCustomFieldFieldType

type IncidentCustomFieldFieldType int64

IncidentCustomFieldFieldType is an enumeration of available fieldtypes for fields.

const (
	IncidentCustomFieldFieldTypeUnknown IncidentCustomFieldFieldType = iota
	IncidentCustomFieldFieldTypeSingleValue
	IncidentCustomFieldFieldTypeSingleValueFixed
	IncidentCustomFieldFieldTypeMultiValue
	IncidentCustomFieldFieldTypeMultiValueFixed
)

func IncidentCustomFieldFieldTypeFromString

func IncidentCustomFieldFieldTypeFromString(s string) IncidentCustomFieldFieldType

func (*IncidentCustomFieldFieldType) IsKnown

func (d *IncidentCustomFieldFieldType) IsKnown() bool

func (*IncidentCustomFieldFieldType) IsMultiValue

func (d *IncidentCustomFieldFieldType) IsMultiValue() bool

func (IncidentCustomFieldFieldType) MarshalJSON

func (d IncidentCustomFieldFieldType) MarshalJSON() ([]byte, error)

func (IncidentCustomFieldFieldType) String

func (*IncidentCustomFieldFieldType) UnmarshalJSON

func (d *IncidentCustomFieldFieldType) UnmarshalJSON(data []byte) error

type IncidentCustomFieldOption

type IncidentCustomFieldOption struct {
	ID   string                         `json:"id,omitempty"`
	Type string                         `json:"type,omitempty"`
	Data *IncidentCustomFieldOptionData `json:"data,omitempty"`
}

IncidentCustomFieldOption represents an option for a fixed-value field.

type IncidentCustomFieldOptionData

type IncidentCustomFieldOptionData struct {
	DataType IncidentCustomFieldDataType `json:"data_type,omitempty"`
	Value    interface{}                 `json:"value,omitempty"`
}

IncidentCustomFieldOptionData represents the value of a IncidentCustomFieldOption

type IncidentCustomFieldOptionPayload

type IncidentCustomFieldOptionPayload struct {
	FieldOption *IncidentCustomFieldOption `json:"field_option,omitempty"`
}

IncidentCustomFieldOptionPayload represents payload with a field option object

type IncidentCustomFieldPayload

type IncidentCustomFieldPayload struct {
	Field *IncidentCustomField `json:"field,omitempty"`
}

IncidentCustomFieldPayload represents payload with a field object

type IncidentCustomFieldService

type IncidentCustomFieldService service

IncidentCustomFieldService handles the communication with custom field on incidents related methods of the PagerDuty API.

func (*IncidentCustomFieldService) CreateContext

CreateContext creates a new custom field.

func (*IncidentCustomFieldService) CreateFieldOptionContext

func (s *IncidentCustomFieldService) CreateFieldOptionContext(ctx context.Context, fieldID string, fieldOption *IncidentCustomFieldOption) (*IncidentCustomFieldOption, *Response, error)

CreateFieldOptionContext creates a new field option.

func (*IncidentCustomFieldService) DeleteContext

func (s *IncidentCustomFieldService) DeleteContext(ctx context.Context, id string) (*Response, error)

DeleteContext removes an existing custom field.

func (*IncidentCustomFieldService) DeleteFieldOptionContext

func (s *IncidentCustomFieldService) DeleteFieldOptionContext(ctx context.Context, fieldID string, fieldOptionID string) (*Response, error)

DeleteFieldOptionContext disables an existing field option.

func (*IncidentCustomFieldService) GetContext

GetContext gets a custom field.

func (*IncidentCustomFieldService) GetFieldOptionContext

func (s *IncidentCustomFieldService) GetFieldOptionContext(ctx context.Context, fieldID string, fieldOptionID string) (*IncidentCustomFieldOption, *Response, error)

GetFieldOptionContext gets a field option.

func (*IncidentCustomFieldService) ListContext

ListContext lists existing custom fields. If a non-zero Limit is passed as an option, only a single page of results will be returned. Otherwise, the entire list of fields will be returned.

func (*IncidentCustomFieldService) ListFieldOptionsContext

ListFieldOptionsContext lists the field options for a field.

func (*IncidentCustomFieldService) UpdateContext

UpdateContext updates an existing custom field.

func (*IncidentCustomFieldService) UpdateFieldOptionContext

func (s *IncidentCustomFieldService) UpdateFieldOptionContext(ctx context.Context, fieldID string, fieldOptionID string, fieldOption *IncidentCustomFieldOption) (*IncidentCustomFieldOption, *Response, error)

UpdateFieldOptionContext updates an existing field option.

type IncidentPayload

type IncidentPayload struct {
	Incident *Incident `json:"incident,omitempty"`
}

IncidentPayload represents an incident.

type IncidentService

type IncidentService service

IncidentService handles the communication with incident related methods of the PagerDuty API.

func (*IncidentService) Create

func (s *IncidentService) Create(incident *Incident) (*Incident, *Response, error)

Create an incident

func (*IncidentService) Get

func (s *IncidentService) Get(id string) (*Incident, *Response, error)

Get retrieves information about an incident.

func (*IncidentService) List

List lists existing incidents.

func (*IncidentService) ListAll

func (s *IncidentService) ListAll(o *ListIncidentsOptions) ([]*Incident, error)

ListAll lists all result pages for incidents list.

func (*IncidentService) ManageIncidents

func (s *IncidentService) ManageIncidents(incidents []*Incident, o *ManageIncidentsOptions) (*ManageIncidentsResponse, *Response, error)

ManageIncidents updates existing incidents.

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 IncidentWorkflow

type IncidentWorkflow struct {
	ID          string                  `json:"id,omitempty"`
	Type        string                  `json:"type,omitempty"`
	Name        string                  `json:"name,omitempty"`
	Description *string                 `json:"description,omitempty"`
	Self        string                  `json:"self,omitempty"`
	Steps       []*IncidentWorkflowStep `json:"steps,omitempty"`
	Team        *TeamReference          `json:"team,omitempty"`
}

IncidentWorkflow represents an incident workflow.

type IncidentWorkflowActionConfiguration

type IncidentWorkflowActionConfiguration struct {
	ActionID          string                                    `json:"action_id,omitempty"`
	Description       *string                                   `json:"description,omitempty"`
	Inputs            []*IncidentWorkflowActionInput            `json:"inputs,omitempty"`
	InlineStepsInputs []*IncidentWorkflowActionInlineStepsInput `json:"inline_steps_inputs,omitempty"`
}

IncidentWorkflowActionConfiguration represents the configuration for an incident workflow action

type IncidentWorkflowActionInlineStep

type IncidentWorkflowActionInlineStep struct {
	Name          string                               `json:"name,omitempty"`
	Configuration *IncidentWorkflowActionConfiguration `json:"action_configuration,omitempty"`
}

IncidentWorkflowActionInlineStep represents a single step within an inline_steps_input input's value

type IncidentWorkflowActionInlineStepsInput

type IncidentWorkflowActionInlineStepsInput struct {
	Name  string                                       `json:"name,omitempty"`
	Value *IncidentWorkflowActionInlineStepsInputValue `json:"value,omitempty"`
}

IncidentWorkflowActionInlineStepsInput represents the configuration for an incident workflow action input with a series of inlined steps as the value

type IncidentWorkflowActionInlineStepsInputValue

type IncidentWorkflowActionInlineStepsInputValue struct {
	Steps []*IncidentWorkflowActionInlineStep `json:"steps,omitempty"`
}

IncidentWorkflowActionInlineStepsInputValue represents the value for an inline_steps_input input

type IncidentWorkflowActionInput

type IncidentWorkflowActionInput struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

IncidentWorkflowActionInput represents the configuration for an incident workflow action input with a serialized string as the value

type IncidentWorkflowPayload

type IncidentWorkflowPayload struct {
	IncidentWorkflow *IncidentWorkflow `json:"incident_workflow,omitempty"`
}

IncidentWorkflowPayload represents payload with an incident workflow object.

type IncidentWorkflowService

type IncidentWorkflowService service

IncidentWorkflowService handles the communication with incident workflow related methods of the PagerDuty API.

func (*IncidentWorkflowService) Create

Create creates a new incident workflow.

func (*IncidentWorkflowService) CreateContext

CreateContext creates a new incident workflow.

func (*IncidentWorkflowService) Delete

func (s *IncidentWorkflowService) Delete(id string) (*Response, error)

Delete removes an existing incident workflow.

func (*IncidentWorkflowService) DeleteContext

func (s *IncidentWorkflowService) DeleteContext(ctx context.Context, id string) (*Response, error)

DeleteContext removes an existing incident workflow.

func (*IncidentWorkflowService) Get

Get gets an incident workflow.

func (*IncidentWorkflowService) GetContext

GetContext gets an incident workflow.

func (*IncidentWorkflowService) List

List lists existing incident workflows. If a non-zero Limit is passed as an option, only a single page of results will be returned. Otherwise, the entire list of incident workflows will be returned.

func (*IncidentWorkflowService) ListContext

ListContext lists existing incident workflows. If a non-zero Limit is passed as an option, only a single page of results will be returned. Otherwise, the entire list of incident workflows will be returned.

func (*IncidentWorkflowService) Update

Update updates an existing incident workflow.

func (*IncidentWorkflowService) UpdateContext

UpdateContext updates an existing incident workflow.

type IncidentWorkflowStep

type IncidentWorkflowStep struct {
	ID            string                               `json:"id,omitempty"`
	Type          string                               `json:"type,omitempty"`
	Name          string                               `json:"name,omitempty"`
	Description   *string                              `json:"description,omitempty"`
	Configuration *IncidentWorkflowActionConfiguration `json:"action_configuration,omitempty"`
}

IncidentWorkflowStep represents a step in an incident workflow.

type IncidentWorkflowTrigger

type IncidentWorkflowTrigger struct {
	ID                      string                      `json:"id,omitempty"`
	Type                    string                      `json:"type,omitempty"`
	TriggerType             IncidentWorkflowTriggerType `json:"trigger_type,omitempty"`
	Workflow                *IncidentWorkflow           `json:"workflow,omitempty"`
	Services                []*ServiceReference         `json:"services,omitempty"`
	Condition               *string                     `json:"condition,omitempty"`
	SubscribedToAllServices bool                        `json:"is_subscribed_to_all_services,omitempty"`
}

IncidentWorkflowTrigger represents an incident workflow.

type IncidentWorkflowTriggerPayload

type IncidentWorkflowTriggerPayload struct {
	Trigger *IncidentWorkflowTrigger `json:"trigger,omitempty"`
}

IncidentWorkflowTriggerPayload represents payload with an incident workflow trigger object.

type IncidentWorkflowTriggerService

type IncidentWorkflowTriggerService service

IncidentWorkflowTriggerService handles the communication with incident workflow trigger related methods of the PagerDuty API.

func (*IncidentWorkflowTriggerService) Create

Create creates a new incident workflow trigger.

func (*IncidentWorkflowTriggerService) CreateContext

CreateContext creates a new incident workflow trigger.

func (*IncidentWorkflowTriggerService) Delete

Delete removes an existing incident workflow trigger.

func (*IncidentWorkflowTriggerService) DeleteContext

func (s *IncidentWorkflowTriggerService) DeleteContext(ctx context.Context, id string) (*Response, error)

DeleteContext removes an existing incident workflow trigger.

func (*IncidentWorkflowTriggerService) Get

Get gets an incident workflow trigger.

func (*IncidentWorkflowTriggerService) GetContext

GetContext gets an incident workflow trigger.

func (*IncidentWorkflowTriggerService) List

List lists existing incident workflow triggers. If a non-zero Limit is passed as an option, only a single page of results will be returned. Otherwise, the entire list of incident workflows will be returned.

func (*IncidentWorkflowTriggerService) ListContext

ListContext lists existing incident workflow triggers. If a non-zero Limit is passed as an option, only a single page of results will be returned. Otherwise, the entire list of incident workflows will be returned.

func (*IncidentWorkflowTriggerService) Update

Update updates an existing incident workflow trigger.

func (*IncidentWorkflowTriggerService) UpdateContext

UpdateContext updates an existing incident workflow trigger.

type IncidentWorkflowTriggerType

type IncidentWorkflowTriggerType int64

IncidentWorkflowTriggerType is an enumeration of available types for incident workflow triggers.

const (
	IncidentWorkflowTriggerTypeUnknown IncidentWorkflowTriggerType = iota
	IncidentWorkflowTriggerTypeManual
	IncidentWorkflowTriggerTypeConditional
)

func IncidentWorkflowTriggerTypeFromString

func IncidentWorkflowTriggerTypeFromString(s string) IncidentWorkflowTriggerType

func (*IncidentWorkflowTriggerType) IsKnown

func (t *IncidentWorkflowTriggerType) IsKnown() bool

func (IncidentWorkflowTriggerType) MarshalJSON

func (t IncidentWorkflowTriggerType) MarshalJSON() ([]byte, error)

func (IncidentWorkflowTriggerType) String

func (*IncidentWorkflowTriggerType) UnmarshalJSON

func (t *IncidentWorkflowTriggerType) UnmarshalJSON(data []byte) error

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 License

type License struct {
	ID          string   `json:"id,omitempty"`
	Type        string   `json:"type,omitempty"`
	Name        string   `json:"name,omitempty"`
	Summary     string   `json:"summary,omitempty"`
	Description string   `json:"description,omitempty"`
	RoleGroup   string   `json:"role_group,omitempty"`
	ValidRoles  []string `json:"valid_roles,omitempty"`

	// The following values may be set to null or unset, so their types are
	// pointers to better translate these conditions rather than defaulting
	// to 0 or ""
	HTMLURL              *string `json:"html_url,omitempty"`
	Self                 *string `json:"self,omitempty"`
	AllocationsAvailable *int    `json:"allocations_available,omitempty"`
	CurrentValue         *int    `json:"current_value,omitempty"`
}

License represents a License

type LicenseAllocation

type LicenseAllocation struct {
	License     *License       `json:"license,omitempty"`
	User        *UserReference `json:"user,omitempty"`
	AllocatedAt string         `json:"allocated_at,omitempty"`
}

LicenseAllocation represents a LicenseAllocation

type LicensePayload

type LicensePayload struct {
	License *License `json:"license,omitempty"`
}

LicensePayload represents a license.

type LicenseReference

type LicenseReference resourceReference

LicenseReference represents a reference to a team.

type LicenseService

type LicenseService service

LicenseService handles the communication with license related methods of the PagerDuty API.

func (*LicenseService) List

func (s *LicenseService) List() ([]*License, *Response, error)

List lists existing Licenses.

func (*LicenseService) ListAllAllocations

func (s *LicenseService) ListAllAllocations(o *ListLicenseAllocationsOptions) ([]*LicenseAllocation, error)

ListAllAllocations lists all existing LicenseAllocations for an Account.

func (*LicenseService) ListAllocations

ListAllocations lists existing LicenseAllocations.

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 ListCustomFieldOptions deprecated

type ListCustomFieldOptions struct {
	Offset   int      `url:"offset,omitempty"`
	Limit    int      `url:"limit,omitempty"`
	Total    bool     `url:"total,omitempty"`
	Includes []string `url:"include,brackets,omitempty"`
}

ListCustomFieldOptions represents options when retrieving a list of fields.

Deprecated: This struct should no longer be used.

type ListCustomFieldOptionsResponse deprecated

type ListCustomFieldOptionsResponse struct {
	FieldOptions []*CustomFieldOption `json:"field_options,omitempty"`
}

ListCustomFieldOptionsResponse represents a list response of field options

Deprecated: This struct should no longer be used.

type ListCustomFieldResponse deprecated

type ListCustomFieldResponse struct {
	Total  int            `json:"total,omitempty"`
	Fields []*CustomField `json:"fields,omitempty"`
	Offset int            `json:"offset,omitempty"`
	More   bool           `json:"more,omitempty"`
	Limit  int            `json:"limit,omitempty"`
}

ListCustomFieldResponse represents a list response of fields

Deprecated: This struct should no longer be used.

type ListCustomFieldSchemaAssignmentsOptions deprecated

type ListCustomFieldSchemaAssignmentsOptions struct {
	Offset int  `url:"offset,omitempty"`
	Limit  int  `url:"limit,omitempty"`
	Total  bool `url:"total,omitempty"`
}

ListCustomFieldSchemaAssignmentsOptions represents options when retrieving a list of fields schema assignments.

Deprecated: No current replacement

type ListCustomFieldSchemaAssignmentsResponse deprecated

type ListCustomFieldSchemaAssignmentsResponse struct {
	Total             int                            `json:"total,omitempty"`
	SchemaAssignments []*CustomFieldSchemaAssignment `json:"schema_assignments,omitempty"`
	Offset            int                            `json:"offset,omitempty"`
	More              bool                           `json:"more,omitempty"`
	Limit             int                            `json:"limit,omitempty"`
}

ListCustomFieldSchemaAssignmentsResponse represents a list response of resources assigned to field schemas.

Deprecated: No current replacement

type ListCustomFieldSchemaConfigurationsOptions deprecated

type ListCustomFieldSchemaConfigurationsOptions struct {
	Includes []string `url:"include,brackets,omitempty"`
}

ListCustomFieldSchemaConfigurationsOptions represents options when retrieving a list of field schemas.

Deprecated: This struct should no longer be used

type ListCustomFieldSchemaFieldConfigurationsResponse deprecated

type ListCustomFieldSchemaFieldConfigurationsResponse struct {
	FieldConfigurations []*CustomFieldSchemaFieldConfiguration `json:"field_configurations,omitempty"`
}

ListCustomFieldSchemaFieldConfigurationsResponse represents a list response of field configurations for a schema

Deprecated: This struct should no longer be used

type ListCustomFieldSchemaOptions deprecated

type ListCustomFieldSchemaOptions struct {
	Offset int  `url:"offset,omitempty"`
	Limit  int  `url:"limit,omitempty"`
	Total  bool `url:"total,omitempty"`
}

ListCustomFieldSchemaOptions represents options when retrieving a list of field schemas.

Deprecated: This struct should no longer be used

type ListCustomFieldSchemaResponse

type ListCustomFieldSchemaResponse struct {
	Total   int                  `json:"total,omitempty"`
	Schemas []*CustomFieldSchema `json:"schemas,omitempty"`
	Offset  int                  `json:"offset,omitempty"`
	More    bool                 `json:"more,omitempty"`
	Limit   int                  `json:"limit,omitempty"`
}

ListCustomFieldSchemaResponse represents a list response of field schemas

Deprecated

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 ListEventOrchestrationCacheVariablesResponse

type ListEventOrchestrationCacheVariablesResponse struct {
	Total          int                                `json:"total,omitempty"`
	CacheVariables []*EventOrchestrationCacheVariable `json:"cache_variables,omitempty"`
}

type ListEventOrchestrationIntegrationsResponse

type ListEventOrchestrationIntegrationsResponse struct {
	Total        int                              `json:"total,omitempty"`
	Integrations []*EventOrchestrationIntegration `json:"integrations,omitempty"`
}

type ListEventOrchestrationsResponse

type ListEventOrchestrationsResponse struct {
	Total          int                   `json:"total,omitempty"`
	Offset         int                   `json:"offset,omitempty"`
	More           bool                  `json:"more,omitempty"`
	Limit          int                   `json:"limit,omitempty"`
	Orchestrations []*EventOrchestration `json:"orchestrations,omitempty"`
}

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 ListIncidentCustomFieldOptions

type ListIncidentCustomFieldOptions struct {
	Includes []string `url:"include,brackets,omitempty"`
}

ListIncidentCustomFieldOptions represents options when retrieving a list of fields.

type ListIncidentCustomFieldOptionsResponse

type ListIncidentCustomFieldOptionsResponse struct {
	FieldOptions []*IncidentCustomFieldOption `json:"field_options,omitempty"`
}

ListIncidentCustomFieldOptionsResponse represents a list response of field options

type ListIncidentCustomFieldResponse

type ListIncidentCustomFieldResponse struct {
	Fields []*IncidentCustomField `json:"fields,omitempty"`
}

ListIncidentCustomFieldResponse represents a list response of fields

type ListIncidentWorkflowOptions

type ListIncidentWorkflowOptions struct {
	Offset   int      `url:"offset,omitempty"`
	Limit    int      `url:"limit,omitempty"`
	Total    bool     `url:"total,omitempty"`
	Includes []string `url:"include,brackets,omitempty"`
}

ListIncidentWorkflowOptions represents options when retrieving a list of incident workflows.

type ListIncidentWorkflowResponse

type ListIncidentWorkflowResponse struct {
	Total             int                 `json:"total,omitempty"`
	IncidentWorkflows []*IncidentWorkflow `json:"incident_workflows,omitempty"`
	Offset            int                 `json:"offset,omitempty"`
	More              bool                `json:"more,omitempty"`
	Limit             int                 `json:"limit,omitempty"`
}

ListIncidentWorkflowResponse represents a list response of incident workflows.

type ListIncidentWorkflowTriggerOptions

type ListIncidentWorkflowTriggerOptions struct {
	IncidentID  string                      `url:"incident_id,omitempty"`
	WorkflowID  string                      `url:"workflow_id,omitempty"`
	ServiceID   string                      `url:"service_id,omitempty"`
	TriggerType IncidentWorkflowTriggerType `url:"trigger_type,omitempty"`
	Limit       int                         `url:"limit,omitempty"`
	PageToken   string                      `url:"page_token,omitempty"`
}

ListIncidentWorkflowTriggerOptions represents options when retrieving a list of incident workflow triggers.

type ListIncidentWorkflowTriggerResponse

type ListIncidentWorkflowTriggerResponse struct {
	Triggers      []*IncidentWorkflowTrigger `json:"triggers,omitempty"`
	NextPageToken string                     `json:"next_page_token,omitempty"`
	Limit         int                        `json:"limit,omitempty"`
}

ListIncidentWorkflowTriggerResponse represents a list response of incident workflow triggers.

type ListIncidentsOptions

type ListIncidentsOptions struct {
	Limit       int      `url:"limit,omitempty"`
	Offset      int      `url:"offset,omitempty"`
	Total       int      `url:"total,omitempty"`
	DateRange   string   `url:"date_range,omitempty"`
	IncidentKey string   `url:"incident_key,omitempty"`
	Include     []string `url:"include,omitempty,brackets"`
	ServiceIDs  []string `url:"service_ids,omitempty,brackets"`
	Since       string   `url:"since,omitempty"`
	SortBy      []string `url:"sort_by,omitempty,brackets"`
	Statuses    []string `url:"statuses,omitempty,brackets"`
	TeamIDs     []string `url:"team_ids,omitempty,brackets"`
	TimeZone    string   `url:"time_zone,omitempty"`
	Until       string   `url:"until,omitempty"`
	Urgencies   []string `url:"urgencies,omitempty,brackets"`
	UserIDs     []string `url:"user_ids,omitempty,brackets"`
}

ListIncidentsOptions represents options when listing incidents.

type ListIncidentsResponse

type ListIncidentsResponse struct {
	Limit     int         `json:"limit,omitempty"`
	More      bool        `json:"more,omitempty"`
	Offset    int         `json:"offset,omitempty"`
	Total     int         `json:"total,omitempty"`
	Incidents []*Incident `json:"incidents,omitempty"`
}

ListIncidentsResponse represents a list response of incidents.

type ListLicenseAllocationsOptions

type ListLicenseAllocationsOptions struct {
	Limit  int  `url:"limit,omitempty"`
	More   bool `url:"more,omitempty"`
	Offset int  `url:"offset,omitempty"`
	Total  int  `url:"total,omitempty"`
}

ListLicenseAllocationsOptions represents options when listing license_allocations.

type ListLicenseAllocationsResponse

type ListLicenseAllocationsResponse struct {
	Limit              int                  `json:"limit,omitempty"`
	More               bool                 `json:"more,omitempty"`
	Offset             int                  `json:"offset,omitempty"`
	Total              int                  `json:"total,omitempty"`
	LicenseAllocations []*LicenseAllocation `json:"license_allocations,omitempty"`
}

ListLicenseAllocationsResponse represents a list response of license_allocations.

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 ListNotificationRulesResponse

type ListNotificationRulesResponse struct {
	NotificationRules []*NotificationRule `json:"notification_rules,omitempty"`
}

type ListOnCallOptions

type ListOnCallOptions struct {
	Limit               int      `url:"limit,omitempty"`
	Offset              int      `url:"offset,omitempty"`
	Total               bool     `url:"total,omitempty"`
	Earliest            bool     `url:"earliest,omitempty"`
	EscalationPolicyIds []string `url:"escalation_policy_ids,omitempty"`
	Includes            []string `url:"include,omitempty"`
	ScheduleIds         []string `url:"schedule_ids,omitempty"`
	UserIds             []string `url:"user_ids,brackets,omitempty"`
	Since               string   `url:"since,omitempty"`
	TimeZone            string   `url:"time_zone,omitempty"`
	Until               string   `url:"until,omitempty"`
}

ListOnCallOptions represents options when listing oncalls.

type ListOnCallResponse

type ListOnCallResponse struct {
	Oncalls []*OnCall `json:"oncalls,omitempty"`
	Limit   int       `json:"limit,omitempty"`
	More    bool      `json:"more,omitempty"`
	Offset  int       `json:"offset,omitempty"`
	Total   int       `json:"total,omitempty"`
}

ListOnCallResponse represents a list response of oncalls.

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 ListResponse

type ListResponse struct {
	Licenses []*License `json:"licenses,omitempty"`
}

ListLicensesResponse represents a list response of licenses.

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

Get retrieves information about a maintenance window.

func (*MaintenanceWindowService) List

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 ManageIncidentsOptions

type ManageIncidentsOptions struct {
	Limit  int `url:"limit,omitempty"`
	Offset int `url:"offset,omitempty"`
	Total  int `url:"total,omitempty"`
}

ManageIncidentsOptions represents options when listing incidents.

type ManageIncidentsPayload

type ManageIncidentsPayload struct {
	Incidents []*Incident `json:"incidents,omitempty"`
}

ManageIncidentsPayload represents a payload with a list of incidents data.

type ManageIncidentsResponse

type ManageIncidentsResponse ListIncidentsResponse

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 OnCall

type OnCall struct {
	User             *UserReference             `json:"user,omitempty"`
	Schedule         *ScheduleReference         `json:"schedule,omitemtpy"`
	EscalationPolicy *EscalationPolicyReference `json:"escalation_policy,omitempty"`
	EscalationLevel  int                        `json:"escalation_level"`
	Start            *string                    `json:"start"`
	End              *string                    `json:"end"`
}

OnCall represents an oncall.

type OnCallService

type OnCallService service

OnCallService handles the communication with team related methods of the PagerDuty API.

func (*OnCallService) List

List lists existing oncalls.

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 PendingAction

type PendingAction struct {
	At   string `json:"at"`
	Type string `json:"type"`
}

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

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

type RequestOptions struct {
	Type  string
	Label string
	Value string
}

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 Response

type Response struct {
	Response  *http.Response
	BodyBytes []byte
}

Response is a wrapper around http.Response

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 ResponsePlayReference

type ResponsePlayReference resourceReference

ResponsePlayReference represents a reference to a response play.

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

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"`
	Annotate    *RuleActionParameter    `json:"annotate"`
	Severity    *RuleActionParameter    `json:"severity"`
	Priority    *RuleActionParameter    `json:"priority"`
	Route       *RuleActionParameter    `json:"route"`
	EventAction *RuleActionParameter    `json:"event_action"`
	Extractions []*RuleActionExtraction `json:"extractions,omitempty"`
	Suspend     *RuleActionIntParameter `json:"suspend"`
}

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

type RuleVariableParameter struct {
	Value string `json:"value"`
	Path  string `json:"path"`
}

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

type RulesetObject struct {
	Type string `json:"type,omitempty"`
	ID   string `json:"id,omitempty"`
}

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

List lists existing rulesets.

func (*RulesetService) ListRules

func (s *RulesetService) ListRules(rulesetID string) (*ListRulesetRulesResponse, *Response, error)

ListRules Lists Event Rules for Ruleset

func (*RulesetService) Update

func (s *RulesetService) Update(ID string, ruleset *Ruleset) (*Ruleset, *Response, error)

Update updates an existing 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 should be nullable because if it's null, it means the layer does not end.
	End                        *string                 `json:"end"`
	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

Get retrieves information about a schedule.

func (*ScheduleService) List

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"`
	AutoPauseNotificationsParameters *AutoPauseNotificationsParameters `json:"auto_pause_notifications_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"`
	ResponsePlay                     *ResponsePlayReference            `json:"response_play"`
	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

type ServiceObj struct {
	ID   string `json:"id,omitempty"`
	Type string `json:"type,omitempty"`
}

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

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

List lists existing services.

func (*ServicesService) ListEventRules

ListEventRules lists existing service event rules.

func (*ServicesService) Update

func (s *ServicesService) Update(id string, service *Service) (*Service, *Response, error)

Update updates an existing service.

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

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

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"`
	DefaultRole string         `json:"default_role,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

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.

func (*TeamService) Update

func (s *TeamService) Update(id string, team *Team) (*Team, *Response, error)

Update updates an existing 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"`
	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"`
	Role           string `json:"role,omitempty"`
	Self           string `json:"self,omitempty"`
	Summary        string `json:"summary,omitempty"`
	TimeZone       string `json:"time_zone,omitempty"`
	Type           string `json:"type,omitempty"`

	// User Associations
	NotificationRules []*NotificationRule       `json:"notification_rules,omitempty"`
	Teams             []*TeamReference          `json:"teams,omitempty"`
	ContactMethods    []*ContactMethodReference `json:"contact_methods,omitempty"`
	License           *LicenseReference         `json:"license,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) GetLicense

func (s *UserService) GetLicense(id string) (*License, *Response, error)

GetLicense retrieves a users assigned License.

func (*UserService) GetNotificationRule

func (s *UserService) GetNotificationRule(userID string, ruleID string) (*NotificationRule, *Response, error)

GetNotificationRule retrieves a notification rule for a user.

func (*UserService) GetWithLicense

func (s *UserService) GetWithLicense(id string, o *GetUserOptions) (*User, error)

GetWithLicense retrieves information about a user and their assigned License. This function exists because the interface for GetLicense does not return a user's assigned account Role, which is required in order to manage licenses

func (*UserService) List

List lists existing users.

func (*UserService) ListAll

func (s *UserService) ListAll(o *ListUsersOptions) ([]*FullUser, error)

ListAll lists users into FullUser objects

func (*UserService) ListAllWithLicenses

func (s *UserService) ListAllWithLicenses(o *ListUsersOptions) ([]*User, error)

ListAllWithLicenses lists users into User objects with assigned licenses This function exists because licenses are not supported with the include[] API Param and so 2 API calls are required in order to fetch all of the users with their complete attributes including their assigned licenses. This API supports the include params for expanded references and also requires that the caller list all users since the users & license_allocations API's are not sorted in the same way.

func (*UserService) ListContactMethods

func (s *UserService) ListContactMethods(userID string) (*ListContactMethodsResponse, *Response, error)

ListContactMethods lists contact methods for a user.

func (*UserService) ListNotificationRules

func (s *UserService) ListNotificationRules(userID string) (*ListNotificationRulesResponse, *Response, error)

ListNotificationRules lists contact methods for a user.

func (*UserService) Update

func (s *UserService) Update(id string, user *User) (*User, *Response, error)

Update updates an existing 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

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

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

Get gets a webhook subscription.

func (*WebhookSubscriptionService) List

List lists existing webhook subscriptions.

func (*WebhookSubscriptionService) Update

Update updates a webhook subscription.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL