Documentation ¶
Index ¶
- type Options
- type Reporter
- func (r *Reporter) PrintAPINode(n shared.APINode) error
- func (r *Reporter) PrintAPISearchResult(nl shared.APINodeList) error
- func (r *Reporter) PrintDate(ts time.Time)
- func (r *Reporter) PrintElement(element *shared.Element)
- func (r *Reporter) PrintIngredient(name string, value float32)
- func (r *Reporter) PrintSingleElementRow(ts time.Time, name string, pos float32, neg float32)
- func (r *Reporter) PrintSingleFoodRow(ts time.Time, name string, val float32)
- func (r *Reporter) PrintTotalHeader()
- func (r *Reporter) PrintTotalRow(name string, pos float32, neg float32)
- func (r *Reporter) PrintUnresolvedRow(name string)
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 ¶
NewReporter creates new reporter
func (*Reporter) PrintAPINode ¶
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) PrintElement ¶
func (*Reporter) PrintIngredient ¶
func (*Reporter) PrintSingleElementRow ¶
func (*Reporter) PrintSingleFoodRow ¶
func (*Reporter) PrintTotalHeader ¶
func (r *Reporter) PrintTotalHeader()
func (*Reporter) PrintTotalRow ¶
func (*Reporter) PrintUnresolvedRow ¶
Click to show internal directories.
Click to hide internal directories.