Documentation ¶
Index ¶
- Variables
- func ConnectToMongoInstace() *mongo.Client
- func GetAllForecasts(client *mongo.Client, mongoResponse *models.MongoResponse, limit int, ...) (int, error)
- func GetForecastbyID(client *mongo.Client, forecast *models.Forecast, ID string) error
- func GetLastRefresh(client *mongo.Client, refresh *models.Refresh) error
- func InsertAllForecasts(client *mongo.Client, forecasts []models.Forecast) (error, bool)
- func InsertRefresh(client *mongo.Client, refresh models.Refresh) error
- func Ping(client *mongo.Client) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ForecastsCollectionName = os.Getenv("MONGO_FORECASTS_COLLECTION_NAME") RefreshesCollectionName = os.Getenv("MONGO_REFRESHES_COLLECTION_NAME") DatabaseName = os.Getenv("MONGO_DATABASE_NAME") WarningLogger = log.New(os.Stdout, "WARNING: ", log.LUTC|log.Ltime|log.Lshortfile) InfoLogger = log.New(os.Stdout, "INFO: ", log.LUTC|log.Ltime|log.Lshortfile) ErrorLogger = log.New(os.Stdout, "ERROR: ", log.LUTC|log.Ltime|log.Lshortfile) )
Functions ¶
func ConnectToMongoInstace ¶
func GetAllForecasts ¶
func GetForecastbyID ¶
func InsertAllForecasts ¶
Insert all forecast to refrehs the data Return an error and wither or not it failed under cooldown (too many request)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.