Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIReporter ¶
type APIReporter struct {
// contains filtered or unexported fields
}
APIReporter outputs api search results
func NewAPIReporter ¶
func NewAPIReporter(ro *Options, writer io.Writer) *APIReporter
NewAPIReporter creates new API result reporter
func (*APIReporter) PrintAPINode ¶
func (r *APIReporter) PrintAPINode(n shared.APINode) error
PrintAPINode prints single API result
func (*APIReporter) PrintAPISearchResult ¶
func (r *APIReporter) PrintAPISearchResult(nl shared.APINodeList) error
PrintAPISearchResult prints a list of search results
type CSVReporter ¶
type CSVReporter struct {
// contains filtered or unexported fields
}
CSVReporter outputs report for single food
func NewCSVReporter ¶
func NewCSVReporter(options *Options, writer io.Writer) CSVReporter
NewCSVReporter creates new CSV reporter
type Options ¶
type Options struct { CSV bool Color bool TotalsOnly bool Totals bool DateFormat string CaloriesLabel string FatLabel string CarbohydrateLabel string ProteinLabel string HasBeginning bool HasEnd bool BeginningTime time.Time EndTime time.Time Unresolved bool SingleElement string SingleFood string CollapseLast bool Collapse bool ElementGroupByFood bool ShortenStrings bool UseOldRegReporter bool InternalTemplateName string }
Options contains the options for the reporter
func NewDefaultOptions ¶
func NewDefaultOptions() *Options
NewDefaultOptions returns the default reporter options
type QuantityReporter ¶
type QuantityReporter struct {
// contains filtered or unexported fields
}
func NewQuantityReporter ¶
func NewQuantityReporter(ascending bool, writer io.Writer) QuantityReporter
type Reporter ¶
Reporter is the reporting interface
func NewBalanceReporter ¶
NewBalanceReporter returns balance reporter
func NewRegReporter ¶
NewRegReporter creates new response handler
type SummaryReporterTemplate ¶
type SummaryReporterTemplate struct {
// contains filtered or unexported fields
}
SummaryReporterTemplate is a summary reporter
func NewSummaryReporterTemplate ¶
func NewSummaryReporterTemplate(options *Options, db shared.DBNodeList, writer io.Writer) *SummaryReporterTemplate
NewSummaryReporterTemplate creates new summary reporter
func (*SummaryReporterTemplate) Flush ¶
func (r *SummaryReporterTemplate) Flush() error
Flush does nothing
type UnsolvedReporter ¶
type UnsolvedReporter struct {
// contains filtered or unexported fields
}
UnsolvedReporter is unresolved reporter
func NewUnsolvedReporter ¶
func NewUnsolvedReporter(options *Options, db shared.DBNodeList, writer io.Writer) *UnsolvedReporter
NewUnsolvedReporter returns reporter for unresolved elements
Source Files ¶
- api_reporter.go
- balance_reporter.go
- balance_single_reporter.go
- csv_reporter.go
- element_by_food_reporter.go
- quantity_reporter.go
- reg_reporter.go
- reg_reporter_template.go
- report_item.go
- reporter.go
- single_food_reporter.go
- single_reporter.go
- summary_reporter_template.go
- template_functions.go
- unsolved_reporter.go
- utils.go