Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchSongs ¶
FetchSongs retrieves all songs from the database.
func GetCassetteMeta ¶
GetCassetteMeta takes cassette type C120, C90, C60. Returns tape single side duration in minutes (int) and type label (string).
Types ¶
type Cassette ¶
type Cassette struct { Type string `json:"tape_type"` SideA CassetteSide `json:"side_a"` SideB CassetteSide `json:"side_b"` }
Cassette struct for storing songs in cassette format.
type CassetteSide ¶
type CassetteSide struct { Songs []Song `json:"songs"` DurationLabel string `json:"play_time"` Duration int `json:"-"` }
CassetteSide is one side of a cassette.
func (*CassetteSide) AddSong ¶
func (cs *CassetteSide) AddSong(song Song)
AddSong adds a song to a cassette side.
func (*CassetteSide) SetDurationLabel ¶
func (cs *CassetteSide) SetDurationLabel()
SetDurationLabel convert duration to duration label string, ex. 125 == "2:05"
type QueryParams ¶
QueryParams struct for use with select queries
type Song ¶
type Song struct { ID int `db:"id" json:"id"` Title string `db:"title" json:"title"` Artist string `db:"artist" json:"artist"` Year int `db:"year" json:"year"` Video string `db:"video" json:"video"` DurationLabel string `db:"duration_label" json:"play_time"` Duration int `db:"duration" json:"-"` }
Song is a struct for housing song data.
Click to show internal directories.
Click to hide internal directories.