Documentation ¶
Index ¶
Constants ¶
View Source
const ( DBDriverTypeLocal = "LOCAL" DBDriverTypePostgres = "POSTGRES" )
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type DBConfig ¶
type DBConfig struct { EnableInfoLogs bool `json:"enable-info-logs"` DriverType string `json:"driver-type,omitempty"` DBPassword string `json:"-"` DBUser string `json:"db-user,omitempty"` DBHost string `json:"db-host,omitempty"` DBPort string `json:"db-port,omitempty"` DBName string `json:"db-name,omitempty"` LocalDBPath string `json:"local-db-path,omitempty"` }
type Database ¶
type Database interface { ScanResultsTable() ScanResultsTable ScanConfigsTable() ScanConfigsTable ScansTable() ScansTable TargetsTable() TargetsTable ScopesTable() ScopesTable FindingsTable() FindingsTable }
type FindingsTable ¶
type FindingsTable interface { GetFindings(params models.GetFindingsParams) (models.Findings, error) GetFinding(findingID models.FindingID, params models.GetFindingsFindingIDParams) (models.Finding, error) CreateFinding(finding models.Finding) (models.Finding, error) UpdateFinding(finding models.Finding) (models.Finding, error) SaveFinding(finding models.Finding) (models.Finding, error) DeleteFinding(findingID models.FindingID) error }
type PreconditionFailedError ¶ added in v0.5.0
type PreconditionFailedError struct {
Reason string
}
func (*PreconditionFailedError) Error ¶ added in v0.5.0
func (e *PreconditionFailedError) Error() string
type ScanConfigsTable ¶
type ScanConfigsTable interface { GetScanConfigs(params models.GetScanConfigsParams) (models.ScanConfigs, error) GetScanConfig(scanConfigID models.ScanConfigID, params models.GetScanConfigsScanConfigIDParams) (models.ScanConfig, error) CreateScanConfig(scanConfig models.ScanConfig) (models.ScanConfig, error) UpdateScanConfig(scanConfig models.ScanConfig, params models.PatchScanConfigsScanConfigIDParams) (models.ScanConfig, error) SaveScanConfig(scanConfig models.ScanConfig, params models.PutScanConfigsScanConfigIDParams) (models.ScanConfig, error) DeleteScanConfig(scanConfigID models.ScanConfigID) error }
type ScanResultsTable ¶
type ScanResultsTable interface { GetScanResults(params models.GetScanResultsParams) (models.TargetScanResults, error) GetScanResult(scanResultID models.ScanResultID, params models.GetScanResultsScanResultIDParams) (models.TargetScanResult, error) CreateScanResult(scanResults models.TargetScanResult) (models.TargetScanResult, error) UpdateScanResult(scanResults models.TargetScanResult, params models.PatchScanResultsScanResultIDParams) (models.TargetScanResult, error) SaveScanResult(scanResults models.TargetScanResult, params models.PutScanResultsScanResultIDParams) (models.TargetScanResult, error) }
type ScansTable ¶
type ScansTable interface { GetScans(params models.GetScansParams) (models.Scans, error) GetScan(scanID models.ScanID, params models.GetScansScanIDParams) (models.Scan, error) CreateScan(scan models.Scan) (models.Scan, error) UpdateScan(scan models.Scan, params models.PatchScansScanIDParams) (models.Scan, error) SaveScan(scan models.Scan, params models.PutScansScanIDParams) (models.Scan, error) DeleteScan(scanID models.ScanID) error }
type ScopesTable ¶
type TargetsTable ¶
type TargetsTable interface { GetTargets(params models.GetTargetsParams) (models.Targets, error) GetTarget(targetID models.TargetID, params models.GetTargetsTargetIDParams) (models.Target, error) CreateTarget(target models.Target) (models.Target, error) UpdateTarget(target models.Target, params models.PatchTargetsTargetIDParams) (models.Target, error) SaveTarget(target models.Target, params models.PutTargetsTargetIDParams) (models.Target, error) DeleteTarget(targetID models.TargetID) error }
Click to show internal directories.
Click to hide internal directories.