Documentation
¶
Index ¶
- type AlertSource
- type Assignment
- type CalendarSubscriptionTarget
- type ContactMethodTarget
- type EscalationPolicyStepSource
- type EscalationPolicyTarget
- type HeartbeatMonitorTarget
- type IntegrationKeyTarget
- type NotificationChannelTarget
- type NotificationPolicyTarget
- type NotificationRuleTarget
- type RawSource
- type RawTarget
- type RotationParticipantSource
- type RotationTarget
- type ScheduleRuleSource
- type ScheduleTarget
- type ServiceSource
- type ServiceTarget
- type Source
- type SrcType
- type Target
- type TargetNamer
- type TargetType
- type UserOverrideTarget
- type UserSessionTarget
- type UserSource
- type UserTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertSource ¶
type AlertSource int
AlertSource implements the Source interface by wrapping an Alert ID.
func (AlertSource) SourceID ¶
func (a AlertSource) SourceID() string
SourceID implements the Source interface.
func (AlertSource) SourceType ¶
func (AlertSource) SourceType() SrcType
SourceType implements the Source interface.
type Assignment ¶
type CalendarSubscriptionTarget ¶ added in v0.25.0
type CalendarSubscriptionTarget string
CalendarSubscriptionTarget implements the Target interface by wrapping a CalendarSubscription ID.
func (CalendarSubscriptionTarget) TargetID ¶ added in v0.25.0
func (k CalendarSubscriptionTarget) TargetID() string
TargetID implements the Target interface.
func (CalendarSubscriptionTarget) TargetType ¶ added in v0.25.0
func (CalendarSubscriptionTarget) TargetType() TargetType
TargetType implements the Target interface.
type ContactMethodTarget ¶
type ContactMethodTarget string
ContactMethodTarget implements the Target interface by wrapping a ContactMethod ID.
func (ContactMethodTarget) TargetID ¶
func (k ContactMethodTarget) TargetID() string
TargetID implements the Target interface.
func (ContactMethodTarget) TargetType ¶
func (ContactMethodTarget) TargetType() TargetType
TargetType implements the Target interface.
type EscalationPolicyStepSource ¶
type EscalationPolicyStepSource string
EscalationPolicyStepSource implements the Source interface by wrapping an EsclationPolicyStep ID.
func (EscalationPolicyStepSource) SourceID ¶
func (e EscalationPolicyStepSource) SourceID() string
SourceID implements the Source interface.
func (EscalationPolicyStepSource) SourceType ¶
func (EscalationPolicyStepSource) SourceType() SrcType
SourceType implements the Source interface.
type EscalationPolicyTarget ¶
type EscalationPolicyTarget string
EscalationPolicyTarget implements the Target interface by wrapping an EscalationPolicy ID.
func (EscalationPolicyTarget) TargetID ¶
func (e EscalationPolicyTarget) TargetID() string
TargetID implements the Target interface.
func (EscalationPolicyTarget) TargetType ¶
func (EscalationPolicyTarget) TargetType() TargetType
TargetType implements the Target interface.
type HeartbeatMonitorTarget ¶ added in v0.24.0
type HeartbeatMonitorTarget string
HeartbeatMonitorTarget implements the Target interface by wrapping a HeartbeatMonitor ID.
func (HeartbeatMonitorTarget) TargetID ¶ added in v0.24.0
func (k HeartbeatMonitorTarget) TargetID() string
TargetID implements the Target interface.
func (HeartbeatMonitorTarget) TargetType ¶ added in v0.24.0
func (HeartbeatMonitorTarget) TargetType() TargetType
TargetType implements the Target interface.
type IntegrationKeyTarget ¶
type IntegrationKeyTarget string
IntegrationKeyTarget implements the Target interface by wrapping an IntegrationKey ID.
func (IntegrationKeyTarget) TargetID ¶
func (k IntegrationKeyTarget) TargetID() string
TargetID implements the Target interface.
func (IntegrationKeyTarget) TargetType ¶
func (IntegrationKeyTarget) TargetType() TargetType
TargetType implements the Target interface.
type NotificationChannelTarget ¶
type NotificationChannelTarget string
NotificationChannelTarget implements the Target interface by wrapping a notification channel ID.
func (NotificationChannelTarget) TargetID ¶
func (nc NotificationChannelTarget) TargetID() string
TargetID implements the Target interface.
func (NotificationChannelTarget) TargetType ¶
func (NotificationChannelTarget) TargetType() TargetType
TargetType implements the Target interface.
type NotificationPolicyTarget ¶
type NotificationPolicyTarget string
NotificationPolicyTarget implements the Target interface by wrapping a NotificationPolicy ID.
func (NotificationPolicyTarget) TargetID ¶
func (n NotificationPolicyTarget) TargetID() string
TargetID implements the Target interface.
func (NotificationPolicyTarget) TargetType ¶
func (NotificationPolicyTarget) TargetType() TargetType
TargetType implements the Target interface.
type NotificationRuleTarget ¶
type NotificationRuleTarget string
NotificationRuleTarget implements the Target interface by wrapping an NotificationRule ID.
func (NotificationRuleTarget) TargetID ¶
func (k NotificationRuleTarget) TargetID() string
TargetID implements the Target interface.
func (NotificationRuleTarget) TargetType ¶
func (NotificationRuleTarget) TargetType() TargetType
TargetType implements the Target interface.
type RawTarget ¶
type RawTarget struct { Type TargetType `json:"target_type"` ID string `json:"target_id"` Name string `json:"target_name"` }
func NewRawTarget ¶
func (RawTarget) TargetName ¶
TargetName returns the name of the target. If unavailable, an empty string is returned.
func (RawTarget) TargetType ¶
func (rt RawTarget) TargetType() TargetType
type RotationParticipantSource ¶
type RotationParticipantSource string
RotationParticipantSource implements the Source interface by wrapping a RotationParticipant ID.
func (RotationParticipantSource) SourceID ¶
func (r RotationParticipantSource) SourceID() string
SourceID implements the Source interface.
func (RotationParticipantSource) SourceType ¶
func (RotationParticipantSource) SourceType() SrcType
SourceType implements the Source interface.
type RotationTarget ¶
type RotationTarget string
RotationTarget implements the Target interface by wrapping a Rotation ID.
func (RotationTarget) TargetID ¶
func (r RotationTarget) TargetID() string
TargetID implements the Target interface.
func (RotationTarget) TargetType ¶
func (RotationTarget) TargetType() TargetType
TargetType implements the Target interface.
type ScheduleRuleSource ¶
type ScheduleRuleSource string
ScheduleRuleSource implements the Source interface by wrapping a ScheduleRule ID.
func (ScheduleRuleSource) SourceID ¶
func (s ScheduleRuleSource) SourceID() string
SourceID implements the Source interface.
func (ScheduleRuleSource) SourceType ¶
func (ScheduleRuleSource) SourceType() SrcType
SourceType implements the Source interface.
type ScheduleTarget ¶
type ScheduleTarget string
ScheduleTarget implements the Target interface by wrapping a Schedule ID.
func (ScheduleTarget) TargetID ¶
func (s ScheduleTarget) TargetID() string
TargetID implements the Target interface.
func (ScheduleTarget) TargetType ¶
func (ScheduleTarget) TargetType() TargetType
TargetType implements the Target interface.
type ServiceSource ¶
type ServiceSource string
ServiceSource implements the Source interface by wrapping a Service ID.
func (ServiceSource) SourceID ¶
func (s ServiceSource) SourceID() string
SourceID implements the Source interface.
func (ServiceSource) SourceType ¶
func (ServiceSource) SourceType() SrcType
SourceType implements the Source interface.
type ServiceTarget ¶
type ServiceTarget string
ServiceTarget implements the Target interface by wrapping a Service ID.
func (ServiceTarget) TargetID ¶
func (s ServiceTarget) TargetID() string
TargetID implements the Target interface.
func (ServiceTarget) TargetType ¶
func (ServiceTarget) TargetType() TargetType
TargetType implements the Target interface.
type SrcType ¶
type SrcType int
SrcType represents the source-type of an assignment.
const ( SrcTypeUnspecified SrcType = iota SrcTypeAlert SrcTypeEscalationPolicyStep SrcTypeRotationParticipant SrcTypeScheduleRule SrcTypeService SrcTypeUser )
Available SrcTypes
func (SrcType) ParentType ¶
func (s SrcType) ParentType() TargetType
type Target ¶
type Target interface { TargetType() TargetType TargetID() string }
Target contains information about the target, or assignee of an assignment.
type TargetNamer ¶
type TargetNamer interface {
TargetName() string
}
TargetNamer allows getting the friendly name of a target. Note: TargetName may return an empty string if the name is unavailable.
type TargetType ¶
type TargetType int
TargetType represents the destination type of an assignment
const ( TargetTypeUnspecified TargetType = iota TargetTypeEscalationPolicy TargetTypeNotificationPolicy TargetTypeRotation TargetTypeService TargetTypeSchedule TargetTypeCalendarSubscription TargetTypeUser TargetTypeNotificationChannel TargetTypeSlackChannel TargetTypeIntegrationKey TargetTypeUserOverride TargetTypeNotificationRule TargetTypeContactMethod TargetTypeHeartbeatMonitor TargetTypeUserSession )
Assignment destination types
func (TargetType) MarshalGQL ¶
func (tt TargetType) MarshalGQL(w io.Writer)
MarshalGQL implements the graphql.Marshaler interface
func (TargetType) String ¶
func (i TargetType) String() string
func (*TargetType) UnmarshalGQL ¶
func (tt *TargetType) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements the graphql.Marshaler interface
type UserOverrideTarget ¶
type UserOverrideTarget string
UserOverrideTarget implements the Target interface by wrapping an UserOverride ID.
func (UserOverrideTarget) TargetID ¶
func (k UserOverrideTarget) TargetID() string
TargetID implements the Target interface.
func (UserOverrideTarget) TargetType ¶
func (UserOverrideTarget) TargetType() TargetType
TargetType implements the Target interface.
type UserSessionTarget ¶ added in v0.26.0
type UserSessionTarget string
UserSessionTarget implements the Target interface by wrapping a UserSession ID.
func (UserSessionTarget) TargetID ¶ added in v0.26.0
func (s UserSessionTarget) TargetID() string
TargetID implements the Target interface.
func (UserSessionTarget) TargetType ¶ added in v0.26.0
func (UserSessionTarget) TargetType() TargetType
TargetType implements the Target interface.
type UserSource ¶
type UserSource string
UserSource implements the Source interface by wrapping a UserSource ID.
func (UserSource) SourceID ¶
func (u UserSource) SourceID() string
SourceID implements the Source interface.
func (UserSource) SourceType ¶
func (UserSource) SourceType() SrcType
SourceType implements the Source interface.
type UserTarget ¶
type UserTarget string
UserTarget implements the Target interface by wrapping a User ID.
func (UserTarget) TargetID ¶
func (u UserTarget) TargetID() string
TargetID implements the Target interface.
func (UserTarget) TargetType ¶
func (UserTarget) TargetType() TargetType
TargetType implements the Target interface.