config

package
v0.0.0-...-4aa44aa Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package config holds the configuration struct.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(w io.Writer, cfg ExposedConfig) error

func Unmarshal

func Unmarshal(r io.Reader, cfg *ExposedConfig) error

Types

type Config

type Config struct {
	ExposedConfig

	// Files with those extensions are recognized as tracks. Extensions in
	// this list should begin with a dot. Extensions are case insenitive.
	TrackExtensions []string

	// Files with those stems in their names and one of the thumbail
	// extensions are recognized as thumbnails. For example if "thumbnail"
	// is present in this list then files such as "thumbnail.jpg",
	// "thumbnail.png" etc. would be considered to be a thumbnail given
	// that ".jpg" and ".png" are present in the list of thumbnail
	// extensions. Stems are case insensitive.
	ThumbnailStems []string

	// Files with those extensions and one of the thumbnail stems in their
	// name are recognized as thumbnails. Extensions in this list should
	// begin with a dot. Extensions are case insenitive.
	ThumbnailExtensions []string
}

func Default

func Default() *Config

Default returns the default config.

type ExposedConfig

type ExposedConfig struct {
	ServeAddress string `` /* 368-byte string literal not displayed */

	MusicDirectory string `toml:"music_directory" comment:"Path to a directory containing your music."`

	DataDirectory string `` /* 181-byte string literal not displayed */

	CacheDirectory string `` /* 340-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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