Documentation
¶
Overview ¶
Package incidentuc is the usecase seam over the event-sourced incident store.
Index ¶
- type Service
- func (s *Service) Append(ctx context.Context, id shared.ID, expectedRevision int, ...) (incident.Incident, error)
- func (s *Service) Get(ctx context.Context, id shared.ID) (incident.Incident, error)
- func (s *Service) ListByAsset(ctx context.Context, asset shared.ID, limit int) ([]incident.Incident, error)
- func (s *Service) ListPendingResponseLinks(ctx context.Context) ([]incident.ResponseLink, error)
- func (s *Service) RecordCorrelation(ctx context.Context, events []incident.IncidentEvent) (created, updated []incident.Incident, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(store ports.IncidentEventStore) (*Service, error)
func (*Service) Append ¶
func (s *Service) Append(ctx context.Context, id shared.ID, expectedRevision int, events []incident.IncidentEvent) (incident.Incident, error)
Append resolves aliases and rewrites all incoming event identities to the canonical root before validation.
func (*Service) Get ¶
Get returns the canonical logical projection for either a root or a historical alias. Root workflow fields remain root-owned; immutable member evidence is unioned deterministically for the read model.
func (*Service) ListByAsset ¶
func (*Service) ListPendingResponseLinks ¶
func (*Service) RecordCorrelation ¶
Click to show internal directories.
Click to hide internal directories.