config

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SpotifyScope = "" /* 191-byte string literal not displayed */

Variables

View Source
var (
	BuildPath = flag.String("BuildPath", "frontend/build", "The Path where is the React app stored")

	MockExternalCalls = flag.Bool("MockExternalCalls", false, "Disable calling the Spotify or Genius API and only use information from DB")
	MockUser          = flag.String("MockUser", "", "The User to login as when using MockExternalCalls")

	SpotifyClientID     = flag.String("SpotifyClientID", lookupEnvOrString("SPOTIFY_CLIENT_ID", ""), "The Spotify Client ID")
	SpotifyClientSecret = flag.String("SpotifyClientSecret", lookupEnvOrString("SPOTIFY_CLIENT_SECRET", ""), "The Spotify Client Secret")

	RedirectURL = flag.String("RedirectURL", "https://spotify.tedyst.ro/auth", "The Default Redirect URL")
	Address     = flag.String("Address", "0.0.0.0:5000", "The Default Address")
	Secret      = []byte(lookupEnvOrString("SECRET_KEY", "key"))

	Database = flag.String("Database", lookupEnvOrString("DATABASE", "sqlite://data.db"), "The MySQL Database Address")

	ServeSwagger = flag.Bool("ServeSwagger", true, "Serve the Swagger UI")

	IsMySQL = false

	SpotifyAPI = spotify.NewAuthenticator(*RedirectURL, SpotifyScope)

	Metrics = flag.Bool("Metrics", true, "Enable Metrics")

	DB           *gorm.DB
	SessionStore *gormstore.Store
	GeniusToken  = flag.String("GeniusToken", lookupEnvOrString("GENIUS_TOKEN", ""), "The Genius Client Token")
	GeniusClient = genius.NewClient(nil, *GeniusToken)

	Debug = flag.Bool("Debug", false, "Debug mode")

	UserCache   *ristretto.Cache
	TrackCache  *ristretto.Cache
	ArtistCache *ristretto.Cache
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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