Documentation
¶
Index ¶
- Variables
- func TextIncidentState(state IncidentState) string
- func TextScheduledState(state IncidentState) string
- func TextState(state ComponentState) string
- type Component
- type ComponentState
- type Components
- type Incident
- type IncidentState
- type IncidentUpdateRequest
- type Incidents
- type InputTypeMetadata
- type Message
- type Messages
- type Metadata
- type MetadataField
- type MetadataFields
- type NotifyRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var AllComponentState = []ComponentState{MajorOutage, PartialOutage, DegradedPerformance, UnderMaintenance, Operational}
View Source
var AllIncidentState = []IncidentState{Unresolved, Monitoring, Resolved}
Functions ¶
func TextIncidentState ¶
func TextIncidentState(state IncidentState) string
func TextScheduledState ¶ added in v1.5.1
func TextScheduledState(state IncidentState) string
func TextState ¶
func TextState(state ComponentState) string
Types ¶
type ComponentState ¶
type ComponentState int
const ( Operational ComponentState = iota UnderMaintenance DegradedPerformance PartialOutage MajorOutage )
type Components ¶
type Components []Component
func (*Components) Inline ¶
func (c *Components) Inline() []string
func (*Components) Scan ¶
func (c *Components) Scan(src interface{}) error
func (Components) String ¶
func (c Components) String() string
type Incident ¶
type Incident struct { GUID string `json:"guid" gorm:"primary_key"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` State IncidentState `json:"state"` ComponentState ComponentState `json:"component_state"` Components *Components `json:"components" gorm:"type:varchar(300)"` Messages []Message `json:"messages" gorm:"ForeignKey:IncidentGUID;"` Metadata []Metadata `json:"metadata" gorm:"ForeignKey:IncidentGUID;"` IsScheduled bool `json:"is_scheduled"` ScheduledEnd time.Time `json:"scheduled_end"` Origin string `json:"origin"` Persistent bool `json:"persistent"` }
func (Incident) LastMessage ¶
func (Incident) MainMessage ¶
func (Incident) UpdateMessages ¶
func (Incident) UpdateMessagesReverse ¶ added in v1.1.2
type IncidentState ¶
type IncidentState int
const ( Unresolved IncidentState = iota Resolved Monitoring Idle )
type IncidentUpdateRequest ¶
type IncidentUpdateRequest struct { GUID *string `json:"guid"` CreatedAt time.Time `json:"created_at"` State *IncidentState `json:"state"` ComponentState *ComponentState `json:"component_state"` Components *Components `json:"components"` Messages *[]Message `json:"messages"` Metadata *[]Metadata `json:"metadata"` IsScheduled *bool `json:"is_scheduled"` ScheduledEnd time.Time `json:"scheduled_end"` Origin *string `json:"origin"` NoNotify bool `json:"no_notify"` Persistent *bool `json:"persistent"` }
type InputTypeMetadata ¶ added in v1.5.0
type InputTypeMetadata int
const ( Text InputTypeMetadata = iota Password Checkbox Radio Select )
type MetadataField ¶ added in v1.3.0
type MetadataField struct { Name string Id string Info string InputType InputTypeMetadata ForScheduled bool Opts interface{} DefaultOpt interface{} }
func (MetadataField) Validate ¶ added in v1.3.0
func (m MetadataField) Validate() error
type MetadataFields ¶ added in v1.3.0
type MetadataFields []MetadataField
func (MetadataFields) LenIncident ¶ added in v1.3.0
func (mf MetadataFields) LenIncident() int
func (MetadataFields) LenScheduled ¶ added in v1.3.0
func (mf MetadataFields) LenScheduled() int
type NotifyRequest ¶ added in v1.6.1
func NewNotifyRequest ¶ added in v1.6.1
func NewNotifyRequest(incident Incident, triggerByUser bool) *NotifyRequest
Click to show internal directories.
Click to hide internal directories.