Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func ControlSeverityToInt ¶
func ControlSeverityToString ¶
Types ¶
type IStatus ¶
type IStatus interface { Status() ScanningStatus Info() string IsPassed() bool IsFailed() bool IsExcluded() bool IsSkipped() bool }
IStatus interface handling status
type ScanningStatus ¶
type ScanningStatus string
const ( StatusPassed ScanningStatus = "passed" StatusExcluded ScanningStatus = "excluded" StatusIgnored ScanningStatus = "ignored" StatusFailed ScanningStatus = "failed" StatusSkipped ScanningStatus = "skipped" StatusUnknown ScanningStatus = "" // keep this empty StatusIrrelevant ScanningStatus = "irrelevant" StatusError ScanningStatus = "error" )
const (
InfoStatusSkipped ScanningStatus = "skipped"
)
func Compare ¶
func Compare(a, b ScanningStatus) ScanningStatus
Compare receive two statuses and returns the more significant one
status level: 1. failed 2. excludes 3. passed 4. skipped/ignore e.g.: Compare(failed, excludes) -> failed Compare(passed, excludes) -> excludes Compare(skipped, excludes) -> excludes Compare(failed, passed) -> failed
type StatusInfo ¶
type StatusInfo struct { InnerStatus ScanningStatus `json:"status,omitempty"` InnerInfo string `json:"info,omitempty"` }
func (*StatusInfo) Info ¶
func (s *StatusInfo) Info() string
func (*StatusInfo) IsExcluded ¶
func (s *StatusInfo) IsExcluded() bool
IsExcluded is the status excluded
func (*StatusInfo) IsSkipped ¶
func (s *StatusInfo) IsSkipped() bool
IsSkipped is the status skipped
func (*StatusInfo) Status ¶
func (s *StatusInfo) Status() ScanningStatus
Click to show internal directories.
Click to hide internal directories.