config

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

Jump to

Keyboard shortcuts

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