Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type Calculator struct {
// contains filtered or unexported fields
}
func NewCalculator ¶
func NewCalculator(logger *slog.Logger) *Calculator
func (*Calculator) CalculateMonthly ¶
func (c *Calculator) CalculateMonthly(usage nem12.UsageData, plan *cdsenergy.EnergyPlanDetail) (Cost, error)
type Cost ¶
type Cost struct { // This will always be populated and will be an average monthly cost given all the usage data available AverageMonthly float64 // Breaks down the cost into an average per month. Indexed with January being 0. How much of // this is populated depends on the usage data provided. If there is at least a year of usage, // all indices will have a value. AveragePerMonth []float64 }
Click to show internal directories.
Click to hide internal directories.