46 lines
2.2 KiB
Go
46 lines
2.2 KiB
Go
package incident
|
|
|
|
import (
|
|
slackClient "github.com/slack-go/slack"
|
|
"gorm.io/gorm"
|
|
"houston/model/incident"
|
|
request "houston/service/request"
|
|
)
|
|
|
|
type IIncidentService interface {
|
|
CreateIncidentEntity(incidentDTO *incident.CreateIncidentDTO, tx *gorm.DB) (*incident.IncidentEntity, error)
|
|
UpdateIncidentEntity(entity *incident.IncidentEntity) error
|
|
PostIncidentCreationWorkflow(
|
|
channel *slackClient.Channel,
|
|
incidentID uint,
|
|
blazeGroupChannelID string,
|
|
)
|
|
GetIncidentById(incidentId uint) (*incident.IncidentEntity, error)
|
|
GetIncidentByChannelID(channelID string) (*incident.IncidentEntity, error)
|
|
LinkJiraToIncident(incidentId uint, linkedBy string, jiraLinks ...string) error
|
|
UnLinkJiraFromIncident(incidentId uint, unLinkedBy, jiraLink string) error
|
|
GetAllOpenIncidents() ([]incident.IncidentDTO, int, error)
|
|
GetAllIncidents(teamIds, severityIds, statusIds []uint, isPrivate *bool, isArchived *bool) ([]incident.IncidentDTO, int, error)
|
|
GetIncidentRoleByIncidentIdAndRole(incidentId uint, role string) (*incident.IncidentRoleEntity, error)
|
|
GetIncidentRolesByIncidentIdsAndRole(incidentIds []uint, role string) ([]incident.IncidentRoleDTO, error)
|
|
UpdateIncidentJiraLinksEntity(incidentEntity *incident.IncidentEntity, updatedBy string, jiraLinks []string) error
|
|
AddJiraLinks(entity *incident.IncidentEntity, jiraLinks ...string) error
|
|
RemoveJiraLink(entity *incident.IncidentEntity, jiraLink string) error
|
|
HandleKrakatoaWorkflow(incidentEntity *incident.IncidentEntity) []error
|
|
IsHoustonChannel(channelID string) (bool, error)
|
|
DeleteConferenceEvent(incidentEntity *incident.IncidentEntity)
|
|
DuplicateUpdateIncidentStatus(duplicateOfID uint, userID string, incidentEntity *incident.IncidentEntity) error
|
|
ExecuteIncidentResolveFlow(
|
|
request request.ResolveIncidentRequest,
|
|
incidentEntity *incident.IncidentEntity,
|
|
userID,
|
|
requestType string,
|
|
) error
|
|
FetchIncidentsApproachingSlaBreach() ([]incident.IncidentDTO, error)
|
|
AddBotUponChannelUnarchival(channelID string) error
|
|
CanUserWithEmailAccessIncidentWithId(userEmail string, incidentId uint) bool
|
|
GetIncidentsByIds(incidentIds []uint) ([]incident.IncidentDTO, error)
|
|
MoveIncidentsToInvestigating() error
|
|
EeMonitoringServiceWebhookCall(incidentEntity *incident.IncidentEntity)
|
|
}
|