Documentation
¶
Overview ¶
Package db provides database helpers and models
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { ID int `gorm:"primary_key"` UpdatedAt time.Time ModifiedAt time.Time LeftPath string `gorm:"unique_index:idx_left_path_right_path"` RightPath string `gorm:"not null; unique_index:idx_left_path_right_path" sql:"default: null"` RightPathUDec string `sql:"default: null"` Parent *Album ParentID int `sql:"default: null; type:int REFERENCES albums(id) ON DELETE CASCADE"` Cover string `sql:"default: null"` TagArtist *Artist TagArtistID int `gorm:"index" sql:"default: null; type:int REFERENCES artists(id) ON DELETE CASCADE"` TagGenre *Genre TagGenreID int `sql:"default: null; type:int"` TagTitle string `sql:"default: null"` TagTitleUDec string `sql:"default: null"` TagBrainzID string `sql:"default: null"` TagYear int `sql:"default: null"` Tracks []*Track ChildCount int `sql:"-"` ReceivedPaths bool `gorm:"-"` ReceivedTags bool `gorm:"-"` }
func (*Album) IndexRightPath ¶
type Artist ¶
type DB ¶
func (*DB) GetOrCreateKey ¶ added in v0.9.0
func (*DB) GetSetting ¶
func (*DB) GetUserByID ¶ added in v0.10.0
func (*DB) GetUserByName ¶ added in v0.10.0
func (*DB) SetSetting ¶
type Play ¶
type Play struct { ID int `gorm:"primary_key"` User *User UserID int `gorm:"not null; index" sql:"default: null; type:int REFERENCES users(id) ON DELETE CASCADE"` Album *Album AlbumID int `gorm:"not null; index" sql:"default: null; type:int REFERENCES albums(id) ON DELETE CASCADE"` Time time.Time `sql:"default: null"` Count int }
type PlayQueue ¶
type PlayQueue struct { ID int `gorm:"primary_key"` CreatedAt time.Time UpdatedAt time.Time User *User UserID int `sql:"default: null; type:int REFERENCES users(id) ON DELETE CASCADE"` Current int Position int ChangedBy string Items string }
func (*PlayQueue) CurrentSID ¶ added in v0.9.4
type Playlist ¶
type Track ¶
type Track struct { ID int `gorm:"primary_key"` CreatedAt time.Time UpdatedAt time.Time Filename string `gorm:"not null; unique_index:idx_folder_filename" sql:"default: null"` FilenameUDec string `sql:"default: null"` Album *Album AlbumID int `gorm:"not null; unique_index:idx_folder_filename" sql:"default: null; type:int REFERENCES albums(id) ON DELETE CASCADE"` Artist *Artist ArtistID int `gorm:"not null" sql:"default: null; type:int REFERENCES artists(id) ON DELETE CASCADE"` Size int `gorm:"not null" sql:"default: null"` Length int `sql:"default: null"` Bitrate int `sql:"default: null"` TagTitle string `sql:"default: null"` TagTitleUDec string `sql:"default: null"` TagTrackArtist string `sql:"default: null"` TagTrackNumber int `sql:"default: null"` TagDiscNumber int `sql:"default: null"` TagGenre *Genre TagGenreID int `sql:"default: null; type:int REFERENCES genres(id)"` TagBrainzID string `sql:"default: null"` }
type TranscodePreference ¶
type TranscodePreference struct { User *User UserID int `gorm:"not null; unique_index:idx_user_id_client" sql:"default: null; type:int REFERENCES users(id) ON DELETE CASCADE"` Client string `gorm:"not null; unique_index:idx_user_id_client" sql:"default: null"` Profile string `gorm:"not null" sql:"default: null"` }
Click to show internal directories.
Click to hide internal directories.