Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrInvalidInput = iota ErrDuplicateEntry ErrNotFound )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentRepository ¶
type ComponentRepository interface { CreateComponent(component *m.Component) error FindComponentByID(id uint) (*m.Component, error) FindComponentsByID(ids *[]uint) (*[]*m.Component, error) FindAllComponents() (*[]m.Component, error) UpdateComponent(component *m.Component) error DeleteComponentByID(id uint) error }
func NewComponentRepository ¶
func NewComponentRepository(db *gorm.DB) ComponentRepository
type IncidentRepository ¶
type IncidentRepository interface { CreateIncident( incident *m.Incident, components *[]uint, initialLog *m.IncidentLog, ) error FindIncidentByID(id uint) (*m.Incident, error) FindAllIncidents() (*[]m.Incident, error) UpdateIncident(incident *m.Incident, components *[]uint) error DeleteIncidentByID(id uint) error CreateIncidentLog(log *m.IncidentLog) error UpdateIncidentLog(log *m.IncidentLog) error }
func NewIncidentRepository ¶
func NewIncidentRepository(db *gorm.DB) IncidentRepository
Click to show internal directories.
Click to hide internal directories.