reporter

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnsupportedMode printMode = iota
	NormalMode
	FullMode
	ShortMode
)
View Source
const (
	RequestNotSent result = iota
	RequestSent
	RequestError
)

Variables

View Source
var (
	// ErrEmptyReport is returned when reports is empty
	ErrEmptyReport = errors.New("nothing to print due to empty reports")
)
View Source
var (
	// ErrUnsupportedPrintMode is returned when parameter value of print mode is not supported.
	ErrUnsupportedPrintMode = errors.New("print mode is unsupported")
)

Functions

func NewPrintMode added in v0.5.1

func NewPrintMode(s string) (printMode, error)

Types

type Report

type Report struct {
	// contains filtered or unexported fields
}

Report records the results on the execution of each task

func NewReport added in v0.5.0

func NewReport(result result, target string, auth []string, req *myhttp.Request, resp *myhttp.Response) *Report

func (Report) GetResult added in v0.5.0

func (report Report) GetResult() result

type Reports

type Reports []Report

Reports is a slice of Report

func (Reports) Print

func (reports Reports) Print(m printMode) error

Print prints out each Report in Reports

Jump to

Keyboard shortcuts

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