Documentation ¶
Index ¶
- func RootDir() string
- type Config
- type Option
- func OptBHLDumpURL(s string) Option
- func OptBHLNamesURL(s string) Option
- func OptCoLDataURL(s string) Option
- func OptDbDatabase(s string) Option
- func OptDbHost(s string) Option
- func OptDbPass(s string) Option
- func OptDbUser(s string) Option
- func OptJobsNum(i int) Option
- func OptPortREST(i int) Option
- func OptRootDir(s string) Option
- func OptWithCoLDataTrim(b bool) Option
- func OptWithRebuild(b bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // BHLDumpURL specifies the source for Biodiversity Heritage Library dump // files. BHLDumpURL string // BHLNamesURL specifies the source for BHLindex data (name occurrences and // verifications). BHLNamesURL string // CoLDataURL specifies the source for Catalogue of Life data in Darwin Core // Archive format. CoLDataURL string // DbDatabase is the name of the PostgreSQL database for BHLnames data. DbDatabase string // DbHost is the hostname or IP address of the PostgreSQL server. DbHost string // DbUser is the PostgreSQL username with write permissions to the database. DbUser string // DbPass is the password for `DBUser`. DbPass string // JobsNum controls the concurrency level for finding references // containing specified names. JobsNum int // PortREST specifies the port number for the BHLnames RESTful service. PortREST int // RootDir is the base directory for all BHLnames downloaded and extracted // files. RootDir string // DownloadBHLFile is the full path where the downloaded BHL dump // (compressed) is stored. DownloadBHLFile string // DownloadCoLFile is the full path where the downloaded CoL DwCA file is // stored. DownloadCoLFile string // ExtractDir is the directory where BHLnames extracts the contents of the // compressed files. ExtractDir string // DownloadNamesFile is the full path where the downloaded BHLindex Data file // is stored. DownloadNamesFile string // WithCoLDataTrim indicates whether the CoL nomenclatural tables should be // cleared and repopulated with fresh CoL data or import will continue from // where it was paused. WithCoLDataTrim bool // WithRebuild determines if BHL or CoL data needs to be re-downloaded and // processed. If true, deletes any locally cached data. WithRebuild bool }
Config defines the essential parameters needed for BHLnames functionality.
type Option ¶
type Option func(*Config)
Option enables a functional approach for modifying Config settings.
func OptBHLDumpURL ¶
OptBHLDumpURL sets the URL for BHL dump files.
func OptBHLNamesURL ¶
OptBHLNamesURL sets the URL for BHLindex data.
func OptCoLDataURL ¶
OptCoLDataURL sets the URL for the Catalogue of Life data.
func OptDbDatabase ¶ added in v0.2.0
OptDbDatabase sets the name of the PostgreSQL database for BHLnames data.
func OptJobsNum ¶
OptJobsNum sets the concurrency level for finding references containing
func OptPortREST ¶
OptPortREST sets the port number for the BHLnames RESTful service.
func OptRootDir ¶ added in v0.2.0
OptRootDir sets the base directory for all BHLnames downloaded and extracted files.
func OptWithCoLDataTrim ¶ added in v0.2.0
OptWithCoLDataTrim sets the CoL data trim option.
Click to show internal directories.
Click to hide internal directories.