cfg

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SynoOptions *syno.Options

SynoOptions provides options for go-syno library

View Source
var Version string

Version is the current application version. This variable is populated when building the binary with: -ldflags "-X github.com/jdel/gosspks/cfg.Version=${VERSION}"

Functions

func GetCacheDir

func GetCacheDir() string

GetCacheDir returns the cache directory

func GetDebugPackage

func GetDebugPackage() bool

GetDebugPackage returns true if the --debug-package flag is present

func GetDownloadPrefix

func GetDownloadPrefix() string

GetDownloadPrefix returns the prefix for download URLs (packages)

func GetGPGKeys

func GetGPGKeys() []string

GetGPGKeys returns a []string of GPG keys Keys have to be specified as an array in the config file

func GetHostName

func GetHostName() string

GetHostName returns the hostname

func GetLogLevel

func GetLogLevel() string

GetLogLevel returns the log level. default value is "Error"

func GetMD5

func GetMD5() bool

GetMD5 returns true if the --md5 flag is present

func GetModelsCacheDuration

func GetModelsCacheDuration() time.Duration

GetModelsCacheDuration returns the duration of the models cache

func GetModelsCacheRefreshRate

func GetModelsCacheRefreshRate() time.Duration

GetModelsCacheRefreshRate returns the refresh rate of the packages cache

func GetModelsFile

func GetModelsFile() string

GetModelsFile returns the prefix for download URLs (packages)

func GetPackagesCacheCount

func GetPackagesCacheCount() int

GetPackagesCacheCount returns the number of packages collections to cache (one for each language)

func GetPackagesCacheDuration

func GetPackagesCacheDuration() time.Duration

GetPackagesCacheDuration returns the duration of the packages cache

func GetPackagesCacheRefreshRate

func GetPackagesCacheRefreshRate() time.Duration

GetPackagesCacheRefreshRate returns the refresh rate of the packages cache

func GetPackagesDir

func GetPackagesDir() string

GetPackagesDir returns the packages directory

func GetPort

func GetPort() string

GetPort returns the port default value is "8080"

func GetScheme

func GetScheme() string

GetScheme returns the scheme

func GetStaticPrefix

func GetStaticPrefix() string

GetStaticPrefix returns the prefix for static URLs (images)

func InitConfig

func InitConfig(cfgFile string, homeDir string)

InitConfig loads the config file according to cfgFile and homeDir flags from cmd/root.go

Types

This section is empty.

Jump to

Keyboard shortcuts

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