output

package
v3.17.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bullet

func Bullet(text string)

Bullet is like paragraph but with a bullet point in front

func MeasurementItem

func MeasurementItem(msmt model.DatabaseMeasurementURLNetwork, isFirst bool, isLast bool)

MeasurementItem logs a progress type event

func MeasurementJSON

func MeasurementJSON(j map[string]interface{})

MeasurementJSON prints the JSON of a measurement

func MeasurementSummary

func MeasurementSummary(msmt MeasurementSummaryData)

MeasurementSummary emits the measurement summary

func Paragraph

func Paragraph(text string)

Paragraph makes a word-wrapped paragraph out of text

func PressAnyKeyToContinue added in v3.10.0

func PressAnyKeyToContinue(text string) error

PressAnyKeyToContinue blocks until the user presses any key

func Progress

func Progress(key string, perc float64, eta float64, msg string)

Progress logs a progress type event

func ResultItem

func ResultItem(result ResultItemData)

ResultItem logs a progress type event

func ResultSummary

func ResultSummary(result ResultSummaryData)

ResultSummary emits the result summary

func SectionTitle

func SectionTitle(text string)

SectionTitle is the title of a section

Types

type MeasurementSummaryData

type MeasurementSummaryData struct {
	TotalRuntime       float64
	TotalCount         int64
	AnomalyCount       int64
	DataUsageUp        float64
	DataUsageDown      float64
	ASN                uint
	NetworkName        string
	NetworkCountryCode string
	StartTime          time.Time
}

MeasurementSummaryData contains summary information on the measurement

type ResultItemData

type ResultItemData struct {
	ID                      int64
	Name                    string
	StartTime               time.Time
	TestKeys                string
	MeasurementCount        uint64
	MeasurementAnomalyCount uint64
	Runtime                 float64
	Country                 string
	NetworkName             string
	ASN                     uint
	Done                    bool
	IsUploaded              bool
	DataUsageDown           float64
	DataUsageUp             float64
	Index                   int
	TotalCount              int
}

ResultItemData is the metadata about a result

type ResultSummaryData

type ResultSummaryData struct {
	TotalTests         int64
	TotalDataUsageUp   float64
	TotalDataUsageDown float64
	TotalNetworks      int64
}

ResultSummaryData contains the summary data of a result

Jump to

Keyboard shortcuts

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