config

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIHostKey             = "api_host"
	ServerHostKey          = "server_host"
	ServerPortKey          = "server_port"
	HTTPTimeoutKey         = "http_timeout"
	HTTPSRedirectKey       = "https_redirect"
	AuthKey                = "auth_key"
	DBPathKey              = "db.path"
	DBTimeoutKey           = "db.timeout"
	DownloadEndpointKey    = "endpoint.download"
	ListEndpointKey        = "endpoint.list"
	RSSEndpointKey         = "endpoint.rss"
	PkgEndpointKey         = "endpoint.pkg"
	GithubTokenKey         = "github.token"
	GithubWatchIntervalKey = "github.watch_interval"

	RSSNameKey          = "rss.name"
	RSSDescriptionKey   = "rss.description"
	RSSAuthorKey        = "rss.author"
	RSSCopyrightKey     = "rss.copyright"
	RSSCreationTSKey    = "rss.creation_ts"
	RSSLinkKey          = "rss.link"
	RSSTitleKey         = "rss.title"
	RSSContentKey       = "rss.content"
	RSSHistoryLengthKey = "rss.history_length"

	DefaultServerHost          = "127.0.0.1"
	DefaultServerPort          = "8080"
	DefaultHTTPTimeout         = "3s"
	DefaultHTTPSRedirect       = false
	DefaultDBPath              = "bolt.db"
	DefaultDBTimeout           = "1s"
	DefaultDLEndpointPath      = "/download"
	DefaultListEndpointPath    = "/list"
	DefaultRSSEndpointPath     = "/rss/{arch}"
	DefaultPkgEndpointPath     = "/pkg"
	DefaultGithubWatchInterval = "1m"
	DefaultRSSHistoryLength    = 3
)

Config keys and default values

Variables

This section is empty.

Functions

func New

func New(name, prefix string) (*viper.Viper, error)

New returns new instance of Viper config

Types

This section is empty.

Jump to

Keyboard shortcuts

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