Documentation ¶
Index ¶
- Constants
- func Hour(hour uint32) *uint32
- func Minute(minute uint32) *uint32
- func ValidateConditions(conditions []Condition) error
- func ValidateCriteria(criteria Criteria) error
- func ValidateFilter(filter Filter) error
- func ValidateRestrictions(timeRestriction *TimeRestriction) error
- func ValidateRotations(rotations []Rotation) error
- type Condition
- type ConditionFieldType
- type ConditionMatchType
- type ConditionOperation
- type Contact
- type Criteria
- type Day
- type EscalationCondition
- type Filter
- type Identifier
- type MethodType
- type NotifyType
- type OwnerTeam
- type Participant
- type ParticipantType
- type Restriction
- type RestrictionType
- type Rotation
- type RotationType
- type SendAfter
- type Step
- type TimeRestriction
- type TimeUnit
Constants ¶
View Source
const ( Daily RotationType = "daily" Weekly RotationType = "weekly" Hourly RotationType = "hourly" User ParticipantType = "user" Team ParticipantType = "team" Escalation ParticipantType = "escalation" Schedule ParticipantType = "schedule" None ParticipantType = "none" Monday Day = "monday" Tuesday Day = "tuesday" Wednesday Day = "wednesday" Thursday Day = "thursday" Friday Day = "friday" Saturday Day = "saturday" Sunday Day = "sunday" TimeOfDay RestrictionType = "time-of-day" WeekdayAndTimeOfDay RestrictionType = "weekday-and-time-of-day" MatchAll ConditionMatchType = "match-all" MatchAnyCondition ConditionMatchType = "match-any-condition" MatchAllConditions ConditionMatchType = "match-all-conditions" Months TimeUnit = "months" Weeks TimeUnit = "weeks" Days TimeUnit = "days" Minutes TimeUnit = "minutes" Hours TimeUnit = "hours" Message ConditionFieldType = "message" Alias ConditionFieldType = "alias" Description ConditionFieldType = "description" Source ConditionFieldType = "source" Entity ConditionFieldType = "entity" Tags ConditionFieldType = "tags" Actions ConditionFieldType = "actions" Details ConditionFieldType = "details" ExtraProperties ConditionFieldType = "extra-properties" Recipients ConditionFieldType = "recipients" Teams ConditionFieldType = "teams" Priority ConditionFieldType = "priority" Matches ConditionOperation = "matches" Contains ConditionOperation = "contains" StartsWith ConditionOperation = "starts-with" EndsWith ConditionOperation = "ends-with" Equals ConditionOperation = "equals" ContainsKey ConditionOperation = "contains-key" ContainsValue ConditionOperation = "contains-value" GreaterThan ConditionOperation = "greater-than" LessThan ConditionOperation = "less-than" IsEmpty ConditionOperation = "is-empty" EqualsIgnoreWhitespcae ConditionOperation = "equals-ignore-whitespace" )
Variables ¶
This section is empty.
Functions ¶
func ValidateConditions ¶
func ValidateCriteria ¶
func ValidateFilter ¶
func ValidateRestrictions ¶
func ValidateRestrictions(timeRestriction *TimeRestriction) error
func ValidateRotations ¶
Types ¶
type Condition ¶
type Condition struct { Field ConditionFieldType `json:"field,omitempty"` IsNot *bool `json:"not,omitempty"` Operation ConditionOperation `json:"operation,omitempty"` ExpectedValue string `json:"expectedValue,omitempty"` Key string `json:"key,omitempty"` Order *int `json:"order,omitempty"` }
type ConditionFieldType ¶
type ConditionFieldType string
type ConditionMatchType ¶
type ConditionMatchType string
type ConditionOperation ¶
type ConditionOperation string
type Contact ¶
type Contact struct { To string `json:"to,omitempty"` MethodOfContact MethodType `json:"method,omitempty"` }
type Criteria ¶
type Criteria struct { CriteriaType ConditionMatchType `json:"type"` Conditions []Condition `json:"conditions,omitempty"` }
type EscalationCondition ¶
type EscalationCondition string
const ( IfNotAcked EscalationCondition = "if-not-acked" IfNotClosed EscalationCondition = "if-not-closed" )
type Filter ¶
type Filter struct { ConditionMatchType ConditionMatchType `json:"type,omitempty"` Conditions []Condition `json:"conditions,omitempty"` }
type Identifier ¶
type Identifier interface {
// contains filtered or unexported methods
}
type MethodType ¶
type MethodType string
const ( Sms MethodType = "sms" Email MethodType = "email" Voice MethodType = "voice" Mobile MethodType = "mobile" )
type NotifyType ¶
type NotifyType string
const ( Next NotifyType = "next" Previous NotifyType = "previous" Default NotifyType = "default" Users NotifyType = "users" Admins NotifyType = "admins" Random NotifyType = "random" All NotifyType = "all" )
type Participant ¶
type Participant struct { Type ParticipantType `json:"type, omitempty"` Name string `json:"name,omitempty"` Id string `json:"id,omitempty"` Username string `json:"username, omitempty"` }
type ParticipantType ¶
type ParticipantType string
type Restriction ¶
type RestrictionType ¶
type RestrictionType string
type Rotation ¶
type Rotation struct { client.BaseRequest Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` StartDate *time.Time `json:"startDate,omitempty"` EndDate *time.Time `json:"endDate,omitempty"` Type RotationType `json:"type,omitempty"` Length uint32 `json:"length,omitempty"` Participants []Participant `json:"participants,omitempty"` TimeRestriction *TimeRestriction `json:"timeRestriction,omitempty"` }
func (*Rotation) WithParticipant ¶
func (r *Rotation) WithParticipant(participant Participant) *Rotation
func (*Rotation) WithParticipants ¶
func (r *Rotation) WithParticipants(participant ...Participant) *Rotation
func (*Rotation) WithTimeRestriction ¶
func (r *Rotation) WithTimeRestriction(timeRestriction TimeRestriction) *Rotation
type RotationType ¶
type RotationType string
type TimeRestriction ¶
type TimeRestriction struct { Type RestrictionType `json:"type,omitempty"` RestrictionList []Restriction `json:"restrictions,omitempty"` Restriction Restriction `json:"restriction,omitempty"` }
func (*TimeRestriction) WithRestrictions ¶
func (tr *TimeRestriction) WithRestrictions(restrictions ...Restriction) *TimeRestriction
Click to show internal directories.
Click to hide internal directories.