Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct {
Base
AlertID int // The global alert number
Summary string
Details string
ServiceID string
ServiceName string
Meta map[string]string
// OriginalStatus is the status of the first Alert notification to this Dest for this AlertID.
OriginalStatus *SendResult
}
Alert represents outgoing notifications for alerts.
type AlertBundle ¶
type AlertBundle struct {
Base
ServiceID string
ServiceName string // The service being notified for
Count int // Number of unacked alerts
}
AlertBundle represents a bundle of outgoing alert notifications for a single service.
type AlertState ¶
type AlertState int
AlertState is the current state of an Alert.
const ( AlertStateUnknown AlertState = iota AlertStateUnacknowledged AlertStateAcknowledged AlertStateClosed )
All alert states
type AlertStatus ¶
type AlertStatus struct {
Base
AlertID int
LogEntry string
ServiceID string
// Summary of the alert that this status is in regards to.
Summary string
// Details of the alert that this status is in regards to.
Details string
// OriginalStatus is the status of the first Alert notification to this Dest for this AlertID.
OriginalStatus SendResult
// NewAlertState contains the most recent state of the alert.
NewAlertState AlertState
}
type ScheduleOnCallUsers ¶
type ScheduleOnCallUsers struct {
Base
ScheduleID string
ScheduleName string
ScheduleURL string
Users []User
}
ScheduleOnCallUsers is a Message that indicates which users are currently on-call for a Schedule
type SendResult ¶
type SendResult struct {
// ID is the GoAlert message ID.
ID string
// ProviderMessageID is an identifier that represents the provider-specific ID
// of the message (e.g. Twilio SID).
ProviderMessageID gadb.ProviderMessageID
Status
DestType string
}
SendResult represents the result of a sent message.
type SentMessage ¶
SentMessage contains information about a message that was sent to a remote system.
type SignalMessage ¶
SignalMessage is a dynamic message that is sent to a notification destination.
func (SignalMessage) Param ¶
func (t SignalMessage) Param(name string) string
type State ¶
type State int
State represents the current state of an outgoing message.
const ( // StateUnknown is returned when the message has not yet been sent. StateUnknown State = iota // StateSending should be specified when a message is sending but has not been sent. // This includes things like remotely queued, ringing, or in-progress calls. StateSending // StatePending indicates a message waiting to be sent. StatePending // StateSent means the message has been sent completely, but may not // have been delivered (or delivery confirmation is not supported.). For // example, an SMS on the carrier network (but not device) or a voice call // that rang but got `no-answer`. StateSent // StateDelivered means the message is completed and was received // by the end device. SMS delivery confirmation, or a voice call was // completed (including if it was voice mail). StateDelivered // StateRead means the message was read by the recipient. StateRead // StateFailedTemp should be set when a message was not sent (no SMS or ringing phone) // but a subsequent try later may succeed. (e.g. voice call with busy signal). StateFailedTemp // StateFailedPerm should be set when a message was not sent (no SMS or ringing phone) // but a subsequent attempt will not be expected to succeed. For messages that fail due to // invalid config, they should set this state, as without manual intervention, a retry // will also fail. StateFailedPerm // StateBundled indicates that the message has been bundled into another message. StateBundled )
type Status ¶
type Status struct {
// State is the current state.
State State
// Details can contain any additional information about the State (e.g. "ringing", "no-answer" etc..).
Details string
// Sequence can be used when the provider sends updates out-of order (e.g. Twilio).
// The Sequence number defaults to 0, and a status update is ignored unless its
// Sequence number is >= the current one.
Sequence int
// SrcValue can be used to set/update the source value of the message.
SrcValue string
// Age is the time since the message was first sent. Ignored for new messages.
Age time.Duration
}
Status describes the current state of an outgoing message.
type Verification ¶
Verification represents outgoing verification code.