Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtfIntervalReport ¶
type EtfIntervalReport struct {
IntervalInDays int
MinPrice, MaxPrice, IntervalChange, IntervalPercentChange float32
}
EtfIntervalReport represents a report containing etf for a specific interval.
type EtfReport ¶
type EtfReport struct {
Symbol string
CurrentPrice, Change, PercentChange float32
IntervalReports []EtfIntervalReport
}
EtfReport repesents a report containg etf data.
type ReportGenerator ¶
type ReportGenerator struct {
Intervals []int
}
Represents a report generator.
func NewReportGenerator ¶
func NewReportGenerator(options ...ReportGeneratorOption) (*ReportGenerator, error)
NewReportGenerator initializes a new report generator.
func (*ReportGenerator) GenerateReport ¶
func (rg *ReportGenerator) GenerateReport(etf data.Etf) (EtfReport, error)
GenerateReport generates a report based on the provided etf struct.
type ReportGeneratorOption ¶
type ReportGeneratorOption func(*ReportGenerator)
ReportGeneratorOption represents a report generator option.
func WithIntervals ¶
func WithIntervals(intervals []int) ReportGeneratorOption
WithIntervals sets the intervals option on a report generator.
Click to show internal directories.
Click to hide internal directories.