Documentation
¶
Index ¶
- func Samples() error
- func SetDB(database database.Database)
- type Incident
- func (i *Incident) AfterCreate()
- func (i *Incident) AfterDelete()
- func (i *Incident) AfterFind()
- func (i *Incident) AfterUpdate()
- func (i *Incident) BeforeCreate() error
- func (i *Incident) BeforeUpdate() error
- func (i *Incident) Create() error
- func (i *Incident) Delete() error
- func (i *Incident) Update() error
- func (i *Incident) Validate() error
- type IncidentUpdate
- func (i *IncidentUpdate) AfterCreate()
- func (i *IncidentUpdate) AfterDelete()
- func (i *IncidentUpdate) AfterFind()
- func (i *IncidentUpdate) AfterUpdate()
- func (i *IncidentUpdate) BeforeCreate() error
- func (i *IncidentUpdate) BeforeUpdate() error
- func (i *IncidentUpdate) Create() error
- func (i *IncidentUpdate) Delete() error
- func (i *IncidentUpdate) Update() error
- func (i *IncidentUpdate) Validate() error
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"` Updates []*IncidentUpdate `gorm:"foreignkey:incident;association_foreignkey:id" json:"updates,omitempty"` }
Incident is the main struct for Incidents
func FindByService ¶
func (*Incident) AfterCreate ¶
func (i *Incident) AfterCreate()
func (*Incident) AfterDelete ¶
func (i *Incident) AfterDelete()
func (*Incident) AfterUpdate ¶
func (i *Incident) AfterUpdate()
func (*Incident) BeforeCreate ¶
func (*Incident) BeforeUpdate ¶
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) AfterCreate ¶
func (i *IncidentUpdate) AfterCreate()
func (*IncidentUpdate) AfterDelete ¶
func (i *IncidentUpdate) AfterDelete()
func (*IncidentUpdate) AfterFind ¶
func (i *IncidentUpdate) AfterFind()
func (*IncidentUpdate) AfterUpdate ¶
func (i *IncidentUpdate) AfterUpdate()
func (*IncidentUpdate) BeforeCreate ¶
func (i *IncidentUpdate) BeforeCreate() error
func (*IncidentUpdate) BeforeUpdate ¶
func (i *IncidentUpdate) BeforeUpdate() 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
func (*IncidentUpdate) Validate ¶
func (i *IncidentUpdate) Validate() error
Click to show internal directories.
Click to hide internal directories.