assignment

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 Assignment interface {
	Source
	Target
}

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

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

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 RawSource

type RawSource struct {
	Type SrcType
	ID   string
}

func NewRawSource

func NewRawSource(s Source) RawSource

func (RawSource) SourceID

func (rt RawSource) SourceID() string

func (RawSource) SourceType

func (rt RawSource) SourceType() SrcType

type RawTarget

type RawTarget struct {
	Type TargetType
	ID   string
	Name string `json:"-"`
}

func NewRawTarget

func NewRawTarget(t Target) RawTarget

func (RawTarget) TargetID

func (rt RawTarget) TargetID() string

func (RawTarget) TargetName

func (rt RawTarget) TargetName() string

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 Source

type Source interface {
	SourceType() SrcType
	SourceID() string
}

Source contains information about the source, or subject of an assignment.

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

func (SrcType) String

func (i SrcType) String() string

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) MarshalText added in v0.28.0

func (tt TargetType) MarshalText() ([]byte, error)

func (TargetType) String

func (i TargetType) String() string

func (*TargetType) UnmarshalGQL

func (tt *TargetType) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface

func (*TargetType) UnmarshalText added in v0.28.0

func (tt *TargetType) UnmarshalText(data []byte) error

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.

Jump to

Keyboard shortcuts

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