Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Market ¶
type Market struct {
Station station.StationMap // map of station IDs and stations
}
Market represents the whole station market
func (*Market) AddPrice ¶
AddPrice adds a fuel price for a station and the given Unix epoch timestamp
func (*Market) BestStations ¶
func (m *Market) BestStations(timestamp int64, fuel string) (goodPrice float64, stations station.StationMap)
BestStations returns the best stations as a map with station ID as key
func (*Market) UpsertStation ¶
UpsertStation upserts a station to the market
Click to show internal directories.
Click to hide internal directories.