Documentation
¶
Index ¶
- type Config
- type Option
- func OptArchiveDate(s string) Option
- func OptArchiveVersion(s string) Option
- func OptBadRow(br gnfmt.BadRow) Option
- func OptCacheDir(s string) Option
- func OptCode(code nomcode.Code) Option
- func OptColSep(s string) Option
- func OptLocalFile(s string) Option
- func OptSkipDownload(b bool) Option
- func OptWithVerbose(b bool) Option
- func OptWithZipOutput(b bool) Option
- func OptWithoutQuotes(b bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// CacheDir is the directory where all temporary files are located.
CacheDir string
// DownloadDir contains temporary files for download.
DownloadDir string
// ExtractDir contains temporary files where original archive is extracted to.
ExtractDir string
// SfgaDir contains files of the built SFGA file.
SfgaDir string
// LoadFile can be a local file or URl. In cases when there is no
// stable link to a source's data the LoadFile is used.
LoadFile string
// Code provides nomenclatural code setting to use in GNparser.
// This flag is only important for importing data from text, csv and
// other ad-hoc files.
Code nomcode.Code
// ArchiveDate is used to set 'Issued' field in CoLDP/SFGA metadata.
ArchiveDate string
// ArchiveDate is used to set 'Version' firle for CoLDP/SFGA metadata.
ArchiveVersion string
// WithVerbose indicates that more information might be shown in the
// output information. It is only important for listing a short list of
// supported sources, or providing details about them.
WithVerbose bool
// SkipDownload disables source data download and extraction. Useful during
// development to save time and bandwidth.
SkipDownload bool
// ColSep is used when importing CSV/TSV/PSV files. By default it is empty
// and is determined automatically.
ColSep string
// WithoutQuotes can be used to parse correctly tab- or pipe-delimited
// files where fields never escaped by quotes.
WithoutQuotes bool
// BadRow sets how to process rows with wrong number of fields in CSV
// files. By default it is set to process such rows. Other options are
// to return an error, or skip them.
BadRow gnfmt.BadRow
// JobsNum sets the number of concurrent jobs to set, if it is
// needed.
JobsNum int
// BatchSize determines the size of slices to import into SFGA.
BatchSize int
// WithZipOutput indicates that zipped archives have to be created.
WithZipOutput bool
}
type Option ¶
type Option func(*Config)
Option is the type for all option functions available to modify configuration.
func OptArchiveDate ¶
func OptArchiveVersion ¶
func OptCacheDir ¶
func OptLocalFile ¶
func OptSkipDownload ¶
func OptWithVerbose ¶
func OptWithZipOutput ¶
func OptWithoutQuotes ¶
Click to show internal directories.
Click to hide internal directories.