Documentation ¶
Index ¶
Constants ¶
const ( // CfgDir is the directory where the muserv configuration is stored CfgDir = "/etc/muserv" // IconDir is the directory where the muserv icons are stored IconDir = CfgDir + "/icons" )
const UserName = "muserv"
UserName is the name of the muserv system user
Variables ¶
This section is empty.
Functions ¶
func IsValidAudioFile ¶
IsValidAudioFile returns true if file has a mime type that is relevant for muserv as per the configuration, otherwise false is returned
func SupportedMimeTypes ¶
func SupportedMimeTypes() (s string)
SupportedMimeTypes assembles a string containing the audio and image mime types that muserv supports. The string is used to set the state variable SpurceProtocolInfo of the connection manager service
Types ¶
type Cfg ¶
type Cfg struct { Cnt cnt `json:"content"` UPnP upnp `json:"upnp"` CacheDir string `json:"cache_dir"` LogDir string `json:"log_dir"` LogLevel string `json:"log_level"` }
Cfg stores the data from the MuServ configuration file
type Comparison ¶ added in v0.2.0
Comparison represents a "less" function for strings
type Hierarchy ¶
type Hierarchy struct { Name string `json:"name"` Levels []level `json:"levels"` }
Hierarchy contains the definition of one content hierarchy. Name must not be empty. Either ID or Levels must be filled, but not both. If ID is filled, it's a hierarchy that's defined muserv internally. Those hierarchies cannot be changed. They (can) occur in the config to configure where in the sequence of hierarchies they shall appear. Those hierarchies can be removed without problem. For the other hierarchies, Levels must be set.
type LevelType ¶ added in v0.2.0
type LevelType string
LevelType represents the type of a music hierarchy level
type SortField ¶ added in v0.2.0
type SortField string
SortField represents an attribute that is used for sorting objects such as albums or tracks