Documentation
¶
Overview ¶
package config contains information needed to run gnmatcher project.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertTilda ¶ added in v0.3.6
ConvertTilda expands paths with `~/` to an actual home directory.
Types ¶
type Config ¶
type Config struct {
// WorkDir is the main directory for gnmatcher files. It contains
// bloom filters levenshtein automata trees, key-value stores etc.
WorkDir string
// MaxEditDist is the maximal allowed edit distance for levenshtein automata.
// The number cannot exceed 2, default number is 1. The speed of execution
// slows down dramatically with the MaxEditDist > 1.
MaxEditDist int
// PgHost is a hostname for the PostgreSQL server.
PgHost string
// PgPort is the port of PostgreSQL server.
PgPort int
// PgUser is the user for the database.
PgUser string
// PgPass password to access PostgreSQL server.
PgPass string
// PgDB the database name where gnames data is located.
PgDB string
}
Config collects and stores external configuration data.
func NewConfig ¶
NewConfig is a Config constructor that takes external options to update default values to external ones.
func (Config) FiltersDir ¶
FiltersDir returns path where to dump/restore serialized bloom filters.
type Option ¶
type Option func(cnf *Config)
Option is a type of all options for Config.
func OptMaxEditDist ¶
OptMaxEditDist sets maximal possible edit distance for fuzzy matching of stemmed canonical forms.
func OptWorkDir ¶
OptWorkDir sets a directory for key-value stores and temporary files.
Click to show internal directories.
Click to hide internal directories.