Documentation ¶
Index ¶
- Constants
- func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
- func NewHandler() handlers.Handler
- func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)
- func NormalizeComponentUpdate(cfg config.Configuration, src StatuspageOutMessage) (cc.Message, error)
- func NormalizeIncidentUpdate(cfg config.Configuration, src StatuspageOutMessage) (cc.Message, error)
- func ToUpperFirstWorlds(input string, sep1 string, sep2 string) string
- type StatuspageOutComponent
- type StatuspageOutComponentUpdate
- type StatuspageOutIncident
- type StatuspageOutIncidentUpdate
- type StatuspageOutMessage
- type StatuspageOutMeta
- type StatuspageOutPage
Constants ¶
View Source
const ( DisplayName = "StatusPage" HandlerKey = "statuspage" MessageDirection = "out" ComponentURLFormat = "http://manage.statuspage.io/pages/%s/components" MessageBodyType = models.JSON )
Variables ¶
This section is empty.
Functions ¶
func ExampleMessage ¶
func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
func NewHandler ¶
func Normalize ¶
func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)
func NormalizeComponentUpdate ¶
func NormalizeComponentUpdate(cfg config.Configuration, src StatuspageOutMessage) (cc.Message, error)
func NormalizeIncidentUpdate ¶
func NormalizeIncidentUpdate(cfg config.Configuration, src StatuspageOutMessage) (cc.Message, error)
Types ¶
type StatuspageOutComponent ¶
type StatuspageOutIncident ¶
type StatuspageOutIncident struct { ID string `json:"id,omitempty"` Backfilled bool `json:"backfilled,omitempty"` Impact string `json:"impact,omitempty"` ImpactOverride interface{} `json:"impact_override,omitempty"` MonitoringAt string `json:"monitoring_at,omitempty"` PostmortemBody interface{} `json:"postmortem_body,omitempty"` PostmortemBodyLastUpdatedAt string `json:"postmortem_body_last_updated_at,omitempty"` PostmortemIgnored bool `json:"postmortem_ignored,omitempty"` PostmortemNotifiedSubscribers bool `json:"postmortem_notified_subscribers,omitempty"` PostmortemNotifiedTwitter bool `json:"postmortem_notified_twitter,omitempty"` PostmortemPublishedAt string `json:"postmortem_published_at,omitempty"` ResovledAt string `json:"resolved_at,omitempty"` ScheduledAutoTransition bool `json:"scheduled_auto_transition,omitempty"` ScheduledFor interface{} `json:"scheduled_for,omitempty"` ScheduledRemindPrior bool `json:"scheduled_remind_prior,omitempty"` ScheduledRemindedAt interface{} `json:"scheduled_reminded_at,omitempty"` ScheduledUntil interface{} `json:"scheduled_until,omitempty"` Shortlink string `json:"shortlink,omitempty"` Status string `json:"status,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` OrganizationID string `json:"organization_id,omitempty"` IncidentUpdates []StatuspageOutIncidentUpdate `json:"incident_updates,omitempty"` Name string `json:"name,omitempty"` }
type StatuspageOutIncidentUpdate ¶
type StatuspageOutIncidentUpdate struct { ID string `json:"id,omitempty"` Body string `json:"body,omitempty"` CreatedAt string `json:"created_at,omitempty"` DisplayAt string `json:"display_at,omitempty"` Status string `json:"status,omitempty"` TwitterUpdatedAt string `json:"twitter_updated_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` WantsTwitterUpdate bool `json:"wants_twitter_update,omitempty"` IncidentID string `json:"incident_id,omitempty"` }
type StatuspageOutMessage ¶
type StatuspageOutMessage struct { Meta StatuspageOutMeta `json:"meta,omitempty"` Page StatuspageOutPage `json:"page,omitempty"` ComponentUpdate StatuspageOutComponentUpdate `json:"component_update,omitempty"` Component StatuspageOutComponent `json:"component,omitempty"` Incident StatuspageOutIncident `json:"incident,omitempty"` }
func StatuspageOutMessageFromBytes ¶
func StatuspageOutMessageFromBytes(bytes []byte) (StatuspageOutMessage, error)
func (*StatuspageOutMessage) IncidentURL ¶
func (msg *StatuspageOutMessage) IncidentURL() string
func (*StatuspageOutMessage) PageURL ¶
func (msg *StatuspageOutMessage) PageURL() (string, error)
type StatuspageOutMeta ¶
type StatuspageOutPage ¶
Click to show internal directories.
Click to hide internal directories.