model

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SeveritiesString

func SeveritiesString() []string

Types

type Config

type Config struct {
	Content struct {
		Systems []string `yaml:"systems"`
	} `yaml:"content"`
}

type Date

type Date time.Time

func (Date) IsZero

func (d Date) IsZero() bool

func (Date) MarshalJSON

func (d Date) MarshalJSON() ([]byte, error)

func (Date) MarshalYAML

func (d Date) MarshalYAML() (interface{}, error)

func (*Date) UnmarshalYAML

func (d *Date) UnmarshalYAML(unmarshal func(interface{}) error) error

type Incident

type Incident struct {
	Id              string   `yaml:"id,omitempty" json:"id,omitempty"`
	Title           string   `yaml:"title" json:"title,omitempty"`
	Description     string   `yaml:"description,omitempty" json:"description,omitempty"`
	Date            Date     `yaml:"date" json:"date,omitempty"`
	Modified        Date     `yaml:"modified,omitempty" json:"modified,omitempty"`
	Severity        Severity `yaml:"severity,omitempty" json:"severity,omitempty"`
	AffectedSystems []string `yaml:"affectedsystems" json:"affectedsystems,omitempty"`
	Resolved        bool     `yaml:"resolved" json:"resolved,omitempty"`
	Scheduled       *Date    `yaml:"scheduled,omitempty" json:"scheduled,omitempty"`
	Duration        int      `yaml:"duration,omitempty" json:"duration,omitempty"`
	Content         string   `yaml:"-" fm:"content"`
	File            string   `yaml:"-" json:"filename"`
}

func (Incident) Filename

func (i Incident) Filename() string

func (Incident) String

func (i Incident) String() string

func (*Incident) UnmarshalYAML added in v0.1.1

func (i *Incident) UnmarshalYAML(unmarshal func(interface{}) error) error

type Incidents

type Incidents []Incident

func (Incidents) Filenames

func (is Incidents) Filenames() []string

type Severity

type Severity string
const (
	MajorOutage         Severity = "major-outage"
	PartialOutage       Severity = "partial-outage"
	DegradedPerformance Severity = "degraded-performance"
	UnderMaintenance    Severity = "under-maintenance"
)

func FindSeverity

func FindSeverity(severity string) (Severity, error)

func Severities

func Severities() []Severity

Jump to

Keyboard shortcuts

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