Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { gorm.Model Name string `gorm:"not null,unique_index"` Cover *Image `gorm:"ForeignKey:CoverID"` CoverID NullInt64 Year NullInt64 Songs []*Song `gorm:"ForeignKey:AlbumID"` }
Album model.
type Image ¶
type Image struct { gorm.Model Path string `gorm:"not null; unique"` Link string `gorm:"not null; unique"` Mime string `gorm:"not null"` Hash string `gorm:"not null; unique"` }
Image model.
type NullFloat64 ¶
type NullFloat64 struct {
sql.NullFloat64
}
func (NullFloat64) MarshalJSON ¶
func (v NullFloat64) MarshalJSON() ([]byte, error)
func (*NullFloat64) Set ¶
func (v *NullFloat64) Set(data float64)
func (*NullFloat64) UnmarshalJSON ¶
func (v *NullFloat64) UnmarshalJSON(data []byte) error
type NullString ¶
type NullString struct {
sql.NullString
}
func (NullString) MarshalJSON ¶
func (v NullString) MarshalJSON() ([]byte, error)
func (*NullString) Set ¶
func (v *NullString) Set(data string)
func (*NullString) UnmarshalJSON ¶
func (v *NullString) UnmarshalJSON(data []byte) error
type Playlist ¶
type Playlist struct { gorm.Model Name string `gorm:"not null,unique_index"` Songs []*Song `gorm:"many2many:playlist_songs"` }
Playlist model.
type Song ¶
type Song struct { gorm.Model Name string `gorm:"not null"` Artist *Artist `gorm:"ForeignKey:ArtistID"` ArtistID NullInt64 Album *Album `gorm:"ForeignKey:AlbumID"` AlbumID NullInt64 Cover *Image `gorm:"ForeignKey:CoverID"` CoverID NullInt64 Year NullInt64 Track NullInt64 TotalTracks NullInt64 Genre NullString Duration NullFloat64 Mime string `gorm:"not null"` Path string `gorm:"not null"` Played uint `gorm:"not null"` }
Song model.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.