Documentation
¶
Overview ¶
functions to download the BDSICE databases, fetch updates and get the latest coyuntura bulletins
Index ¶
- func BuildFullDatabase(configuration *config.BDSICEConfig, seriesDecoded []*series.BDSICESerie) error
- func Bulletin(configuration *config.BDSICEConfig) error
- func DecodeFullDatabase(configuration *config.BDSICEConfig) ([]*series.BDSICESerie, error)
- func DecodePartialDatabase(configuration *config.BDSICEConfig, filesToDecode []string) ([]*series.BDSICESerie, error)
- func DownloadFullDatabase(configuration *config.BDSICEConfig, forceDownload bool) ([]*series.BDSICESerie, error)
- func Update(configuration *config.BDSICEConfig, forceUpdate bool) ([]*series.BDSICESerie, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFullDatabase ¶
func BuildFullDatabase(configuration *config.BDSICEConfig, seriesDecoded []*series.BDSICESerie) error
writes the full database BDSICEDatabase object to dbLocalPath in JSON format This function could be made redudant if no new series have been added. It would requiere checking
func Bulletin ¶
func Bulletin(configuration *config.BDSICEConfig) error
download latest available "coyuntura" bulletin
func DecodeFullDatabase ¶
func DecodeFullDatabase(configuration *config.BDSICEConfig) ([]*series.BDSICESerie, error)
decodes all the .xer files in dbLocalPath and saves the BDSICESeries objects into JSON files with the series code as file name. It wraps DecodePartialDatabase() by calling it with an array containing all the files in configuration.DatabaseLocalPath
func DecodePartialDatabase ¶
func DecodePartialDatabase(configuration *config.BDSICEConfig, filesToDecode []string) ([]*series.BDSICESerie, error)
func DownloadFullDatabase ¶
func DownloadFullDatabase(configuration *config.BDSICEConfig, forceDownload bool) ([]*series.BDSICESerie, error)
downloads the full BDSICE database and returns a slice containing the codes of the downloaded series
func Update ¶
func Update(configuration *config.BDSICEConfig, forceUpdate bool) ([]*series.BDSICESerie, error)
checks for updates and download to local path TODO:
- Add updated series to json database
returns:
- slice containing extracted files
- error
Types ¶
This section is empty.