config

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2020 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Overview

Package for configuration common to command line tool and web app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig added in v0.0.25

type AppConfig struct {

	// The top level directory for the project
	ProjectHome string

	// A map of project configuration variables
	ConfigVars map[string]string

	// A list of files to read the lexical units in the dictionary from
	LUFileNames []string
}

AppConfig holds application configuration data that is general to the API

These variables are common to API and web app usage, especially loading dictionary files.

func InitConfig added in v0.0.24

func InitConfig() AppConfig

InitConfig sets application configuration data

func (AppConfig) AvoidSubDomains added in v0.0.25

func (c AppConfig) AvoidSubDomains() map[string]bool

Default: empty

func (AppConfig) CorpusDataDir added in v0.0.25

func (c AppConfig) CorpusDataDir() string

CorpusDataDir returns the directory where the corpus metadata is stored

func (AppConfig) CorpusDir added in v0.0.25

func (c AppConfig) CorpusDir() string

CorpusDir gets the directory where the raw corpus text files are read from

func (AppConfig) DictionaryDir added in v0.0.25

func (c AppConfig) DictionaryDir() string

DictionaryDir gets the name of the directory containing the dictionary files

func (AppConfig) GetVar added in v0.0.25

func (c AppConfig) GetVar(key string) string

GetVar gets a configuration variable value

Jump to

Keyboard shortcuts

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