Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Incident ¶
type Incident struct { Id int64 `gorm:"primary_key;column:id" json:"id"` Title string `gorm:"column:title" json:"title,omitempty"` Description string `gorm:"column:description" json:"description,omitempty"` ServiceId int64 `gorm:"index;column:service" json:"service"` CreatedAt time.Time `gorm:"column:created_at" json:"created_at" json:"created_at"` UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at" json:"updated_at"` AllUpdates []*IncidentUpdate `gorm:"-" json:"updates,omitempty"` }
Incident is the main struct for Incidents
func FindByService ¶
func (*Incident) Updates ¶
func (i *Incident) Updates() []*IncidentUpdate
type IncidentUpdate ¶
type IncidentUpdate struct { Id int64 `gorm:"primary_key;column:id" json:"id"` IncidentId int64 `gorm:"index;column:incident" json:"-"` Message string `gorm:"column:message" json:"message,omitempty"` Type string `gorm:"column:type" json:"type,omitempty"` CreatedAt time.Time `gorm:"column:created_at" json:"created_at" json:"created_at"` UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at" json:"updated_at"` }
IncidentUpdate contains updates based on a Incident
func FindUpdate ¶
func FindUpdate(uid int64) (*IncidentUpdate, error)
func (*IncidentUpdate) Create ¶
func (i *IncidentUpdate) Create() error
func (*IncidentUpdate) Delete ¶
func (i *IncidentUpdate) Delete() error
func (*IncidentUpdate) Update ¶
func (i *IncidentUpdate) Update() error
Click to show internal directories.
Click to hide internal directories.