Documentation ¶
Index ¶
- func CreateSchema(db *pg.DB) error
- func IncidentStatus(v *validator.Validate, topStruct reflect.Value, ...) bool
- func MostCriticalStatus(services []Service) int
- func ServiceStatus(v *validator.Validate, topStruct reflect.Value, ...) bool
- type AggregatedIncident
- type AggregatedIncidents
- type AggregatedServices
- type Incident
- type IncidentUpdate
- type Incidents
- func (i *Incidents) DeleteIncident(id int64) error
- func (i *Incidents) DeleteIncidentUpdate(id int64) error
- func (i *Incidents) GetIncident(id int64) (Incident, error)
- func (i *Incidents) GetIncidentUpdate(id int64) (IncidentUpdate, error)
- func (i *Incidents) GetLatestIncidents() ([]Incident, error)
- func (i *Incidents) Initialize(db pg.DB)
- func (i *Incidents) InsertIncident(incident *Incident) error
- func (i *Incidents) InsertIncidentUpdate(incident int64, update *IncidentUpdate) error
- type Service
- type Services
- func (s *Services) DeleteService(id int64) error
- func (s *Services) GetService(id int64) (Service, error)
- func (s *Services) GetServices() ([]Service, error)
- func (s *Services) Initialize(db pg.DB)
- func (s *Services) InsertService(service *Service) error
- func (s *Services) UpdateService(id int64, service *Service) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IncidentStatus ¶
func MostCriticalStatus ¶
Types ¶
type AggregatedIncident ¶
type AggregatedIncidents ¶
type AggregatedIncidents []AggregatedIncident
func AggregateIncidents ¶
func AggregateIncidents(incidents []Incident) AggregatedIncidents
type AggregatedServices ¶
func AggregateServices ¶
func AggregateServices(services []Service) AggregatedServices
type Incident ¶
type Incident struct { Id int64 `json:"id"` Time time.Time `sql:",notnull" json:"time"` Title string `sql:",notnull" json:"title" binding:"required"` Updates []*IncidentUpdate `json:"updates"` }
type IncidentUpdate ¶
type Incidents ¶
type Incidents struct {
// contains filtered or unexported fields
}
func (*Incidents) DeleteIncident ¶
func (*Incidents) DeleteIncidentUpdate ¶
func (*Incidents) GetIncidentUpdate ¶
func (i *Incidents) GetIncidentUpdate(id int64) (IncidentUpdate, error)
func (*Incidents) GetLatestIncidents ¶
func (*Incidents) Initialize ¶
func (*Incidents) InsertIncident ¶
func (*Incidents) InsertIncidentUpdate ¶
func (i *Incidents) InsertIncidentUpdate(incident int64, update *IncidentUpdate) error
type Service ¶
type Service struct { ID int64 `json:"id"` Name string `sql:",notnull" json:"name" binding:"required"` Status string `sql:",notnull" json:"status" binding:"required,servicestatus"` Description string `sql:",notnull" json:"description" binding:"required"` Group string `sql:",notnull" json:"group" binding:"required"` Link string `json:"link"` Tags []string `json:"tags"` Enabled bool `sql:",notnull" json:"enabled" binding:"required"` }
type Services ¶
type Services struct {
// contains filtered or unexported fields
}
func (*Services) DeleteService ¶
func (*Services) GetServices ¶
func (*Services) Initialize ¶
func (*Services) InsertService ¶
Click to show internal directories.
Click to hide internal directories.