Versions in this module Expand all Collapse all v0 v0.1.0 Feb 3, 2026 Changes in this version + type Handler struct + func NewHandler(repo Repository, radio Radio, audioResolver audio.Resolver, c *cache.Cache) *Handler + func (h *Handler) RegisterRoutes(mux *http.ServeMux) + type MoodInfo struct + DisplayName string + Name string + TotalMins float64 + TrackCount int + type PlaylistTrack struct + Artist *string + AudioURL string + Energy string + FilePath string + ID int64 + Intensity *int + Lyrics *string + Title *string + type Radio interface + GetPlaylist func(mood string, instrumentalOnly bool) ([]*inventory.Track, error) + RecordPlay func(mood string, trackID int64) + type Repository interface + BeginTx func(ctx context.Context) (*sql.Tx, error) + GetByID func(id int64) (*inventory.Track, error) + GetMoodStats func() ([]inventory.MoodStats, error) + RecordListenEventTx func(tx *sql.Tx, evt inventory.ListenEvent) error + UpdatePlayStatsTx func(tx *sql.Tx, id int64) error