config

package
Version: v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BHL

type BHL struct {
	DumpURL      string
	BHLindexHost string
	Rebuild      bool
}

type Config

type Config struct {
	Output
	Search
	DB
	BHL
	FileSystem
	Performance
	REST
}

func NewConfig

func NewConfig(opts ...Option) Config

type DB

type DB struct {
	Host string
	User string
	Pass string
	Name string
}

type FileSystem

type FileSystem struct {
	InputDir     string
	DownloadFile string
	DownloadDir  string
	KeyValDir    string
	PartDir      string
}

type Option

type Option func(*Config)

Option type for changing GNfinder settings.

func OptBHLindexHost

func OptBHLindexHost(bh string) Option

func OptDbHost

func OptDbHost(h string) Option

func OptDbName

func OptDbName(n string) Option

func OptDbPass

func OptDbPass(p string) Option

func OptDbUser

func OptDbUser(u string) Option

func OptDumpURL

func OptDumpURL(d string) Option

func OptFormat

func OptFormat(s string) Option

func OptInputDir

func OptInputDir(s string) Option

func OptJobsNum

func OptJobsNum(j int) Option

func OptNoSynonyms

func OptNoSynonyms(n bool) Option

func OptPortREST

func OptPortREST(i int) Option

func OptRebuild

func OptRebuild(r bool) Option

func OptShort

func OptShort(s bool) Option

func OptSortDesc

func OptSortDesc(d bool) Option

type Output

type Output struct {
	Format       format.Format `json:"-"`
	FormatString string        `json:"format"`
	SortDesc     bool          `json:"sortDescending"`
	Short        bool          `json:"shortOutput"`
}

type Performance

type Performance struct {
	JobsNum int
}

type REST

type REST struct {
	Port int
}
type Search struct {
	NoSynonyms bool `json:"noSynonyms"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL