Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a SQL database storage service
func (*DB) ClosePendingSessionsInHistory ¶
type Session ¶
type Session struct { ID uint `json:"id" csv:"-" gorm:"primarykey"` Created time.Time `json:"created"` Finished time.Time `json:"finished"` Loadpoint string `json:"loadpoint"` Identifier string `json:"identifier"` Vehicle string `json:"vehicle"` Odometer *float64 `json:"odometer" format:"int"` MeterStart *float64 `json:"meterStart" csv:"Meter Start (kWh)" gorm:"column:meter_start_kwh"` MeterStop *float64 `json:"meterStop" csv:"Meter Stop (kWh)" gorm:"column:meter_end_kwh"` ChargedEnergy float64 `json:"chargedEnergy" csv:"Charged Energy (kWh)" gorm:"column:charged_kwh"` ChargeDuration *time.Duration `json:"chargeDuration" csv:"Charge Duration" gorm:"column:charge_duration"` SolarPercentage *float64 `json:"solarPercentage" csv:"Solar (%)" gorm:"column:solar_percentage"` Price *float64 `json:"price" csv:"Price" gorm:"column:price"` PricePerKWh *float64 `json:"pricePerKWh" csv:"Price/kWh" gorm:"column:price_per_kwh"` Co2PerKWh *float64 `json:"co2PerKWh" csv:"CO2/kWh (gCO2eq)" gorm:"column:co2_per_kwh"` }
Session is a single charging session
Click to show internal directories.
Click to hide internal directories.