Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchUpdate ¶
BatchUpdate updates the information of a list of tracks using the most efficient method
func BatchUpdateArtists ¶
func TrackExists ¶
TrackExists returns true if the tracks exists or false otherwise
Types ¶
type AlbumInformationStruct ¶
type Artist ¶
type Artist struct {
ID uint `gorm:"primarykey" json:"-"`
CreatedAt time.Time `json:"-"`
DeletedAt time.Time `gorm:"index" json:"-"`
ArtistID string `gorm:"type:VARCHAR(30) NOT NULL UNIQUE"`
Name string
Genres GenresStruct
Popularity int16
Image string
Updated bool
// contains filtered or unexported fields
}
type GenresStruct ¶
type GenresStruct []string
func (*GenresStruct) Scan ¶
func (sla *GenresStruct) Scan(value interface{}) error
type SpotifyInformation ¶
type SpotifyInformation struct {
TrackInformation TrackInformationStruct `gorm:"embedded;embeddedPrefix:track_"`
AlbumInformation AlbumInformationStruct `gorm:"embedded;embeddedPrefix:album_"`
TrackFeatures TrackFeaturesStruct `gorm:"embedded;embeddedPrefix:features_"`
Updated bool `json:"-"`
}
type Track ¶
type Track struct {
ID uint `gorm:"primarykey" json:"-"`
CreatedAt time.Time `json:"-"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
TrackID string `gorm:"type:VARCHAR(30) NOT NULL UNIQUE"`
Lyrics string
LastUpdated time.Time `json:"-"`
Artists []Artist `gorm:"many2many:track_artists;"`
Name string
Information SpotifyInformation `gorm:"embedded;embeddedPrefix:information_"`
// contains filtered or unexported fields
}
func GetTrackFromID ¶
GetTrackFromID returns a track from database and sets its mutex
func (*Track) ArtistString ¶
ArtistString returns the artist name as a string
func (*Track) NeedUpdate ¶
type TrackFeaturesStruct ¶
Click to show internal directories.
Click to hide internal directories.