func getSummaryReports( sStringID string, stype string, startTime time.Time, summaries *summary.Summaries) []*summary.Report { var reports []*summary.Report sm := summaries.Select(stype) data, err := sm.Get(sStringID) if err != nil { return reports } return data.Report().Fetch(startTime) }
func getSummaryReport( sStringID string, stype string, startTime time.Time, summaries *summary.Summaries) []*report { var reports []*report sm := summaries.Select(stype) data, err := sm.Get(sStringID) if err != nil { return []*report{} } for _, r := range data.Report().Fetch(startTime) { nR := &report{} nR.Report = r nR.Timestamp = r.End.Unix() reports = append(reports, nR) } return reports }