Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DieselFuelPriceInfo ¶
type DieselFuelPriceInfo struct {
// contains filtered or unexported fields
}
DieselFuelPriceInfo stores the data needed to add the latest fuel price data to the MilMove database
func NewDieselFuelPriceInfo ¶
func NewDieselFuelPriceInfo(eiaURL string, eiaKey string, eiaDataFetcherFunction eiaDataFetcherFunction, logger *zap.Logger) *DieselFuelPriceInfo
NewDieselFuelPriceInfo creates a new dieselFuelPriceInfo struct and returns a pointer to said struct
func (*DieselFuelPriceInfo) RunFetcher ¶
func (d *DieselFuelPriceInfo) RunFetcher(appCtx appcontext.AppContext) error
RunFetcher creates the final EIA Open Data API URL, makes a call to the API, and fetches and returns the most recent diesel fuel price data
func (*DieselFuelPriceInfo) RunStorer ¶
func (d *DieselFuelPriceInfo) RunStorer(appCtx appcontext.AppContext) error
RunStorer stores the final EIA weekly average diesel fuel price data in the ghc_diesel_fuel_price table
type EIAData ¶
type EIAData struct { RequestData requestData `json:"request"` ErrorData errorData `json:"data"` SeriesData []seriesData `json:"series"` // contains filtered or unexported fields }
EIAData stores all the data returned from a call to the EIA Open Data API
func FetchEIAData ¶
FetchEIAData makes a call to the EIA Open Data API and returns the API response
Click to show internal directories.
Click to hide internal directories.