config

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlbumArt added in v1.3.3

func AlbumArt() bool

AlbumArt returns true if album art should be fetched when a new song begins playing

func GetAudioToken added in v1.3.11

func GetAudioToken() string

GetAudioToken gets the audio token from disk

func GetSessionKey added in v1.3.11

func GetSessionKey() string

GetSessionKey gets the session key from disk

func GetThemeBackgroundColor added in v1.3.16

func GetThemeBackgroundColor() string

GetThemePrimaryColor gets the theme's background color

func GetThemePrimaryColor added in v1.3.16

func GetThemePrimaryColor() string

GetThemePrimaryColor gets the theme's primary color

func GetThemePrimaryTextColor added in v1.3.16

func GetThemePrimaryTextColor() string

GetThemePrimaryTextColor gets the theme's primary text color

func GetThemeSecondaryTextColor added in v1.3.16

func GetThemeSecondaryTextColor() string

GetThemePrimaryColor gets the theme's primary color

func GetToken

func GetToken() (token string)

GetToken returns the di.fm API token if one is available

func GetUserID added in v1.3.11

func GetUserID() (userID int)

GetUserID returns the di.fm user ID

func HasTheme added in v1.3.16

func HasTheme() bool

HasTheme returns true if the di-tui config has a Theme set

func SaveAudioToken added in v1.3.11

func SaveAudioToken(audioToken string)

SaveAudioToken saves the audio token to disk

func SaveListenToken added in v1.3.11

func SaveListenToken(token string)

SaveListenToken saves the user's listen token

func SaveSessionKey added in v1.3.11

func SaveSessionKey(sessionKey string)

SaveSessionKey saves the session key to disk

func SaveUserID added in v1.3.11

func SaveUserID(userID int64)

SaveUserID saves the user's ID

Types

type Config added in v1.3.16

type Config struct {
	Theme map[string]string
}

TODO This application is migrating to having all of its configuration read into this `Config` struct, rather than using individual `ReadType` functions from viper. Migrating all `Get*` methods to use `Config` instead.

var C Config

Jump to

Keyboard shortcuts

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