download

package
v0.0.0-...-93f8c6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

functions to download the BDSICE databases, fetch updates and get the latest coyuntura bulletins

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL