statuspage

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 NewHandler() handlers.Handler

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)

func ToUpperFirstWorlds

func ToUpperFirstWorlds(input string, sep1 string, sep2 string) string

Types

type StatuspageOutComponent

type StatuspageOutComponent struct {
	CreatedAt string `json:"created_at,omitempty"`
	Id        string `json:"id,omitempty"`
	Name      string `json:"name,omitempty"`
	Status    string `json:"status,omitempty"`
}

type StatuspageOutComponentUpdate

type StatuspageOutComponentUpdate struct {
	CreatedAt   string `json:"created_at,omitempty"`
	NewStatus   string `json:"new_status,omitempty"`
	OldStatus   string `json:"old_status,omitempty"`
	Id          string `json:"id,omitempty"`
	ComponentId string `json:"component_id,omitempty"`
}

type StatuspageOutIncident

type StatuspageOutIncident struct {
	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"`
	Id                            string                        `json:"id,omitempty"`
	OrganizationId                string                        `json:"organization_id,omitempty"`
	IncidentUpdates               []StatuspageOutIncidentUpdate `json:"incident_updates,omitempty"`
	Name                          string                        `json:"name,omitempty"`
}

type StatuspageOutIncidentUpdate

type StatuspageOutIncidentUpdate struct {
	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"`
	Id                 string `json:"id,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 StatuspageOutMeta struct {
	Unsubscribe   string `json:"unsubscribe,omitempty"`
	Documentation string `json:"documentation,omitempty"`
}

type StatuspageOutPage

type StatuspageOutPage struct {
	Id                string `json:"id,omitempty"`
	StatusIndicator   string `json:"status_indicator,omitempty"`
	StatusDescription string `json:"status_description,omitempty"`
}

Jump to

Keyboard shortcuts

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