Versions in this module Expand all Collapse all v0 v0.2.0 Apr 23, 2026 Changes in this version + type ActivityItem struct + Description string + Timestamp time.Time + Title string + Type string + type AssetStatsData struct + AverageRiskScore float64 + ByStatus map[string]int + BySubType map[string]int + ByType map[string]int + Total int + type CreateReportScheduleInput struct + ActorID string + CronExpression string + Format string + Name string + Options map[string]any + Recipients []reportscheduledom.Recipient + ReportType string + TenantID string + Timezone string + type DashboardAllStats struct + Activity []ActivityItem + Assets AssetStatsData + Findings FindingStatsData + Repos RepositoryStatsData + type DashboardService struct + func NewDashboardService(repo DashboardStatsRepository, log *logger.Logger) *DashboardService + func (s *DashboardService) GetDataQualityScorecard(ctx context.Context, tenantID shared.ID) (*DataQualityScorecard, error) + func (s *DashboardService) GetExecutiveSummary(ctx context.Context, tenantID shared.ID, days int) (*ExecutiveSummary, error) + func (s *DashboardService) GetGlobalStats(ctx context.Context) (*DashboardStats, error) + func (s *DashboardService) GetMTTRAnalytics(ctx context.Context, tenantID shared.ID, days int) (*MTTRAnalytics, error) + func (s *DashboardService) GetMTTRMetrics(ctx context.Context, tenantID shared.ID) (map[string]float64, error) + func (s *DashboardService) GetProcessMetrics(ctx context.Context, tenantID shared.ID, days int) (*ProcessMetrics, error) + func (s *DashboardService) GetRiskTrend(ctx context.Context, tenantID shared.ID, days int) ([]RiskTrendPoint, error) + func (s *DashboardService) GetRiskVelocity(ctx context.Context, tenantID shared.ID, weeks int) ([]RiskVelocityPoint, error) + func (s *DashboardService) GetStats(ctx context.Context, tenantID shared.ID) (*DashboardStats, error) + func (s *DashboardService) GetStatsForTenants(ctx context.Context, tenantIDs []string) (*DashboardStats, error) + type DashboardStats struct + AssetCount int + AssetsByStatus map[string]int + AssetsBySubType map[string]int + AssetsByType map[string]int + AverageCVSS float64 + AverageRiskScore float64 + FindingCount int + FindingTrend []FindingTrendPoint + FindingsBySeverity map[string]int + FindingsByStatus map[string]int + OverdueFindings int + RecentActivity []ActivityItem + RepositoriesWithFindings int + RepositoryCount int + type DashboardStatsRepository interface + GetAllStats func(ctx context.Context, tenantID shared.ID) (*DashboardAllStats, error) + GetAssetStats func(ctx context.Context, tenantID shared.ID) (AssetStatsData, error) + GetDataQualityScorecard func(ctx context.Context, tenantID shared.ID) (*DataQualityScorecard, error) + GetExecutiveSummary func(ctx context.Context, tenantID shared.ID, days int) (*ExecutiveSummary, error) + GetFilteredAssetStats func(ctx context.Context, tenantIDs []string) (AssetStatsData, error) + GetFilteredFindingStats func(ctx context.Context, tenantIDs []string) (FindingStatsData, error) + GetFilteredRecentActivity func(ctx context.Context, tenantIDs []string, limit int) ([]ActivityItem, error) + GetFilteredRepositoryStats func(ctx context.Context, tenantIDs []string) (RepositoryStatsData, error) + GetFindingStats func(ctx context.Context, tenantID shared.ID) (FindingStatsData, error) + GetFindingTrend func(ctx context.Context, tenantID shared.ID, months int) ([]FindingTrendPoint, error) + GetGlobalAssetStats func(ctx context.Context) (AssetStatsData, error) + GetGlobalFindingStats func(ctx context.Context) (FindingStatsData, error) + GetGlobalRecentActivity func(ctx context.Context, limit int) ([]ActivityItem, error) + GetGlobalRepositoryStats func(ctx context.Context) (RepositoryStatsData, error) + GetMTTRAnalytics func(ctx context.Context, tenantID shared.ID, days int) (*MTTRAnalytics, error) + GetMTTRMetrics func(ctx context.Context, tenantID shared.ID) (map[string]float64, error) + GetProcessMetrics func(ctx context.Context, tenantID shared.ID, days int) (*ProcessMetrics, error) + GetRecentActivity func(ctx context.Context, tenantID shared.ID, limit int) ([]ActivityItem, error) + GetRepositoryStats func(ctx context.Context, tenantID shared.ID) (RepositoryStatsData, error) + GetRiskTrend func(ctx context.Context, tenantID shared.ID, days int) ([]RiskTrendPoint, error) + GetRiskVelocity func(ctx context.Context, tenantID shared.ID, weeks int) ([]RiskVelocityPoint, error) + type DataQualityScorecard struct + AssetOwnershipPct float64 + DeduplicationRate float64 + FindingEvidencePct float64 + MedianLastSeenDays float64 + TotalAssets int + TotalFindings int + type DependencyEdgeOutput struct + From string + Reason string + To string + Type string + type DependencyGraphOutput struct + Edges []DependencyEdgeOutput + type ExecutiveSummary struct + CrownJewelsAtRisk int + FindingsNew int + FindingsResolved int + FindingsTotal int + MTTRCriticalHrs float64 + MTTRHighHrs float64 + P0Open int + P0Resolved int + P1Open int + P1Resolved int + Period string + RegressionCount int + RegressionRatePct float64 + RiskScoreChange float64 + RiskScoreCurrent float64 + SLABreached int + SLACompliancePct float64 + TopRisks []TopRisk + type FindingStatsData struct + AverageCVSS float64 + BySeverity map[string]int + ByStatus map[string]int + Overdue int + Total int + type FindingTrendPoint struct + Critical int + Date string + High int + Info int + Low int + Medium int + type GetTenantEnabledModulesOutput struct + ModuleIDs []string + Modules []*moduledom.Module + SubModules map[string][]*moduledom.Module + type MTTRAnalytics struct + ByPriorityClass map[string]float64 + BySeverity map[string]float64 + Overall float64 + SampleSize int + type ModulePresetOutput struct + Description string + ID string + Icon string + KeyOutcomes []string + ModuleCount int + Name string + RecommendedFor []string + TargetPersona string + type ModuleRefOutput struct + ModuleID string + Name string + type ModuleRepository interface + GetModuleByID func(ctx context.Context, id string) (*moduledom.Module, error) + GetSubModules func(ctx context.Context, parentModuleID string) ([]*moduledom.Module, error) + ListActiveModules func(ctx context.Context) ([]*moduledom.Module, error) + ListAllModules func(ctx context.Context) ([]*moduledom.Module, error) + ListAllSubModules func(ctx context.Context) (map[string][]*moduledom.Module, error) + type ModuleService struct + func NewModuleService(moduleRepo ModuleRepository, log *logger.Logger) *ModuleService + func (s *ModuleService) ApplyPreset(ctx context.Context, tenantID, presetID string, actx auditapp.AuditContext) (*TenantModuleConfigOutput, error) + func (s *ModuleService) GetDependencyGraph(_ context.Context) *DependencyGraphOutput + func (s *ModuleService) GetModule(ctx context.Context, moduleID string) (*moduledom.Module, error) + func (s *ModuleService) GetTenantEnabledModules(ctx context.Context, tenantID string) (*GetTenantEnabledModulesOutput, error) + func (s *ModuleService) GetTenantModuleConfig(ctx context.Context, tenantID string) (*TenantModuleConfigOutput, error) + func (s *ModuleService) GetTenantModuleVersion(ctx context.Context, tenantID string) int + func (s *ModuleService) ListActiveModules(ctx context.Context) ([]*moduledom.Module, error) + func (s *ModuleService) ListModulePresets(_ context.Context) []ModulePresetOutput + func (s *ModuleService) PreviewPreset(ctx context.Context, tenantID, presetID string) (*PresetDiffOutput, error) + func (s *ModuleService) ResetTenantModules(ctx context.Context, tenantID string, actx auditapp.AuditContext) (*TenantModuleConfigOutput, error) + func (s *ModuleService) SetAuditService(svc *auditapp.AuditService) + func (s *ModuleService) SetTenantModuleRepo(repo TenantModuleRepository) + func (s *ModuleService) SetVersionService(v *VersionService) + func (s *ModuleService) SetWSBroadcaster(b WSBroadcaster) + func (s *ModuleService) UpdateTenantModules(ctx context.Context, tenantID string, updates []moduledom.TenantModuleUpdate, ...) (*TenantModuleConfigOutput, error) + func (s *ModuleService) ValidateToggle(ctx context.Context, tenantID string, updates []moduledom.TenantModuleUpdate) (*ValidationIssues, error) + type PresetDiffOutput struct + AuditNotice string + PresetID string + PresetName string + ToDisable []ModuleRefOutput + ToEnable []ModuleRefOutput + TotalAfter int + Unchanged int + type ProcessMetrics struct + ApprovalAvgHours float64 + ApprovalCount int + AvgTimeToAssignHours float64 + FindingsWithoutOwner int + RetestAvgHours float64 + RetestCount int + StaleAssets int + StaleAssetsPct float64 + type ReportScheduleService struct + func NewReportScheduleService(repo reportscheduledom.Repository, log *logger.Logger) *ReportScheduleService + func (s *ReportScheduleService) CreateSchedule(ctx context.Context, input CreateReportScheduleInput) (*reportscheduledom.ReportSchedule, error) + func (s *ReportScheduleService) DeleteSchedule(ctx context.Context, tenantID, scheduleID string) error + func (s *ReportScheduleService) GetSchedule(ctx context.Context, tenantID, scheduleID string) (*reportscheduledom.ReportSchedule, error) + func (s *ReportScheduleService) ListSchedules(ctx context.Context, tenantID string, page pagination.Pagination) (pagination.Result[*reportscheduledom.ReportSchedule], error) + func (s *ReportScheduleService) ToggleSchedule(ctx context.Context, tenantID, scheduleID string, active bool) error + type RepositoryStatsData struct + Total int + WithFindings int + type RiskTrendPoint struct + Date string + FindingsOpen int + P0Open int + P1Open int + P2Open int + P3Open int + RiskScoreAvg float64 + SLACompliancePct float64 + type RiskVelocityPoint struct + NewCount int + ResolvedCount int + Velocity int + Week time.Time + type SubModuleInfo struct + IsEnabled bool + Module *moduledom.Module + type TenantModuleConfigOutput struct + Modules []*TenantModuleInfo + Summary TenantModuleSummary + Warnings []ToggleIssue + type TenantModuleInfo struct + IsEnabled bool + Module *moduledom.Module + SubModules []*SubModuleInfo + type TenantModuleRepository interface + DeleteByTenant func(ctx context.Context, tenantID shared.ID) error + ListByTenant func(ctx context.Context, tenantID shared.ID) ([]*moduledom.TenantModuleOverride, error) + UpsertBatch func(ctx context.Context, tenantID shared.ID, ...) error + type TenantModuleSummary struct + Core int + Disabled int + Enabled int + Total int + type ToggleError struct + Action string + Blockers []ToggleIssue + ModuleID string + ModuleName string + Required []ToggleIssue + func (e *ToggleError) Error() string + func (e *ToggleError) Unwrap() error + type ToggleIssue struct + ModuleID string + Name string + Reason string + type TopRisk struct + AssetName string + EPSSScore *float64 + FindingTitle string + IsInKEV bool + PriorityClass string + Severity string + type ValidationIssues struct + Blockers []ToggleIssue + Required []ToggleIssue + Warnings []ToggleIssue + type VersionService struct + func NewVersionService(redisClient *redis.Client, log *logger.Logger) *VersionService + func (s *VersionService) Get(ctx context.Context, tenantID string) int + func (s *VersionService) Increment(ctx context.Context, tenantID string) int + type WSBroadcaster interface + Broadcast func(channel string, event any)