Documentation ¶
Index ¶
- Constants
- type Album
- type AlbumWithArtists
- type AlbumWithArtistsAggr
- type Artist
- type ArtistsAggr
- type Genre
- type Music
- type PreMusicData
- type Setting
- type Tag
- type TagVariant
- type TagWithAggr
- type TagWithVariants
- type Task
- type Track
- type TrackWithAlbumArtists
- type TrackWithAlbumArtistsAggr
- type TrackWithGenresAlbumArtists
- type TrackWithGenresAlbumArtistsAggr
Constants ¶
const ( TaskStatusNew = "new" TaskStatusInProgress = "in_progress" TaskStatusError = "error" TaskStatusSuccess = "success" )
Task statuses
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { ID int64 `db:"album_id"` Year int16 `db:"album_year"` TotalTracks int16 `db:"album_total_tracks"` DiscNumber int16 `db:"album_disc_number"` Name string `db:"album_name"` Image string `db:"album_image"` Description string `db:"album_description"` }
Album is a music album
type AlbumWithArtists ¶
AlbumWithArtist row of the album with artist
type AlbumWithArtistsAggr ¶
type AlbumWithArtistsAggr struct { *Album *ArtistsAggr }
AlbumWithArtistAggr is AlbumWithArtists with aggregate fields of the artist
type Artist ¶
type Artist struct { ID int64 `db:"artist_id"` Name string `db:"artist_name"` Image string `db:"artist_image"` Description string `db:"artist_description"` }
Artist is a artist of the album/track
type ArtistsAggr ¶
type ArtistsAggr struct { ArtistsID pq.Int64Array `db:"artists_id"` ArtistsName pq.StringArray `db:"artists_name"` }
ArtistsAggr list of the artists with aggregate fields
type Genre ¶
type Genre struct { ID int64 `db:"genre_id"` Name string `db:"genre_name"` Description string `db:"genre_description"` }
Genre is a music genre
type PreMusicData ¶
type PreMusicData struct { ArtistID int64 AlbumID int64 GenreID int64 TrackNumber int64 IsTrackNameSet bool IsTrackLyricsSet bool TrackName string TrackLyrics string }
PreMusicData preload data about music file
type Tag ¶
type Tag struct { ID int64 `db:"tag_id"` Name string `db:"tag_name"` Value string `db:"tag_value"` Description string `db:"tag_description"` }
Tag of the track, album or artist. Value may be empty
type TagVariant ¶
TagVariant element of the tag variant with id, value and description
type TagWithAggr ¶
type TagWithAggr struct { Name string `db:"tag_name"` TagsID pq.Int64Array `db:"tags_id"` TagsValue pq.StringArray `db:"tags_value"` TagsDescription pq.StringArray `db:"tags_description"` }
TagWithAggr tag with aggregated fields
type TagWithVariants ¶
type TagWithVariants struct { Name string Variants []*TagVariant }
TagWithValuesList is a tag grouped by name
type Task ¶
type Task struct { ID int64 `db:"task_id"` CreatedAt time.Time `db:"task_created_at"` UserID int64 `db:"task_user_id"` TrackID int64 `db:"task_track_id"` Status string `db:"task_status"` FileName string `db:"task_file_name"` ErrorText string `db:"task_error_text"` }
Task is a tasker type
type Track ¶
type Track struct { ID int64 `db:"track_id"` AlbumID int64 `db:"track_album_id"` Duration int64 `db:"track_duration"` CreatedAt time.Time `db:"track_created_at"` Number int16 `db:"track_number"` FileMiddle string `db:"track_file_middle"` FileHigh string `db:"track_file_high"` Name string `db:"track_name"` Lyrics string `db:"track_lyrics"` }
Track is a music tracks
type TrackWithAlbumArtists ¶
TrackWithAlbumArtists row of the track with album and artist info
type TrackWithAlbumArtistsAggr ¶
type TrackWithAlbumArtistsAggr struct { *Track *Album *ArtistsAggr }
TrackWithAlbumArtistsAggr is TrackWithAlbumArtist with aggregate fields of the artist
type TrackWithGenresAlbumArtists ¶
TrackWithGenresAlbumArtist row of the track with genres list, album and artist info
type TrackWithGenresAlbumArtistsAggr ¶
type TrackWithGenresAlbumArtistsAggr struct { *Track *Album *ArtistsAggr Genres []*Genre `db:"-"` }
TrackWithGenresAlbumArtistAggr is TrackWithGenresAlbumArtist with aggregate fields of the artist