89 lines
1.7 KiB
Go
89 lines
1.7 KiB
Go
|
package config
|
||
|
|
||
|
import "github.com/spf13/viper"
|
||
|
|
||
|
// exported function(s)
|
||
|
func HomeDirectory() string {
|
||
|
return viper.GetString(homeDirectory)
|
||
|
}
|
||
|
|
||
|
func LibraryDirectory() string {
|
||
|
return viper.GetString(libraryDirectory)
|
||
|
}
|
||
|
|
||
|
func ImportDirectory() string {
|
||
|
return viper.GetString(importDirectory)
|
||
|
}
|
||
|
|
||
|
func DatabaseFile() string {
|
||
|
return viper.GetString(databaseFile)
|
||
|
}
|
||
|
|
||
|
func DatabaseInMemory() bool {
|
||
|
return viper.GetBool(databaseInMemory)
|
||
|
}
|
||
|
|
||
|
func DatabaseBusyTimeout() int {
|
||
|
return viper.GetInt(databaseBusyTimeout)
|
||
|
}
|
||
|
|
||
|
func DatabaseJournalMode() string {
|
||
|
return viper.GetString(databaseJournalMode)
|
||
|
}
|
||
|
|
||
|
func DatabaseChunkSize() int {
|
||
|
return viper.GetInt(databaseChunkSize)
|
||
|
}
|
||
|
|
||
|
func Formats() []string {
|
||
|
return viper.GetStringSlice(libraryFormats)
|
||
|
}
|
||
|
|
||
|
func Concurrency() int {
|
||
|
return viper.GetInt(concurrency)
|
||
|
}
|
||
|
|
||
|
func ChangeDetectionModified() bool {
|
||
|
return viper.GetBool(libraryChangedetectionModified)
|
||
|
}
|
||
|
|
||
|
func ChangeDetectionSize() bool {
|
||
|
return viper.GetBool(libraryChangedetectionSize)
|
||
|
}
|
||
|
|
||
|
func ChangeDetectionChecksum() bool {
|
||
|
return viper.GetBool(libraryChangedetectionChecksum)
|
||
|
}
|
||
|
|
||
|
func DuplicatesAction() string {
|
||
|
return viper.GetString(libraryDuplicatesAction)
|
||
|
}
|
||
|
|
||
|
func DuplicatesFormatMismatch() bool {
|
||
|
return viper.GetBool(libraryDuplicatesFormatMismatch)
|
||
|
}
|
||
|
|
||
|
func DuplicatesUseFingerprint() bool {
|
||
|
return viper.GetBool(libraryDuplicatesUseFingerprint)
|
||
|
}
|
||
|
|
||
|
func DuplicatesFingerprintThreshold() float64 {
|
||
|
return viper.GetFloat64(libraryDuplicatesFingerprintThreshold)
|
||
|
}
|
||
|
|
||
|
func ApiListen() string {
|
||
|
return viper.GetString(apiListen)
|
||
|
}
|
||
|
|
||
|
func ApiPort() int {
|
||
|
return viper.GetInt(apiPort)
|
||
|
}
|
||
|
|
||
|
func Help() bool {
|
||
|
return viper.GetBool(help)
|
||
|
}
|
||
|
|
||
|
func Debug() bool {
|
||
|
return viper.GetBool(debug)
|
||
|
}
|