api

package
v0.98.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impact

type Impact string
const (
	ImpactMinor       Impact = "minor"
	ImpactMajor       Impact = "major"
	ImpactCritical    Impact = "critical"
	ImpactMaintenance Impact = "maintenance"
	ImpactNone        Impact = "none"
)

type Incident

type Incident struct {
	Title                   string             `json:"title"`
	Components              []string           `gorm:"column:components;type:jsonb" json:"components"`
	Events                  IncidentEventArray `gorm:"column:events;type:jsonb" json:"events"`
	StartTime               time.Time          `gorm:"column:start_time;secondarykey" json:"startTime"`
	EndTime                 *time.Time         `gorm:"column:end_time;secondarykey" json:"endTime"`
	Description             *string            `json:"column:description;description"`
	DeepLink                string             `gorm:"column:deep_link;primarykey" json:"deepLink"`
	Impact                  Impact             `gorm:"column:impact;secondarykey" json:"impact"`
	StatusPageUrl           string             `gorm:"column:status_page_url;secondarykey" json:"statusPageUrl"`
	NotificationJobsStarted bool               `gorm:"column:notification_jobs_started;secondarykey" json:"notificationJobsStarted"`
}

func NewIncident

func NewIncident(title string, components []string, events []IncidentEvent, startTime time.Time, endTime *time.Time, description *string, deepLink string, impact Impact, statusPageUrl string) Incident

type IncidentEvent

type IncidentEvent struct {
	Title       string    `json:"title"`
	Description string    `json:"description"`
	Time        time.Time `json:"time"`
}

func NewIncidentEvent

func NewIncidentEvent(title string, description string, time time.Time) IncidentEvent

type IncidentEventArray

type IncidentEventArray []IncidentEvent

func (*IncidentEventArray) Scan

func (sla *IncidentEventArray) Scan(src interface{}) error

func (IncidentEventArray) Value

func (sla IncidentEventArray) Value() (driver.Value, error)

type StatusPage

type StatusPage struct {
	Name string `gorm:"secondarykey" json:"name"`
	URL  string `gorm:"primarykey" json:"url"`
	// Used to determine if we should run a scrape for this status page
	LastHistoricallyScraped time.Time `json:"lastHistoricallyScraped"`
	LastCurrentlyScraped    time.Time `json:"lastCurrentlyScraped"`
	// IsIndexed is used to determine if the status page has ever been indexed in the search engine successfully
	IsIndexed bool `json:"isIndexed"`
}

func NewStatusPage

func NewStatusPage(name string, url string) StatusPage

Jump to

Keyboard shortcuts

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