Versions in this module Expand all Collapse all v0 v0.2.0 Apr 23, 2026 Changes in this version + type CreateExclusionInput struct + CreatedBy string + ExclusionType string + ExpiresAt *time.Time + Pattern string + Reason string + TenantID string + type CreateRuleInput struct + Description string + GroupID string + MatchAssetGroupIDs []string + MatchLogic string + MatchTags []string + Name string + OwnershipType string + Priority int + RuleType string + TenantID string + type CreateScheduleInput struct + CreatedBy string + CronExpression string + Description string + IntervalHours int + Name string + NotificationChannels []string + NotifyOnCompletion bool + NotifyOnFindings bool + ScanType string + ScannerConfigs map[string]interface{} + ScheduleType string + TargetIDs []string + TargetScope string + TargetTags []string + TenantID string + type CreateTargetInput struct + CreatedBy string + Description string + Pattern string + Priority int + Tags []string + TargetType string + TenantID string + type ListExclusionsInput struct + ExclusionTypes []string + IsApproved *bool + Page int + PerPage int + Search string + Statuses []string + TenantID string + type ListSchedulesInput struct + Enabled *bool + Page int + PerPage int + ScanTypes []string + ScheduleTypes []string + Search string + TenantID string + type ListTargetsInput struct + Page int + PerPage int + Search string + Statuses []string + Tags []string + TargetTypes []string + TenantID string + type PreviewScopeRuleResult struct + AlreadyAssigned int + MatchingAssets int + RuleID string + RuleName string + WouldAdd int + type ReconcileGroupResult struct + AssetsAdded int + AssetsRemoved int + RulesEvaluated int + type RuleBroadcaster interface + BroadcastScopeChange func(channel string, data any, tenantID string) + type RuleEvaluatorFunc func(ctx context.Context, tenantID, assetID shared.ID, tags []string, ...) error + type RuleGroupReconcilerFunc func(ctx context.Context, assetGroupID shared.ID) + type RuleService struct + func NewRuleService(acRepo accesscontrol.Repository, groupRepo group.Repository, ...) *RuleService + func (s *RuleService) CreateRule(ctx context.Context, input CreateRuleInput, createdBy string) (*accesscontrol.ScopeRule, error) + func (s *RuleService) DeleteRule(ctx context.Context, tenantID, ruleID string) error + func (s *RuleService) EvaluateAsset(ctx context.Context, tenantID shared.ID, assetID shared.ID, tags []string, ...) error + func (s *RuleService) GetRule(ctx context.Context, tenantID, ruleID string) (*accesscontrol.ScopeRule, error) + func (s *RuleService) ListRules(ctx context.Context, tenantID, groupID string, ...) ([]*accesscontrol.ScopeRule, int64, error) + func (s *RuleService) PreviewScopeRule(ctx context.Context, tenantID, ruleID string) (*PreviewScopeRuleResult, error) + func (s *RuleService) ReconcileByAssetGroup(ctx context.Context, assetGroupID shared.ID) + func (s *RuleService) ReconcileGroup(ctx context.Context, tenantID, groupID string) (*ReconcileGroupResult, error) + func (s *RuleService) ReconcileGroupByIDs(ctx context.Context, tenantID, groupID shared.ID) error + func (s *RuleService) SetAssetGroupValidator(v assetGroupValidator) + func (s *RuleService) SetBroadcaster(b RuleBroadcaster) + func (s *RuleService) UpdateRule(ctx context.Context, tenantID, ruleID string, input UpdateRuleInput) (*accesscontrol.ScopeRule, error) + type Service struct + func NewService(targetRepo scopedom.TargetRepository, ...) *Service + func (s *Service) ActivateExclusion(ctx context.Context, exclusionID string, tenantID string) (*scopedom.Exclusion, error) + func (s *Service) ActivateTarget(ctx context.Context, targetID string, tenantID string) (*scopedom.Target, error) + func (s *Service) ApproveExclusion(ctx context.Context, exclusionID string, tenantID string, approvedBy string) (*scopedom.Exclusion, error) + func (s *Service) CheckPatternOverlaps(ctx context.Context, tenantID string, targetType string, pattern string) ([]string, error) + func (s *Service) CheckScope(ctx context.Context, tenantID string, assetType string, value string) (*scopedom.MatchResult, error) + func (s *Service) CreateExclusion(ctx context.Context, input CreateExclusionInput) (*scopedom.Exclusion, error) + func (s *Service) CreateSchedule(ctx context.Context, input CreateScheduleInput) (*scopedom.Schedule, error) + func (s *Service) CreateTarget(ctx context.Context, input CreateTargetInput) (*scopedom.Target, error) + func (s *Service) DeactivateExclusion(ctx context.Context, exclusionID string, tenantID string) (*scopedom.Exclusion, error) + func (s *Service) DeactivateTarget(ctx context.Context, targetID string, tenantID string) (*scopedom.Target, error) + func (s *Service) DeleteExclusion(ctx context.Context, exclusionID string, tenantID string) error + func (s *Service) DeleteSchedule(ctx context.Context, scheduleID string, tenantID string) error + func (s *Service) DeleteTarget(ctx context.Context, targetID string, tenantID string) error + func (s *Service) DisableSchedule(ctx context.Context, scheduleID string, tenantID string) (*scopedom.Schedule, error) + func (s *Service) EnableSchedule(ctx context.Context, scheduleID string, tenantID string) (*scopedom.Schedule, error) + func (s *Service) ExpireOldExclusions(ctx context.Context) error + func (s *Service) GetExclusion(ctx context.Context, tenantID string, exclusionID string) (*scopedom.Exclusion, error) + func (s *Service) GetSchedule(ctx context.Context, tenantID string, scheduleID string) (*scopedom.Schedule, error) + func (s *Service) GetStats(ctx context.Context, tenantID string) (*scopedom.Stats, error) + func (s *Service) GetTarget(ctx context.Context, tenantID string, targetID string) (*scopedom.Target, error) + func (s *Service) ListActiveExclusions(ctx context.Context, tenantID string) ([]*scopedom.Exclusion, error) + func (s *Service) ListActiveTargets(ctx context.Context, tenantID string) ([]*scopedom.Target, error) + func (s *Service) ListDueSchedules(ctx context.Context) ([]*scopedom.Schedule, error) + func (s *Service) ListExclusions(ctx context.Context, input ListExclusionsInput) (pagination.Result[*scopedom.Exclusion], error) + func (s *Service) ListSchedules(ctx context.Context, input ListSchedulesInput) (pagination.Result[*scopedom.Schedule], error) + func (s *Service) ListTargets(ctx context.Context, input ListTargetsInput) (pagination.Result[*scopedom.Target], error) + func (s *Service) RecordScheduleRun(ctx context.Context, tenantID string, scheduleID string, status string, ...) (*scopedom.Schedule, error) + func (s *Service) RunScheduleNow(ctx context.Context, scheduleID string, tenantID string) (*scopedom.Schedule, error) + func (s *Service) UpdateExclusion(ctx context.Context, exclusionID string, tenantID string, ...) (*scopedom.Exclusion, error) + func (s *Service) UpdateSchedule(ctx context.Context, scheduleID string, tenantID string, ...) (*scopedom.Schedule, error) + func (s *Service) UpdateTarget(ctx context.Context, targetID string, tenantID string, input UpdateTargetInput) (*scopedom.Target, error) + type UpdateExclusionInput struct + ExpiresAt *time.Time + Reason *string + type UpdateRuleInput struct + Description *string + IsActive *bool + MatchAssetGroupIDs []string + MatchLogic *string + MatchTags []string + Name *string + OwnershipType *string + Priority *int + type UpdateScheduleInput struct + CronExpression *string + Description *string + IntervalHours *int + Name *string + NotificationChannels []string + NotifyOnCompletion *bool + NotifyOnFindings *bool + ScannerConfigs map[string]interface{} + ScheduleType *string + TargetIDs []string + TargetScope *string + TargetTags []string + type UpdateTargetInput struct + Description *string + Priority *int + Tags []string