* INFRA-3635 | Dhruv | Adds auto incident status change to investigating flow * INFRA-3635 | Dhruv | Reformats to remove too many changes visible * INFRA-3635 | Dhruv | Adds initial tests * INFRA-3635 | Dhruv | fix pr comments * INFRA-3635 | Dhruv | Fix pr comments * INFRA-3635 | Dhruv | removes unwanted file change * INFRA-3635 | Dhruv | initial tests * INFRA-3635 | Dhruv | updates tests
50 lines
2.6 KiB
Go
50 lines
2.6 KiB
Go
package incident
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type IIncidentRepository interface {
|
|
CreateIncidentEntity(request *CreateIncidentDTO, tx *gorm.DB) (*IncidentEntity, error)
|
|
UpdateIncident(incidentEntity *IncidentEntity) error
|
|
UpdateIncidentWithAssociations(incidentEntity *IncidentEntity) error
|
|
UpdateIncidentWithJustification(incidentEntity *IncidentEntity, justification string) error
|
|
CreateIncidentTag(incidentId, tagId uint) (*IncidentTagEntity, error)
|
|
CreateIncidentTagsInBatchesForAnIncident(incidentId uint, tagIds []uint) (*[]IncidentTagEntity, error)
|
|
FindIncidentByChannelId(channelId string) (*IncidentEntity, error)
|
|
FindIncidentById(Id uint) (*IncidentEntity, error)
|
|
GetAllIncidents(teamsIds, severityIds, statusIds []uint, isPrivate *bool, isArchived *bool) (*[]IncidentEntity, int, error)
|
|
FetchAllIncidentsPaginated(
|
|
productIds []uint,
|
|
reportingTeamIds []uint,
|
|
TeamsId []uint,
|
|
SeverityIds []uint,
|
|
StatusIds []uint,
|
|
pageNumber int64,
|
|
pageSize int64,
|
|
incidentName string,
|
|
from string,
|
|
to string,
|
|
userId *uint,
|
|
) ([]IncidentEntity, int, error)
|
|
UpsertIncidentRole(addIncidentRoleRequest *AddIncidentRoleRequest) error
|
|
CreateIncidentChannelEntry(request *CreateIncidentChannelEntry) error
|
|
GetIncidentChannels(incidentId uint) (*[]IncidentChannelEntity, error)
|
|
GetIncidentTagsByIncidentId(incidentId uint) (*[]IncidentTagEntity, error)
|
|
GetIncidentTagByTagId(incidentId uint, tagId uint) (*IncidentTagEntity, error)
|
|
SaveIncidentTag(entity IncidentTagEntity) (*IncidentTagEntity, error)
|
|
GetIncidentsForEscalation() ([]IncidentEntity, error)
|
|
GetIncidentsForMovingToInvestigating() ([]IncidentEntity, error)
|
|
GetIncidentsByTeamIdAndNotResolvedAndOfSev0OrSev1OrSev2(team_id uint) (*[]IncidentEntity, error)
|
|
GetCountOfIncidentsByTeamIdAndNotResolved(team_id uint) (int, error)
|
|
GetIncidentRoleByIncidentIdAndRole(incident_id uint, role string) (*IncidentRoleEntity, error)
|
|
GetIncidentRolesByIncidentIdsAndRole(incidentsIds []uint, role string) ([]IncidentRoleEntity, error)
|
|
FindOpenIncidentsByTeamOrderedByCreationTimeAndSeverity(team string) (*[]IncidentEntity, error)
|
|
UpdateIncidentChannelEntity(incidentChannelEntity *IncidentChannelEntity) error
|
|
GetOpenIncidentsByCreatorIdForGivenTeamAndStatuses(created_by string, teamId uint, statusIds []uint) (*[]IncidentEntity, error)
|
|
GetIncidentTagsByTagIds(incidentId uint, tagIds []uint) (*IncidentTagEntity, error)
|
|
FetchIncidentsWithSeverityTatBetweenGivenRange(slaStart, slaEnd string) (*[]IncidentEntity, error)
|
|
CanUserWithEmailAccessIncidentWithId(userEmail string, incidentId uint) (bool, error)
|
|
GetIncidentsByIds(incidentIds []uint) ([]IncidentEntity, error)
|
|
}
|