Versions in this module Expand all Collapse all v0 v0.2.0 Apr 23, 2026 Changes in this version + type AttachmentService struct + func NewAttachmentService(repo attachmentdom.Repository, storage attachmentdom.FileStorage, ...) *AttachmentService + func (s *AttachmentService) Delete(ctx context.Context, tenantID, attachmentID string) error + func (s *AttachmentService) Download(ctx context.Context, tenantID, attachmentID string) (io.ReadCloser, string, string, error) + func (s *AttachmentService) GetByID(ctx context.Context, tenantID, attachmentID string) (*attachmentdom.Attachment, error) + func (s *AttachmentService) LinkToContext(ctx context.Context, tenantID, uploaderID string, attachmentIDs []string, ...) (int64, error) + func (s *AttachmentService) ListByContext(ctx context.Context, tenantID shared.ID, contextType, contextID string) ([]*attachmentdom.Attachment, error) + func (s *AttachmentService) SetTenantStorageResolver(resolver TenantStorageResolver, factory StorageFactory) + func (s *AttachmentService) Upload(ctx context.Context, input UploadInput) (*attachmentdom.Attachment, error) + type BroadcastNotificationInput struct + Body string + EventType integrationdom.EventType + Fields map[string]string + Severity string + TenantID string + Title string + URL string + type CreateCredentialInput struct + CredentialType secretstore.CredentialType + Data any + Description string + ExpiresAt *time.Time + Name string + TenantID shared.ID + UserID shared.ID + type CreateIntegrationInput struct + AuthType string + BaseURL string + Category string + Credentials string + Description string + Name string + Provider string + SCMOrganization string + TenantID string + type CreateNotificationIntegrationInput struct + AuthType string + ChannelID string + ChannelName string + Credentials string + Description string + EnabledEventTypes []string + EnabledSeverities []string + IncludeDetails bool + MessageTemplate string + MinIntervalMinutes int + Name string + Provider string + TenantID string + type CreateWebhookInput struct + CreatedBy string + Description string + EventTypes []string + MaxRetries int + Name string + RetryInterval int + Secret string + SeverityThreshold string + TenantID string + URL string + type CredentialImportService struct + func NewCredentialImportService(exposureRepo exposure.Repository, historyRepo exposure.StateHistoryRepository, ...) *CredentialImportService + func (s *CredentialImportService) AcceptCredential(ctx context.Context, tenantID, credentialID, userID, notes string) (*CredentialItem, error) + func (s *CredentialImportService) GetByID(ctx context.Context, tenantID, id string) (*CredentialItem, error) + func (s *CredentialImportService) GetCredentialStats(ctx context.Context, tenantID string) (map[string]any, error) + func (s *CredentialImportService) GetExposuresForIdentity(ctx context.Context, tenantID string, identity string, page, pageSize int) (*CredentialListResult, error) + func (s *CredentialImportService) GetRelatedCredentials(ctx context.Context, tenantID string, credentialID string) ([]CredentialItem, error) + func (s *CredentialImportService) Import(ctx context.Context, tenantID string, req credential.ImportRequest) (*credential.ImportResult, error) + func (s *CredentialImportService) ImportCSV(ctx context.Context, tenantID string, records [][]string, ...) (*credential.ImportResult, error) + func (s *CredentialImportService) List(ctx context.Context, tenantID string, opts CredentialListOptions, ...) (*CredentialListResult, error) + func (s *CredentialImportService) ListByIdentity(ctx context.Context, tenantID string, opts CredentialListOptions, ...) (*IdentityListResult, error) + func (s *CredentialImportService) MarkCredentialFalsePositive(ctx context.Context, tenantID, credentialID, userID, notes string) (*CredentialItem, error) + func (s *CredentialImportService) ReactivateCredential(ctx context.Context, tenantID, credentialID string) (*CredentialItem, error) + func (s *CredentialImportService) ResolveCredential(ctx context.Context, tenantID, credentialID, userID, notes string) (*CredentialItem, error) + type CredentialItem struct + CredentialType string + Details map[string]any + FirstSeenAt time.Time + ID string + Identifier string + IsRevoked bool + IsVerified bool + LastSeenAt time.Time + SecretValue string + Severity string + Source string + State string + type CredentialListOptions struct + Search string + Severities []string + SortField string + SortOrder string + Sources []string + States []string + type CredentialListResult struct + Items []CredentialItem + Page int + PageSize int + Total int64 + TotalPages int + type EmailCredentials struct + FromEmail string + FromName string + Password string + ReplyTo string + SMTPHost string + SMTPPort int + SkipVerify bool + ToEmails []string + UseSTARTTLS bool + UseTLS bool + Username string + type EmailMetadata struct + FromEmail string + FromName string + ReplyTo string + SMTPHost string + SMTPPort int + SkipVerify bool + ToEmails []string + UseSTARTTLS bool + UseTLS bool + type EmailSensitiveCredentials struct + Password string + Username string + type FindSCMIntegrationInput struct + Provider string + SCMOrg string + TenantID string + type GetNotificationEventsInput struct + IntegrationID string + Limit int + Offset int + TenantID string + type GetNotificationEventsResult struct + Data []NotificationEventEntry + Limit int + Offset int + Total int64 + type GetSCMRepositoryInput struct + FullName string + IntegrationID string + TenantID string + type IdentityExposure struct + CredentialTypes []string + ExposureCount int + FirstSeenAt time.Time + HighestSeverity string + Identity string + IdentityType string + LastSeenAt time.Time + Sources []string + States map[string]int + type IdentityListResult struct + Items []IdentityExposure + Page int + PageSize int + Total int64 + TotalPages int + type IntegrationListReposInput struct + IntegrationID string + Page int + PerPage int + Search string + TenantID string + type IntegrationListReposResult struct + HasMore bool + NextPage int + Repositories []scm.Repository + Total int + type IntegrationService struct + func NewIntegrationService(repo integrationdom.Repository, ...) *IntegrationService + func (s *IntegrationService) BroadcastNotification(ctx context.Context, input BroadcastNotificationInput) ([]SendNotificationResult, error) + func (s *IntegrationService) CreateIntegration(ctx context.Context, input CreateIntegrationInput) (*integrationdom.IntegrationWithSCM, error) + func (s *IntegrationService) CreateNotificationIntegration(ctx context.Context, input CreateNotificationIntegrationInput) (*integrationdom.IntegrationWithNotification, error) + func (s *IntegrationService) DeleteIntegration(ctx context.Context, id string, tenantID string) error + func (s *IntegrationService) DisableIntegration(ctx context.Context, id string, tenantID string) (*integrationdom.Integration, error) + func (s *IntegrationService) EnableIntegration(ctx context.Context, id string, tenantID string) (*integrationdom.IntegrationWithSCM, error) + func (s *IntegrationService) FindSCMIntegration(ctx context.Context, input FindSCMIntegrationInput) (*integrationdom.IntegrationWithSCM, error) + func (s *IntegrationService) GetIntegration(ctx context.Context, id string) (*integrationdom.Integration, error) + func (s *IntegrationService) GetIntegrationWithSCM(ctx context.Context, id string) (*integrationdom.IntegrationWithSCM, error) + func (s *IntegrationService) GetNotificationEvents(ctx context.Context, input GetNotificationEventsInput) (*GetNotificationEventsResult, error) + func (s *IntegrationService) GetNotificationIntegration(ctx context.Context, id string, tenantID string) (*integrationdom.IntegrationWithNotification, error) + func (s *IntegrationService) GetSCMRepository(ctx context.Context, input GetSCMRepositoryInput) (*scm.Repository, error) + func (s *IntegrationService) ListIntegrations(ctx context.Context, input ListIntegrationsInput) (integrationdom.ListResult, error) + func (s *IntegrationService) ListNotificationIntegrations(ctx context.Context, tenantID string) ([]*integrationdom.IntegrationWithNotification, error) + func (s *IntegrationService) ListSCMIntegrations(ctx context.Context, tenantID string) ([]*integrationdom.IntegrationWithSCM, error) + func (s *IntegrationService) ListSCMRepositories(ctx context.Context, input IntegrationListReposInput) (*IntegrationListReposResult, error) + func (s *IntegrationService) NotifyNewFinding(tenantID, title, body, severity, url string) + func (s *IntegrationService) SendNotification(ctx context.Context, input SendNotificationInput) (*SendNotificationResult, error) + func (s *IntegrationService) SetNotificationExtensionRepository(repo integrationdom.NotificationExtensionRepository) + func (s *IntegrationService) SetOutboxEventRepository(repo outbox.EventRepository) + func (s *IntegrationService) SyncIntegration(ctx context.Context, id string, tenantID string) (*integrationdom.IntegrationWithSCM, error) + func (s *IntegrationService) TestIntegration(ctx context.Context, id string, tenantID string) (*integrationdom.IntegrationWithSCM, error) + func (s *IntegrationService) TestIntegrationCredentials(ctx context.Context, input TestIntegrationCredentialsInput) (*TestIntegrationCredentialsResult, error) + func (s *IntegrationService) TestNotificationIntegration(ctx context.Context, id string, tenantID string) (*integrationdom.IntegrationWithNotification, error) + func (s *IntegrationService) UpdateIntegration(ctx context.Context, id string, tenantID string, input UpdateIntegrationInput) (*integrationdom.IntegrationWithSCM, error) + func (s *IntegrationService) UpdateNotificationIntegration(ctx context.Context, id string, tenantID string, ...) (*integrationdom.IntegrationWithNotification, error) + type ListCredentialsInput struct + CredentialType *string + Page int + PageSize int + SortBy string + SortOrder string + TenantID shared.ID + type ListCredentialsOutput struct + Items []*secretstore.Credential + TotalCount int + type ListDeliveriesInput struct + Page int + PerPage int + Status string + TenantID string + WebhookID string + type ListIntegrationsInput struct + Category string + Page int + PerPage int + Provider string + Search string + SortBy string + SortOrder string + Status string + TenantID string + type ListWebhooksInput struct + EventType string + Page int + PerPage int + Search string + SortBy string + SortOrder string + Status string + TenantID string + type NotificationEventEntry struct + AggregateID string + AggregateType string + Body string + CreatedAt time.Time + EventType string + ID string + IntegrationsFailed int + IntegrationsMatched int + IntegrationsSucceeded int + IntegrationsTotal int + LastError string + ProcessedAt time.Time + RetryCount int + SendResults []NotificationEventSendResult + Severity string + Status string + Title string + URL string + type NotificationEventSendResult struct + Error string + IntegrationID string + IntegrationName string + MessageID string + Provider string + SentAt time.Time + Status string + type NotificationService struct + func NewNotificationService(repo notificationdom.Repository, wsHub WebSocketBroadcaster, ...) *NotificationService + func (s *NotificationService) CleanupOld(ctx context.Context, retentionDays int) (int64, error) + func (s *NotificationService) GetPreferences(ctx context.Context, tenantID, userID shared.ID) (*notificationdom.Preferences, error) + func (s *NotificationService) GetUnreadCount(ctx context.Context, tenantID, userID shared.ID) (int, error) + func (s *NotificationService) ListNotifications(ctx context.Context, tenantID, userID shared.ID, ...) (pagination.Result[*notificationdom.Notification], error) + func (s *NotificationService) MarkAllAsRead(ctx context.Context, tenantID, userID shared.ID) error + func (s *NotificationService) MarkAsRead(ctx context.Context, tenantID shared.ID, notificationID notificationdom.ID, ...) error + func (s *NotificationService) Notify(ctx context.Context, params notificationdom.NotificationParams) error + func (s *NotificationService) UpdatePreferences(ctx context.Context, tenantID, userID shared.ID, input UpdatePreferencesInput) (*notificationdom.Preferences, error) + type SecretStoreService struct + func NewSecretStoreService(repo secretstore.Repository, encryptionKey []byte, ...) (*SecretStoreService, error) + func (s *SecretStoreService) CreateCredential(ctx context.Context, input CreateCredentialInput) (*secretstore.Credential, error) + func (s *SecretStoreService) DecryptCredentialData(ctx context.Context, tenantID shared.ID, credentialID string) (any, error) + func (s *SecretStoreService) DeleteCredential(ctx context.Context, tenantID shared.ID, credentialID string) error + func (s *SecretStoreService) GetCredential(ctx context.Context, tenantID shared.ID, credentialID string) (*secretstore.Credential, error) + func (s *SecretStoreService) ListCredentials(ctx context.Context, input ListCredentialsInput) (*ListCredentialsOutput, error) + func (s *SecretStoreService) RotateCredential(ctx context.Context, tenantID shared.ID, credentialID string, newData any) (*secretstore.Credential, error) + func (s *SecretStoreService) UpdateCredential(ctx context.Context, input UpdateCredentialInput) (*secretstore.Credential, error) + type SendNotificationInput struct + Body string + Fields map[string]string + IntegrationID string + Severity string + TenantID string + Title string + URL string + type SendNotificationResult struct + Error string + MessageID string + Success bool + type StorageFactory func(cfg attachmentdom.StorageConfig) (attachmentdom.FileStorage, error) + type TelegramCredentials struct + BotToken string + ChatID string + type TenantStorageResolver interface + GetTenantStorageConfig func(ctx context.Context, tenantID string) (*attachmentdom.StorageConfig, error) + type TestIntegrationCredentialsInput struct + AuthType string + BaseURL string + Category string + Credentials string + Provider string + SCMOrganization string + type TestIntegrationCredentialsResult struct + Message string + Organization string + RepoCount int + Success bool + Username string + type UpdateCredentialInput struct + CredentialID string + Data any + Description string + ExpiresAt *time.Time + Name string + TenantID shared.ID + type UpdateIntegrationInput struct + BaseURL *string + Credentials *string + Description *string + Name *string + SCMOrganization *string + type UpdateNotificationIntegrationInput struct + ChannelID *string + ChannelName *string + Credentials *string + Description *string + EnabledEventTypes []string + EnabledSeverities []string + IncludeDetails *bool + MessageTemplate *string + MinIntervalMinutes *int + Name *string + type UpdatePreferencesInput struct + EmailDigest *string + InAppEnabled *bool + MinSeverity *string + MutedTypes []string + type UpdateWebhookInput struct + Description *string + EventTypes []string + MaxRetries *int + Name *string + RetryInterval *int + Secret *string + SeverityThreshold *string + URL *string + type UploadInput struct + ContentType string + ContextID string + ContextType string + Filename string + Reader io.Reader + Size int64 + TenantID string + UploadedBy string + type WebSocketBroadcaster interface + BroadcastEvent func(channel string, data any, tenantID string) + type WebhookService struct + func NewWebhookService(repo webhookdom.Repository, encryptor crypto.Encryptor, log *logger.Logger) *WebhookService + func (s *WebhookService) CreateWebhook(ctx context.Context, input CreateWebhookInput) (*webhookdom.Webhook, error) + func (s *WebhookService) DeleteWebhook(ctx context.Context, id, tenantIDStr string) error + func (s *WebhookService) DisableWebhook(ctx context.Context, id, tenantIDStr string) (*webhookdom.Webhook, error) + func (s *WebhookService) EnableWebhook(ctx context.Context, id, tenantIDStr string) (*webhookdom.Webhook, error) + func (s *WebhookService) GetWebhook(ctx context.Context, id, tenantIDStr string) (*webhookdom.Webhook, error) + func (s *WebhookService) ListDeliveries(ctx context.Context, input ListDeliveriesInput) (webhookdom.DeliveryListResult, error) + func (s *WebhookService) ListWebhooks(ctx context.Context, input ListWebhooksInput) (webhookdom.ListResult, error) + func (s *WebhookService) UpdateWebhook(ctx context.Context, id, tenantIDStr string, input UpdateWebhookInput) (*webhookdom.Webhook, error)