Versions in this module Expand all Collapse all v0 v0.2.0 Apr 23, 2026 Changes in this version + const MaxSourcesPerTenant + func NewScanAdapter(syncer *Syncer) scan.TemplateSyncer + type CreateSourceInput struct + AutoSyncOnScan bool + CacheTTLMinutes int + CredentialID string + Description string + Enabled bool + GitConfig *ts.GitSourceConfig + HTTPConfig *ts.HTTPSourceConfig + Name string + S3Config *ts.S3SourceConfig + SourceType string + TemplateType string + TenantID string + UserID string + type GitleaksValidator struct + func (v *GitleaksValidator) CountRules(content []byte) int + func (v *GitleaksValidator) ExtractMetadata(content []byte) map[string]any + func (v *GitleaksValidator) Validate(content []byte) *ValidationResult + type ListSourcesInput struct + Enabled *bool + Page int + PageSize int + SortBy string + SortOrder string + SourceType *string + TemplateType *string + TenantID string + type NucleiValidator struct + func (v *NucleiValidator) CountRules(content []byte) int + func (v *NucleiValidator) ExtractMetadata(content []byte) map[string]any + func (v *NucleiValidator) Validate(content []byte) *ValidationResult + type SecretStoreDecryptor interface + DecryptCredentialData func(ctx context.Context, tenantID shared.ID, credentialID string) (any, error) + type SemgrepValidator struct + func (v *SemgrepValidator) CountRules(content []byte) int + func (v *SemgrepValidator) ExtractMetadata(content []byte) map[string]any + func (v *SemgrepValidator) Validate(content []byte) *ValidationResult + type SourceService struct + func NewSourceService(repo ts.Repository, log *logger.Logger) *SourceService + func (s *SourceService) CreateSource(ctx context.Context, input CreateSourceInput) (*ts.TemplateSource, error) + func (s *SourceService) DeleteSource(ctx context.Context, tenantID, sourceID string) error + func (s *SourceService) DisableSource(ctx context.Context, tenantID, sourceID string) (*ts.TemplateSource, error) + func (s *SourceService) EnableSource(ctx context.Context, tenantID, sourceID string) (*ts.TemplateSource, error) + func (s *SourceService) ForceSync(ctx context.Context, tenantID, sourceID string) (*SyncResult, error) + func (s *SourceService) GetSource(ctx context.Context, tenantID, sourceID string) (*ts.TemplateSource, error) + func (s *SourceService) GetSourcesForScan(ctx context.Context, tenantID string, ...) ([]*ts.TemplateSource, error) + func (s *SourceService) GetSourcesNeedingSync(ctx context.Context, tenantID string) ([]*ts.TemplateSource, error) + func (s *SourceService) ListSources(ctx context.Context, input ListSourcesInput) (*ts.ListOutput, error) + func (s *SourceService) SetTemplateSyncer(syncer *Syncer) + func (s *SourceService) UpdateSource(ctx context.Context, input UpdateSourceInput) (*ts.TemplateSource, error) + func (s *SourceService) UpdateSyncStatus(ctx context.Context, source *ts.TemplateSource) error + type SyncResult struct + Duration time.Duration + Error string + Hash string + SourceID shared.ID + Success bool + TemplatesAdded int + TemplatesFound int + type Syncer struct + func NewSyncer(sourceRepo templatesource.Repository, templateRepo scannertemplate.Repository, ...) *Syncer + func (s *Syncer) SyncSource(ctx context.Context, source *templatesource.TemplateSource) (*SyncResult, error) + func (s *Syncer) SyncSourcesForScan(ctx context.Context, tenantID shared.ID) ([]*SyncResult, error) + type TemplateValidator interface + CountRules func(content []byte) int + ExtractMetadata func(content []byte) map[string]any + Validate func(content []byte) *ValidationResult + func GetValidator(templateType scannertemplate.TemplateType) TemplateValidator + type UpdateSourceInput struct + AutoSyncOnScan *bool + CacheTTLMinutes *int + CredentialID *string + Description string + Enabled *bool + GitConfig *ts.GitSourceConfig + HTTPConfig *ts.HTTPSourceConfig + Name string + S3Config *ts.S3SourceConfig + SourceID string + TenantID string + type ValidationError struct + Code string + Field string + Message string + type ValidationResult struct + Errors []ValidationError + Metadata map[string]any + RuleCount int + Valid bool + func ValidateTemplate(templateType scannertemplate.TemplateType, content []byte) *ValidationResult + func (r *ValidationResult) AddError(field, message, code string) + func (r *ValidationResult) ErrorMessages() string + func (r *ValidationResult) HasErrors() bool