Documentation
¶
Index ¶
- type CreateNativeScanRunInput
- type SealScanRunInput
- type Service
- func (s *Service) CreateNativeScanRun(ctx context.Context, in CreateNativeScanRunInput) (scanrun.ScanRun, error)
- func (s *Service) GetScanRun(ctx context.Context, tenantID shared.ID, runID string) (scanrun.ScanRun, error)
- func (s *Service) ListScanRuns(ctx context.Context, tenantID, engagementID shared.ID) ([]scanrun.ScanRun, error)
- func (s *Service) SealScanRun(ctx context.Context, in SealScanRunInput) (scanrun.ScanRun, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateNativeScanRunInput ¶
type CreateNativeScanRunInput struct {
TenantID shared.ID `json:"tenant_id"`
EngagementID shared.ID `json:"engagement_id"`
RunID string `json:"run_id,omitempty"`
Actor string `json:"actor,omitempty"`
}
CreateNativeScanRunInput carries arguments to create a new native scan run in building state.
type SealScanRunInput ¶
type SealScanRunInput struct {
TenantID shared.ID `json:"tenant_id"`
RunID string `json:"run_id"`
TerminalStatus scanrun.TerminalStatus `json:"terminal_status"`
Lanes []scanrun.Lane `json:"lanes"`
Actor string `json:"actor,omitempty"`
}
SealScanRunInput carries arguments to seal a scan run with its normalized producer lanes.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service coordinates domain rules, persistence, and audit logging for scan runs and sealed provenance.
func NewService ¶
func NewService( runs ports.ScanRunProvenanceStore, engagements ports.EngagementRepository, tx ports.TenantTransactionRunner, ids ports.IDGenerator, clock ports.Clock, audit ports.IdempotentAuditLogger, ) (*Service, error)
NewService constructs a validated ScanRun application service.
func (*Service) CreateNativeScanRun ¶
func (s *Service) CreateNativeScanRun(ctx context.Context, in CreateNativeScanRunInput) (scanrun.ScanRun, error)
CreateNativeScanRun initializes a new native scan run header.
func (*Service) GetScanRun ¶
func (s *Service) GetScanRun(ctx context.Context, tenantID shared.ID, runID string) (scanrun.ScanRun, error)
GetScanRun retrieves a single scan run with all normalized lane facts.
func (*Service) ListScanRuns ¶
func (s *Service) ListScanRuns(ctx context.Context, tenantID, engagementID shared.ID) ([]scanrun.ScanRun, error)
ListScanRuns returns all scan runs for an engagement.
func (*Service) SealScanRun ¶
SealScanRun validates lane facts, computes manifest hashes, and atomically seals the scan run.