Documentation
¶
Index ¶
- Variables
- func GetAddress() string
- func GetDatabaseConnection() string
- func GetDatabaseName() string
- func GetDatabaseOptions() string
- func GetInternalAPIHost() string
- func GetLbrynet() string
- func GetSentryDSN() string
- func IsAccountV1Enabled() bool
- func IsProduction() bool
- func Override(key string, value interface{})
- func ProjectRoot() string
- func RestoreOverridden()
Constants ¶
This section is empty.
Variables ¶
var Settings = viper.New()
Settings stores project settings such as download paths, host prefix for URLs and so on
Functions ¶
func GetAddress ¶ added in v0.6.3
func GetAddress() string
GetAddress determines address to bind http API server to
func GetDatabaseConnection ¶ added in v0.6.3
func GetDatabaseConnection() string
GetDatabaseConnection returns a url of database connection (postgres://lbrytv:lbrytv@localhost)
func GetDatabaseName ¶ added in v0.6.3
func GetDatabaseName() string
GetDatabaseName returns database name
func GetDatabaseOptions ¶ added in v0.6.3
func GetDatabaseOptions() string
GetDatabaseOptions returns additional database options passed to the driver (sslmode=disable)
func GetInternalAPIHost ¶ added in v0.6.3
func GetInternalAPIHost() string
GetInternalAPIHost returns the address of internal-api server
func GetLbrynet ¶ added in v0.6.3
func GetLbrynet() string
GetLbrynet returns the address of SDK server to use
func GetSentryDSN ¶ added in v0.6.3
func GetSentryDSN() string
GetSentryDSN returns sentry.io service DSN
func IsAccountV1Enabled ¶ added in v0.6.3
func IsAccountV1Enabled() bool
IsAccountV1Enabled enables or disables Account Subsystem V1 (database + plain auth_token)
func IsProduction ¶
func IsProduction() bool
IsProduction is true if we are running in a production environment
func Override ¶
func Override(key string, value interface{})
Override sets a setting key value to whatever you supply. Useful in tests:
config.Override("Lbrynet", "http://www.google.com:8080/api/proxy")
defer config.RestoreOverridden()
...
func ProjectRoot ¶
func ProjectRoot() string
func RestoreOverridden ¶
func RestoreOverridden()
RestoreOverridden restores original settings values overridden by Override
Types ¶
This section is empty.