Documentation ¶
Index ¶
- Constants
- Variables
- func AddCloudControls(ctx context.Context, task *asynq.Task) error
- func AsynqDeleteAllArchivedTasks(ctx context.Context, task *asynq.Task) error
- func CachePostureProviders(ctx context.Context, task *asynq.Task) error
- func CheckAgentUpgrade(ctx context.Context, task *asynq.Task) error
- func CheckCloudScannerAgentUpgrade(ctx context.Context, task *asynq.Task) error
- func CleanUpDB(ctx context.Context, task *asynq.Task) error
- func CleanUpDiagnosisLogs(ctx context.Context, task *asynq.Task) error
- func CleanUpPostgresDB(ctx context.Context, task *asynq.Task) error
- func CleanUpReports(ctx context.Context, task *asynq.Task) error
- func ComputeThreat(ctx context.Context, task *asynq.Task) error
- func FetchLicense(ctx context.Context) (string, error)
- func FetchThreatIntel(ctx context.Context, task *asynq.Task) error
- func FetchThreatIntelListing(ctx context.Context, token string) (threatintel.Listing, error)
- func FormatForMessagingApps[T any](results []T, resourceType string) []map[string]interface{}
- func LinkCloudResources(ctx context.Context, task *asynq.Task) error
- func LinkNodes(ctx context.Context, task *asynq.Task) error
- func MaxAllocable(ctx context.Context, max int) int
- func PublishLicenseUsageToLicenseServer(ctx context.Context, task *asynq.Task) error
- func RedisRewriteAOF(ctx context.Context, task *asynq.Task) error
- func RetryScansDB(ctx context.Context, task *asynq.Task) error
- func RetryUpgradeAgent(ctx context.Context, task *asynq.Task) error
- func RunScheduledTasks(ctx context.Context, task *asynq.Task) error
- func SendNotifications(ctx context.Context, task *asynq.Task) error
- func SyncRegistry(ctx context.Context, task *asynq.Task) error
- func SyncRegistryPostgresNeo4jTask(ctx context.Context, task *asynq.Task) error
- func TriggerSendNotifications(ctx context.Context, task *asynq.Task) error
- func UpdateLicenseStatus(ctx context.Context, task *asynq.Task) error
- type Benchmark
- type ConsoleController
- type Control
- type ListingFormat
- type ReportLicensePayload
- type SendNotificationsTaskParams
Constants ¶
View Source
const (
ConsoleAgentId = "deepfence-console-cron"
)
View Source
const DefaultNotificationErrorBackoff = 15 * time.Minute
View Source
const DefaultNotificationInterval = 60000 // in milliseconds
Variables ¶
View Source
var BenchmarksAvailableMap = map[string][]string{
"aws": {"cis", "nist", "pci", "gdpr", "hipaa", "soc_2", "aws_foundational_security"},
"gcp": {"cis", "nist", "pci", "hipaa"},
"azure": {"cis", "nist", "pci", "hipaa"},
"kubernetes": {"nsa-cisa"},
"linux": {"hipaa", "nist", "pci", "gdpr"},
}
View Source
var ErrUnsupportedScan = errors.New("unsupported scan type in integration")
View Source
var NotificationErrorBackoff time.Duration
Functions ¶
func CachePostureProviders ¶
func CleanUpPostgresDB ¶
CleanUpPostgresDB Delete expired user invites and password reset requests
func FetchLicense ¶
FetchLicense gets license key from database
func FetchThreatIntelListing ¶
func FormatForMessagingApps ¶
func SyncRegistryPostgresNeo4jTask ¶
SyncRegistryPostgresNeo4jTask Synchronize registry between postgres and neo4j
Types ¶
type ConsoleController ¶
func NewConsoleController ¶
func NewConsoleController(max int) ConsoleController
func (ConsoleController) TriggerConsoleControls ¶
Allocator shared across all workers instances per namespace
type Control ¶
type Control struct { CategoryBreadcrumb string `json:"category_breadcrumb"` CategoryHierarchy []string `json:"category_hierarchy"` CategoryHierarchyShort string `json:"category_hierarchy_short"` ControlId string `json:"control_id"` Description string `json:"description"` Title string `json:"title"` Tags map[string]string `json:"tags"` Documentation string `json:"documentation"` ParentControlHierarchy []string `json:"parent_control_hierarchy"` ParentControlBreadcrumb string `json:"parent_control_breadcrumb"` Executable bool `json:"executable"` ProblemTitle string `json:"problem_title"` }
type ListingFormat ¶
type ReportLicensePayload ¶
type ReportLicensePayload struct { LicenseKey string `json:"license_key"` DfClusterID int64 `json:"df_cluster_id"` CurrentNumberOfHosts int64 `json:"current_no_of_hosts"` CurrentNumberOfCloudAccounts int64 `json:"current_no_of_cloud_accounts"` CurrentNumberOfRegistries int64 `json:"current_no_of_registries"` NotificationThresholdPercentage int32 `json:"notification_threshold_percentage"` NotificationThresholdUpdatedAtTimestamp int64 `json:"notification_threshold_updated_at_timestamp"` }
type SendNotificationsTaskParams ¶
type SendNotificationsTaskParams struct {
PgID int32 `json:"pg_id"`
}
Click to show internal directories.
Click to hide internal directories.