Documentation
¶
Index ¶
- Variables
- type AffectedComponentInput
- type CreateInput
- type RequestBody
- type Service
- func (s *Service) AddUpdate(ctx context.Context, incidentID primitive.ObjectID, message string, ...) (models.IncidentUpdate, error)
- func (s *Service) Create(ctx context.Context, input CreateInput) (models.Incident, error)
- func (s *Service) Delete(ctx context.Context, incidentID primitive.ObjectID) error
- func (s *Service) GetByID(ctx context.Context, incidentID primitive.ObjectID) (models.Incident, error)
- func (s *Service) List(ctx context.Context, statusFilter, startDateRaw, endDateRaw string, ...) ([]models.Incident, int64, error)
- func (s *Service) ListHistory(ctx context.Context, incidentID primitive.ObjectID) ([]models.AuditLog, error)
- func (s *Service) ListUpdates(ctx context.Context, incidentID primitive.ObjectID) ([]models.IncidentUpdate, error)
- func (s *Service) Resolve(ctx context.Context, incidentID primitive.ObjectID) (models.Incident, error)
- func (s *Service) Update(ctx context.Context, id primitive.ObjectID, input RequestBody) (models.Incident, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidAffectedComponentsPayload = errors.New("invalid affected components payload") ErrInvalidAffectedComponentsReference = errors.New("one or more affected components or subcomponents are invalid") )
Functions ¶
This section is empty.
Types ¶
type AffectedComponentInput ¶
type CreateInput ¶
type CreateInput struct {
RequestBody
CreatorIDHex string
CreatorUsername string
}
type RequestBody ¶
type RequestBody struct {
Title string
Description string
DescriptionJSON models.RichTextDocument
VisibilityState models.IncidentVisibilityState
Status models.IncidentStatus
Impact models.IncidentImpact
AffectedComponents []string
Components []string
AffectedComponentTargets []AffectedComponentInput
AffectedComponentsNew []AffectedComponentInput
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo repository.IncidentRepository) *Service
func (*Service) ListHistory ¶
func (*Service) ListUpdates ¶
Click to show internal directories.
Click to hide internal directories.