Documentation ¶
Index ¶
- func ArchiveResource(database *Database, resource *model2.Resource) error
- func CalculateCompositePriority(finding *model2.SecurityFinding) int
- func CountActiveResources(database *Database, category model2.ResourceCategory, resourceType string) (int, error)
- func CountExpiredResources(database *Database, time time.Time) (int, error)
- func CountNonArchivedFindings(database *Database, spaceId string) (int, error)
- func CountSecurityFindings(database *Database, spaceId string, accountId string, region string) (int, error)
- func DeleteExpiresRows(database *Database) error
- func GetLatestProcessingRun(database *Database, spaceId string, key string) (*model.ProcessingRun, error)
- func GetResource(database *Database, key string) (*model2.Resource, error)
- func GetSecurityFindingState(database *Database, securityFindingId string, time time.Time) (*model.StateChange, error)
- func GetSecurityFindings(database *Database, spaceId string, accountId string, region string, ...) ([]*model.SecurityFinding, error)
- func GetVulnerability(database *Database, key string) (*model2.Vulnerability, error)
- func InitDatabase()
- func InsertProcessingRun(database *Database, spaceId string, key string, periodStart time.Time, ...) error
- func JsonMapAppender(in []byte, v reflect.Value, flags int) []byte
- func JsonMapScanner(v reflect.Value, rd types.Reader, n int) error
- func LoadActiveResources(database *Database, category model2.ResourceCategory, resourceType string, ...) ([]*model2.Resource, error)
- func LoadEnabledRules(database *Database, spaceId string) ([]*model2.SecurityFindingRule, error)
- func LoadExpiredResources(database *Database, time time.Time, offset int, limit int) ([]*model2.Resource, error)
- func LoadNonArchivedFindings(database *Database, spaceId string, limit int, offset int) ([]*model2.SecurityFinding, error)
- func SaveFinding(database *Database, finding *model2.SecurityFinding) error
- func SaveFindingChange(database *Database, change *model2.RuleApplyResult) error
- func SaveResource(database *Database, resource *model2.Resource) error
- func SaveSecurityFindingReportRow(database *Database, row *model.SecurityFindingReportRow) error
- func SaveVulnerability(database *Database, vulnerability *model2.Vulnerability) error
- type Database
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateCompositePriority ¶
func CalculateCompositePriority(finding *model2.SecurityFinding) int
func CountActiveResources ¶
func CountExpiredResources ¶
func CountSecurityFindings ¶
func DeleteExpiresRows ¶ added in v0.0.26
func GetLatestProcessingRun ¶
func GetSecurityFindingState ¶
func GetSecurityFindings ¶
func GetVulnerability ¶
func GetVulnerability(database *Database, key string) (*model2.Vulnerability, error)
func InitDatabase ¶
func InitDatabase()
func InsertProcessingRun ¶
func LoadActiveResources ¶
func LoadEnabledRules ¶ added in v0.0.21
func LoadEnabledRules(database *Database, spaceId string) ([]*model2.SecurityFindingRule, error)
func LoadExpiredResources ¶
func LoadNonArchivedFindings ¶
func SaveFinding ¶
func SaveFinding(database *Database, finding *model2.SecurityFinding) error
func SaveFindingChange ¶
func SaveFindingChange(database *Database, change *model2.RuleApplyResult) error
func SaveSecurityFindingReportRow ¶
func SaveSecurityFindingReportRow(database *Database, row *model.SecurityFindingReportRow) error
func SaveVulnerability ¶
func SaveVulnerability(database *Database, vulnerability *model2.Vulnerability) error
Types ¶
type Database ¶
type Database struct { Db *pg.DB // contains filtered or unexported fields }
func NewApplicationDatabase ¶
func NewApplicationDatabase() *Database
func NewDatabase ¶
func (*Database) UpdateSchema ¶
Click to show internal directories.
Click to hide internal directories.