config

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 1 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 {
	// BHLdir points to a base directory of BHL texts filetree.
	BHLdir string

	// OutputFormat format of the detected names dump
	OutputFormat gnfmt.Format

	// PgHost is the IP or a name of a computer running PostgreSQL database.
	PgHost string

	// PgUser is the username with read/write access to bhlindex database.
	PgUser string

	// PgPass is the password for PgUser
	PgPass string

	// PgDatabase is the name of a database for BHLindex.
	PgDatabase string

	// Jobs is the number of parallel processes running for the name-finding.
	Jobs int

	// VerifierURL points to a remote GNverifier service.
	VerifierURL string

	// WithWebLogs can be set to true, if logs from RESTful service are required.
	// If it set to false, the logs are silenced.
	WithWebLogs bool

	// WithoutConfirm can be set to true to avoid confirmations before
	// destructive operations.
	WithoutConfirm bool
}

Config contains settings necessary for creating index of scientific names of Biodiversity Heritage Library.

func New

func New(opts ...Option) Config

type Option

type Option func(*Config)

func OptBHLdir

func OptBHLdir(s string) Option

func OptJobs

func OptJobs(i int) Option

func OptOutputFormat

func OptOutputFormat(f gnfmt.Format) Option

func OptPgDatabase

func OptPgDatabase(s string) Option

func OptPgHost

func OptPgHost(s string) Option

func OptPgPass

func OptPgPass(s string) Option

func OptPgUser

func OptPgUser(s string) Option

func OptVerifierURL

func OptVerifierURL(s string) Option

func OptWithWebLogs

func OptWithWebLogs(b bool) Option

func OptWithoutConfirm

func OptWithoutConfirm(b bool) Option

Jump to

Keyboard shortcuts

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