config

package
v0.0.0-...-9bc770a Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigDir

func GetConfigDir() string

func GetPlaylistPath

func GetPlaylistPath(playlistName string) string

func SaveConfig

func SaveConfig(cfg *Config)

Types

type Config

type Config struct {
	PlaylistsAvailable []string `json:"playlists_available"`
	SelectedPlaylist   string   `json:"selected_playlist"`
	Shuffle            bool     `json:"shuffle"`
	Loop               bool     `json:"loop"`
	VlcPath            string   `json:"vlc_path"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig() *Config

func NewConfig

func NewConfig() *Config

func (*Config) Scan

func (c *Config) Scan(value interface{}) error

Scan implements the sql.Scanner interface. This method simply decodes a JSON-encoded value into the struct fields.

func (*Config) StartVlc

func (c *Config) StartVlc() error

func (*Config) StopVlc

func (c *Config) StopVlc() error

func (*Config) ToString

func (c *Config) ToString() string

func (*Config) Value

func (c *Config) Value() (driver.Value, error)

Value implements the driver.Valuer interface. This method simply returns the JSON-encoded representation of the struct.

Jump to

Keyboard shortcuts

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