api

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 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
	Components    []string           `gorm:"column:components;type:jsonb"`
	Events        IncidentEventArray `gorm:"column:events;type:jsonb"`
	StartTime     time.Time          `gorm:"secondarykey"`
	EndTime       *time.Time         `gorm:"secondarykey"`
	Description   *string
	DeepLink      string `gorm:"primarykey"`
	Impact        Impact `gorm:"secondarykey"`
	StatusPageUrl string `gorm:"secondarykey"`
}

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
	Description string
	Time        time.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"`
	URL  string `gorm:"primarykey"`
	// Used to determine if we should run a scrape for this status page
	LastHistoricallyScraped time.Time
	LastCurrentlyScraped    time.Time
	// IsIndexed is used to determine if the status page has ever been indexed in the search engine successfully
	IsIndexed bool
}

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