Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct { ID uint `gorm:"primary_key" json:"id,omitempty"` CreatedAt time.Time `gorm:"not null" json:"created_at" sql:"DEFAULT:CURRENT_TIMESTAMP"` UpdatedAt time.Time `gorm:"not null" json:"updated_at" sql:"DEFAULT:CURRENT_TIMESTAMP"` DeletedAt *time.Time `sql:"index" json:"deleted_at,omitempty"` }
type Playlist ¶
type Playlist struct {
Tracklist []Track
}
func (*Playlist) GenerateRandomTracks ¶
func (p *Playlist) GenerateRandomTracks()
func (*Playlist) GetRandomTrack ¶
type Track ¶
type Track struct { Model Artist string `gorm:"type:varchar(50)" json:"artist" validate:"required"` Name string `gorm:"type:varchar(50)" json:"name" validate:"required"` Length int64 `gorm:"type:int(4)" json:"length" validate:"required"` Label string `gorm:"type:varchar(50)" json:"label"` Genre string `gorm:"type:varchar(50)" json:"genre"` Album string `gorm:"type:varchar(100)" json:"album"` Year string `gorm:"type:int(4)" json:"year" validate:"required,year"` MP3File string `gorm:"type:varchar(256)" json:"mp3file"` Cover string `gorm:"type:varchar(256)" json:"cover"` }
func (*Track) SetFieldsWithID3Tags ¶
Click to show internal directories.
Click to hide internal directories.