apis

package
v0.0.93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStatus added in v0.0.79

type IStatus interface {
	Status() ScanningStatus
	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

)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL