Documentation ¶
Index ¶
- Variables
- func CountAlbums() int
- func CountArtists() int
- func CountSongs() int
- func CreateAlbum(tx *sql.Tx, name string, artist string, picture string, year int) error
- func CreateArtist(tx *sql.Tx, name string) error
- func CreatePicture(tx *sql.Tx, path string, mime string) error
- func CreateSong(tx *sql.Tx, s *Song, picture string) error
- func GetPicturePath(id int) (string, error)
- func GetRandomSong() int
- func GetSongPath(id int) (string, error)
- func Start(f string) error
- type Album
- type Artist
- type Song
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB
Functions ¶
func CountAlbums ¶
func CountAlbums() int
func CountArtists ¶
func CountArtists() int
func CountSongs ¶
func CountSongs() int
func CreateAlbum ¶
func GetPicturePath ¶
func GetRandomSong ¶
func GetRandomSong() int
func GetSongPath ¶
Types ¶
type Album ¶ added in v0.3.0
type Artist ¶ added in v0.3.0
type Artist struct { ID int `json:"id,omitempty"` Name string `json:"name"` Albums []Album `json:"albums,omitempty"` Singles []Song `json:"singles,omitempty"` }
func GetArtists ¶
type Song ¶
type Song struct { ID int `json:"id,omitempty"` Title string `json:"title"` Artist string `json:"artist,omitempty"` Album string `json:"album,omitempty"` Path string `json:"path,omitempty"` Track int `json:"track,omitempty"` Year int `json:"year,omitempty"` Mime string `json:"mime,omitempty"` Picture int `json:"picture,omitempty"` Disc int `json:"disc,omitempty"` }
Click to show internal directories.
Click to hide internal directories.