Documentation ¶
Index ¶
- Variables
- func CreateString(length int) string
- func GenerateID(path string) (string, error)
- type DB
- func (db DB) AddSong(song Song) error
- func (db DB) CreatePlaylist(name string) (bool, Playlist)
- func (db DB) DeletePlaylist(id string)
- func (db DB) DoesSongExist(id string) bool
- func (db DB) GetAllPlaylists() ([]Playlist, error)
- func (db DB) GetAllSongs() []Song
- func (db DB) GetPlaylist(id string) (bool, Playlist)
- func (db DB) LookupSong(id string) Song
- type Playlist
- type Song
Constants ¶
This section is empty.
Variables ¶
View Source
var Log = logging.Log
Functions ¶
func CreateString ¶
func GenerateID ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func OpenDatabase ¶
func OpenDatabase() DB
func (DB) CreatePlaylist ¶
Creating a playlist.
func (DB) DeletePlaylist ¶
Deleting a playlist from the database.
func (DB) DoesSongExist ¶
func (DB) GetAllPlaylists ¶
func (DB) GetAllSongs ¶
func (DB) GetPlaylist ¶
A function that takes a DB and a string and returns a bool and a Playlist.
func (DB) LookupSong ¶
type Song ¶
type Song struct { ID string `json:"id"` // Unique ID of the song Title string `json:"title"` // Display name of the song Artist string `json:"artist"` // Artist of the song Album string `json:"album"` // What album the song is from Length int `json:"length"` // Length of the song in seconds Image string `json:"image"` // Path to the image for the song }
Click to show internal directories.
Click to hide internal directories.