reporter

package module
v0.0.0-...-3a9fe36 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2014 License: MIT Imports: 5 Imported by: 3

README

reporter Build Status

Hranoprovod report generator

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	CSV               bool
	Color             bool
	DateFormat        string
	CaloriesLabel     string
	FatLabel          string
	CarbohydrateLabel string
	ProteinLabel      string
}

Options contains the options for the reporter

func NewDefaultOptions

func NewDefaultOptions() *Options

DefaultOptions returns the default reporter options

type Reporter

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

Reporter is the main report structure

func NewReporter

func NewReporter(ro *Options, writer io.Writer) *Reporter

NewReporter creates new reporter

func (*Reporter) PrintAPINode

func (r *Reporter) PrintAPINode(n shared.APINode) error

PrintAPINode prints single API result

func (*Reporter) PrintAPISearchResult

func (r *Reporter) PrintAPISearchResult(nl shared.APINodeList) error

PrintAPISearchResult prints a list of search resilts

func (*Reporter) PrintDate

func (r *Reporter) PrintDate(ts time.Time)

func (*Reporter) PrintElement

func (r *Reporter) PrintElement(element *shared.Element)

func (*Reporter) PrintIngredient

func (r *Reporter) PrintIngredient(name string, value float32)

func (*Reporter) PrintSingleElementRow

func (r *Reporter) PrintSingleElementRow(ts time.Time, name string, pos float32, neg float32)

func (*Reporter) PrintSingleFoodRow

func (r *Reporter) PrintSingleFoodRow(ts time.Time, name string, val float32)

func (*Reporter) PrintTotalHeader

func (r *Reporter) PrintTotalHeader()

func (*Reporter) PrintTotalRow

func (r *Reporter) PrintTotalRow(name string, pos float32, neg float32)

func (*Reporter) PrintUnresolvedRow

func (r *Reporter) PrintUnresolvedRow(name string)

Jump to

Keyboard shortcuts

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