report

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LISTMARK = "*"
	COLON    = ":"
	SPACE    = " "
	TAB      = "	"
	NEWLINE  = "\n"
)

Variables

View Source
var AlertLabels = map[int]string{
	types.InfoLevel:   "INFO",
	types.WarnLevel:   "WARN",
	types.FatalLevel:  "FATAL",
	types.PassLevel:   "PASS",
	types.SkipLevel:   "SKIP",
	types.IgnoreLevel: "IGNORE",
}

Functions

This section is empty.

Types

type AssessmentSlice added in v0.1.16

type AssessmentSlice []*types.Assessment

func (*AssessmentSlice) AddAbend added in v0.1.16

func (as *AssessmentSlice) AddAbend(assessment *types.Assessment)

AddAbend add assessment to AssessmentSlice pointer if abend level

func (*AssessmentSlice) FilteredByTargetCode added in v0.1.16

func (as *AssessmentSlice) FilteredByTargetCode(target int) (filtered AssessmentSlice)

FilteredByTargetCode returns only target type assessments from all assessments slice

type JsonDetail

type JsonDetail struct {
	Code   string   `json:"code"`
	Title  string   `json:"title"`
	Level  string   `json:"level"`
	Alerts []string `json:"alerts"`
}

type JsonOutputFormat

type JsonOutputFormat struct {
	Summary JsonSummary   `json:"summary"`
	Details []*JsonDetail `json:"details"`
}

type JsonSummary

type JsonSummary struct {
	Fatal int `json:"fatal"`
	Warn  int `json:"warn"`
	Info  int `json:"info"`
	Pass  int `json:"pass"`
}

type JsonWriter

type JsonWriter struct {
	Output io.Writer
}

func (JsonWriter) Write

func (jw JsonWriter) Write(assessments AssessmentSlice) (bool, error)

type ListWriter

type ListWriter struct {
	Output io.Writer
}

func (ListWriter) Write

func (lw ListWriter) Write(assessments AssessmentSlice) (bool, error)

type Writer

type Writer interface {
	Write(assessments AssessmentSlice) (bool, error)
}

Jump to

Keyboard shortcuts

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