Versions in this module Expand all Collapse all v0 v0.2.0 Apr 23, 2026 Changes in this version type SCMExtension + func (s *SCMExtension) WebhookSecretEncrypted() []byte v0.1.9 Apr 15, 2026 v0.1.8 Apr 15, 2026 v0.1.7 Apr 15, 2026 v0.1.6 Apr 14, 2026 v0.1.5 Apr 9, 2026 v0.1.4 Apr 7, 2026 v0.1.3 Apr 7, 2026 v0.1.2 Mar 17, 2026 v0.1.1 Feb 12, 2026 v0.1.0 Feb 12, 2026 Changes in this version + const ModuleAssets + const ModuleFindings + const ModuleScans + var ErrConnectionFailed = fmt.Errorf("%w: connection test failed", shared.ErrValidation) + var ErrCredentialsInvalid = fmt.Errorf("%w: credentials are invalid", shared.ErrValidation) + var ErrCredentialsRequired = fmt.Errorf("%w: credentials are required", shared.ErrValidation) + var ErrIntegrationInUse = fmt.Errorf("%w: integration is in use", shared.ErrConflict) + var ErrIntegrationNameExists = fmt.Errorf("%w: integration name already exists", shared.ErrConflict) + var ErrIntegrationNotFound = fmt.Errorf("%w: integration not found", shared.ErrNotFound) + var ErrInvalidAuthType = fmt.Errorf("%w: invalid authentication type", shared.ErrValidation) + var ErrInvalidCategory = fmt.Errorf("%w: invalid integration category", shared.ErrValidation) + var ErrInvalidProvider = fmt.Errorf("%w: invalid integration provider", shared.ErrValidation) + var ErrInvalidStatus = fmt.Errorf("%w: invalid integration status", shared.ErrValidation) + var ErrNotificationExtensionNotFound = fmt.Errorf("%w: notification extension not found", shared.ErrNotFound) + var ErrProviderCategoryMismatch = fmt.Errorf("%w: provider does not match category", shared.ErrValidation) + var ErrSCMExtensionNotFound = fmt.Errorf("%w: SCM extension not found", shared.ErrNotFound) + func GetRequiredModuleForEventType(eventType EventType) string + type AuthType string + const AuthTypeAPIKey + const AuthTypeApp + const AuthTypeBasic + const AuthTypeIAMRole + const AuthTypeOAuth + const AuthTypeToken + func (a AuthType) IsValid() bool + func (a AuthType) String() string + type Category string + const CategoryCloud + const CategoryCustom + const CategoryNotification + const CategorySCM + const CategorySecurity + const CategoryTicketing + func (c Category) IsValid() bool + func (c Category) String() string + type EventCategory string + const EventCategoryAsset + const EventCategoryExposure + const EventCategoryFinding + const EventCategoryScan + const EventCategorySystem + type EventType string + const EventTypeAlerts + const EventTypeAssetChanged + const EventTypeAssetDeleted + const EventTypeExposureResolved + const EventTypeExposures + const EventTypeFindingConfirmed + const EventTypeFindingFixed + const EventTypeFindingReopened + const EventTypeFindingTriaged + const EventTypeFindings + const EventTypeNewAsset + const EventTypeNewExposure + const EventTypeNewFinding + const EventTypeScanCompleted + const EventTypeScanFailed + const EventTypeScanStarted + const EventTypeScans + const EventTypeSecurityAlert + const EventTypeSystemError + func AllKnownEventTypes() []EventType + func DefaultEnabledEventTypes() []EventType + func GetDefaultEventTypesByModules(enabledModuleIDs []string) []EventType + func MapLegacyEventType(eventType EventType) EventType + func ValidateEventTypes(eventTypes []EventType, enabledModuleIDs []string) (valid bool, invalidTypes []EventType) + type EventTypeInfo struct + Category EventCategory + Description string + Label string + RequiredModule string + Type EventType + func AllEventTypes() []EventTypeInfo + func GetEventTypesByModules(enabledModuleIDs []string) []EventTypeInfo + type Filter struct + Category *Category + Page int + PerPage int + Provider *Provider + Search string + SortBy string + SortOrder string + Status *Status + TenantID *ID + func NewFilter() Filter + type ID = shared.ID + func ParseID(s string) (ID, error) + type Integration struct + func NewIntegration(id ID, tenantID ID, name string, category Category, provider Provider, ...) *Integration + func Reconstruct(id ID, tenantID ID, name string, description string, category Category, ...) *Integration + func (i *Integration) AuthType() AuthType + func (i *Integration) BaseURL() string + func (i *Integration) Category() Category + func (i *Integration) Config() map[string]any + func (i *Integration) CreatedAt() time.Time + func (i *Integration) CreatedBy() *ID + func (i *Integration) CredentialsEncrypted() string + func (i *Integration) Description() string + func (i *Integration) ID() ID + func (i *Integration) IsConnected() bool + func (i *Integration) IsSCM() bool + func (i *Integration) LastSyncAt() *time.Time + func (i *Integration) Metadata() map[string]any + func (i *Integration) Name() string + func (i *Integration) NextSyncAt() *time.Time + func (i *Integration) Provider() Provider + func (i *Integration) SetBaseURL(baseURL string) + func (i *Integration) SetConfig(config map[string]any) + func (i *Integration) SetConnected() + func (i *Integration) SetCredentials(encrypted string) + func (i *Integration) SetDescription(description string) + func (i *Integration) SetDisconnected() + func (i *Integration) SetError(err string) + func (i *Integration) SetMetadata(metadata map[string]any) + func (i *Integration) SetName(name string) + func (i *Integration) SetStats(stats Stats) + func (i *Integration) SetStatus(status Status) + func (i *Integration) SetStatusMessage(message string) + func (i *Integration) SetSyncInterval(minutes int) + func (i *Integration) Stats() Stats + func (i *Integration) Status() Status + func (i *Integration) StatusMessage() string + func (i *Integration) SyncError() string + func (i *Integration) SyncIntervalMinutes() int + func (i *Integration) TenantID() ID + func (i *Integration) UpdateLastSync() + func (i *Integration) UpdatedAt() time.Time + type IntegrationWithNotification struct + Notification *NotificationExtension + func NewIntegrationWithNotification(integration *Integration, notification *NotificationExtension) *IntegrationWithNotification + type IntegrationWithSCM struct + SCM *SCMExtension + func NewIntegrationWithSCM(integration *Integration, scm *SCMExtension) *IntegrationWithSCM + type ListResult struct + Data []*Integration + Page int + PerPage int + Total int64 + TotalPages int + type NotificationExtension struct + func NewNotificationExtension(integrationID ID) *NotificationExtension + func ReconstructNotificationExtension(integrationID ID, _ string, _ string, enabledSeverities []Severity, ...) *NotificationExtension + func ReconstructNotificationExtensionFromBooleans(integrationID ID, _ string, _ string, notifyOnCritical bool, notifyOnHigh bool, ...) *NotificationExtension + func (n *NotificationExtension) ChannelID() string + func (n *NotificationExtension) ChannelName() string + func (n *NotificationExtension) EnabledEventTypes() []EventType + func (n *NotificationExtension) EnabledSeverities() []Severity + func (n *NotificationExtension) IncludeDetails() bool + func (n *NotificationExtension) IntegrationID() ID + func (n *NotificationExtension) IsEventTypeEnabled(eventType EventType) bool + func (n *NotificationExtension) IsSeverityEnabled(severity Severity) bool + func (n *NotificationExtension) MessageTemplate() string + func (n *NotificationExtension) MinIntervalMinutes() int + func (n *NotificationExtension) NotifyOnCritical() bool + func (n *NotificationExtension) NotifyOnHigh() bool + func (n *NotificationExtension) NotifyOnLow() bool + func (n *NotificationExtension) NotifyOnMedium() bool + func (n *NotificationExtension) SetChannel(_, _ string) + func (n *NotificationExtension) SetEnabledEventTypes(types []EventType) + func (n *NotificationExtension) SetEnabledSeverities(severities []Severity) + func (n *NotificationExtension) SetIncludeDetails(include bool) + func (n *NotificationExtension) SetMessageTemplate(template string) + func (n *NotificationExtension) SetMinIntervalMinutes(minutes int) + func (n *NotificationExtension) SetNotifyOnCritical(notify bool) + func (n *NotificationExtension) SetNotifyOnHigh(notify bool) + func (n *NotificationExtension) SetNotifyOnLow(notify bool) + func (n *NotificationExtension) SetNotifyOnMedium(notify bool) + func (n *NotificationExtension) ShouldNotify(severity string) bool + func (n *NotificationExtension) ShouldNotifyEventType(eventType EventType) bool + type NotificationExtensionRepository interface + Create func(ctx context.Context, ext *NotificationExtension) error + Delete func(ctx context.Context, integrationID ID) error + GetByIntegrationID func(ctx context.Context, integrationID ID) (*NotificationExtension, error) + GetIntegrationWithNotification func(ctx context.Context, id ID) (*IntegrationWithNotification, error) + ListIntegrationsWithNotification func(ctx context.Context, tenantID ID) ([]*IntegrationWithNotification, error) + Update func(ctx context.Context, ext *NotificationExtension) error + type Provider string + const ProviderAWS + const ProviderAsana + const ProviderAzure + const ProviderAzureDevOps + const ProviderBitbucket + const ProviderCrowdStrike + const ProviderEmail + const ProviderGCP + const ProviderGitHub + const ProviderGitLab + const ProviderJira + const ProviderLinear + const ProviderSlack + const ProviderSnyk + const ProviderTeams + const ProviderTelegram + const ProviderTenable + const ProviderWebhook + const ProviderWiz + func (p Provider) Category() Category + func (p Provider) IsValid() bool + func (p Provider) String() string + type Repository interface + Count func(ctx context.Context, filter Filter) (int64, error) + Create func(ctx context.Context, i *Integration) error + Delete func(ctx context.Context, id ID) error + GetByID func(ctx context.Context, id ID) (*Integration, error) + GetByTenantAndName func(ctx context.Context, tenantID ID, name string) (*Integration, error) + List func(ctx context.Context, filter Filter) (ListResult, error) + ListByCategory func(ctx context.Context, tenantID ID, category Category) ([]*Integration, error) + ListByProvider func(ctx context.Context, tenantID ID, provider Provider) ([]*Integration, error) + ListByTenant func(ctx context.Context, tenantID ID) ([]*Integration, error) + Update func(ctx context.Context, i *Integration) error + type SCMExtension struct + func NewSCMExtension(integrationID ID) *SCMExtension + func ReconstructSCMExtension(integrationID ID, scmOrganization string, repositoryCount int, ...) *SCMExtension + func (s *SCMExtension) AutoImportRepos() bool + func (s *SCMExtension) DefaultBranchPattern() string + func (s *SCMExtension) ExcludePatterns() []string + func (s *SCMExtension) ImportArchivedRepos() bool + func (s *SCMExtension) ImportPrivateRepos() bool + func (s *SCMExtension) IncludePatterns() []string + func (s *SCMExtension) IntegrationID() ID + func (s *SCMExtension) LastRepoSyncAt() *time.Time + func (s *SCMExtension) RepositoryCount() int + func (s *SCMExtension) SCMOrganization() string + func (s *SCMExtension) SetAutoImportRepos(auto bool) + func (s *SCMExtension) SetDefaultBranchPattern(pattern string) + func (s *SCMExtension) SetExcludePatterns(patterns []string) + func (s *SCMExtension) SetImportArchivedRepos(archived bool) + func (s *SCMExtension) SetImportPrivateRepos(private bool) + func (s *SCMExtension) SetIncludePatterns(patterns []string) + func (s *SCMExtension) SetRepositoryCount(count int) + func (s *SCMExtension) SetSCMOrganization(org string) + func (s *SCMExtension) SetWebhook(id, secret, url string) + func (s *SCMExtension) UpdateLastRepoSync() + func (s *SCMExtension) WebhookID() string + func (s *SCMExtension) WebhookSecret() string + func (s *SCMExtension) WebhookURL() string + type SCMExtensionRepository interface + Create func(ctx context.Context, ext *SCMExtension) error + Delete func(ctx context.Context, integrationID ID) error + GetByIntegrationID func(ctx context.Context, integrationID ID) (*SCMExtension, error) + GetIntegrationWithSCM func(ctx context.Context, id ID) (*IntegrationWithSCM, error) + ListIntegrationsWithSCM func(ctx context.Context, tenantID ID) ([]*IntegrationWithSCM, error) + Update func(ctx context.Context, ext *SCMExtension) error + type Severity string + const SeverityCritical + const SeverityHigh + const SeverityInfo + const SeverityLow + const SeverityMedium + const SeverityNone + func AllKnownSeverities() []Severity + func DefaultEnabledSeverities() []Severity + type Stats struct + TotalAssets int + TotalFindings int + TotalRepositories int + type Status string + const StatusConnected + const StatusDisabled + const StatusDisconnected + const StatusError + const StatusExpired + const StatusPending + func (s Status) IsValid() bool + func (s Status) String() string