config

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// CacheDir is the root path for all temporary files.
	CacheDir string

	// DownloadDir is used to store downloaded files.
	DownloadDir string

	// ExtractDir is used to store extracted files of ColDP archive.
	ExtractDir string

	// WithSloppyCSV allows to have more fields in a row, than it should have.
	WrongFieldsNum gnfmt.BadRow

	// Delimiter (usually tab \t) delimites between fields.
	Delimiter string

	// Quote (usually empty) used if a field has a delimiter in its content.
	Quote string
}

Config is a configuration object for the Darwin Core Archive (DwCA) data processing.

func New

func New(opts ...Option) Config

New creates a new Config object with default values, and allows to override them with options.

type Option

type Option func(*Config)

Option is a type of configuration options.

func OptCacheDir

func OptCacheDir(s string) Option

func OptDelimiter

func OptDelimiter(s string) Option

func OptQuote

func OptQuote(s string) Option

func OptWrongFieldsNum

func OptWrongFieldsNum(r gnfmt.BadRow) Option

Jump to

Keyboard shortcuts

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