Documentation ¶
Index ¶
- type Album
- type AlbumChanges
- type Artist
- type ArtistChanges
- type Config
- type Connection
- type CreateAlbumParams
- type CreateArtistParams
- type CreatePlaylistParams
- type CreateTrackParams
- type Database
- func (db *Database) AddItemsToPlaylist(ctx context.Context, playlistId string, trackIds []string) error
- func (db *Database) AddTagToTrack(ctx context.Context, tagId, trackId string) error
- func (db *Database) Begin() (*Database, *sql.Tx, error)
- func (db *Database) CreateAlbum(ctx context.Context, params CreateAlbumParams) (Album, error)
- func (db *Database) CreateArtist(ctx context.Context, params CreateArtistParams) (Artist, error)
- func (db *Database) CreateConfig(ctx context.Context, ownerId string) (Config, error)
- func (db *Database) CreatePlaylist(ctx context.Context, params CreatePlaylistParams) (Playlist, error)
- func (db *Database) CreateTag(ctx context.Context, name string) (Tag, error)
- func (db *Database) CreateTrack(ctx context.Context, params CreateTrackParams) (Track, error)
- func (db *Database) CreateUser(ctx context.Context, username, password string) (User, error)
- func (db *Database) DeleteItemsFromPlaylist(ctx context.Context, playlistId string, trackIndices []int) error
- func (db *Database) Exec(ctx context.Context, s ToSQL) (sql.Result, error)
- func (db *Database) GetAlbumById(ctx context.Context, id string) (Album, error)
- func (db *Database) GetAlbumByName(ctx context.Context, name string) (Album, error)
- func (db *Database) GetAlbumByPath(ctx context.Context, path string) (Album, error)
- func (db *Database) GetAlbumsByArtist(ctx context.Context, artistId string) ([]Album, error)
- func (db *Database) GetAllAlbums(ctx context.Context) ([]Album, error)
- func (db *Database) GetAllArtists(ctx context.Context) ([]Artist, error)
- func (db *Database) GetAllTags(ctx context.Context) ([]Tag, error)
- func (db *Database) GetAllTracks(ctx context.Context, random bool) ([]Track, error)
- func (db *Database) GetArtistById(ctx context.Context, id string) (Artist, error)
- func (db *Database) GetArtistByName(ctx context.Context, name string) (Artist, error)
- func (db *Database) GetArtistByPath(ctx context.Context, path string) (Artist, error)
- func (db *Database) GetConfig(ctx context.Context) (*Config, error)
- func (db *Database) GetPlaylistById(ctx context.Context, id string) (Playlist, error)
- func (db *Database) GetPlaylistItems(ctx context.Context, playlistId string) ([]PlaylistItem, error)
- func (db *Database) GetPlaylistsByUser(ctx context.Context, userId string) ([]Playlist, error)
- func (db *Database) GetTagByName(ctx context.Context, name string) (Tag, error)
- func (db *Database) GetTrackById(ctx context.Context, id string) (Track, error)
- func (db *Database) GetTrackByName(ctx context.Context, name string) (Track, error)
- func (db *Database) GetTrackByPath(ctx context.Context, path string) (Track, error)
- func (db *Database) GetTrackTags(ctx context.Context, trackId string) ([]Tag, error)
- func (db *Database) GetTracksByAlbum(ctx context.Context, albumId string) ([]Track, error)
- func (db *Database) GetUserById(ctx context.Context, id string) (User, error)
- func (db *Database) GetUserByUsername(ctx context.Context, username string) (User, error)
- func (db *Database) MarkAllAlbumsUnavailable(ctx context.Context) error
- func (db *Database) MarkAllArtistsUnavailable(ctx context.Context) error
- func (db *Database) MarkAllTracksUnavailable(ctx context.Context) error
- func (db *Database) MovePlaylistItem(ctx context.Context, playlistId string, trackId string, toIndex int) error
- func (db *Database) Query(ctx context.Context, s ToSQL) (*sql.Rows, error)
- func (db *Database) QueryRow(ctx context.Context, s ToSQL) (*sql.Row, error)
- func (db *Database) RemoveTagFromTrack(ctx context.Context, tagId, trackId string) error
- func (db *Database) UpdateAlbum(ctx context.Context, id string, changes AlbumChanges) error
- func (db *Database) UpdateArtist(ctx context.Context, id string, changes ArtistChanges) error
- func (db *Database) UpdateTrack(ctx context.Context, id string, changes TrackChanges) error
- type Playlist
- type PlaylistItem
- type Tag
- type ToSQL
- type Track
- type TrackChanges
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumChanges ¶ added in v0.7.0
type ArtistChanges ¶ added in v0.7.0
type Connection ¶ added in v0.10.0
type CreateAlbumParams ¶
type CreateAlbumParams struct { Name string CoverArt sql.NullString ArtistId string Path string }
type CreateArtistParams ¶
type CreateArtistParams struct { Name string Picture sql.NullString Path string }
type CreatePlaylistParams ¶ added in v0.10.0
type CreateTrackParams ¶
type Database ¶ added in v0.6.0
type Database struct { RawConn *sql.DB Conn Connection }
func (*Database) AddItemsToPlaylist ¶ added in v0.10.0
func (*Database) AddTagToTrack ¶ added in v0.8.0
func (*Database) CreateAlbum ¶ added in v0.6.0
func (*Database) CreateArtist ¶ added in v0.6.0
func (*Database) CreateConfig ¶ added in v0.10.0
func (*Database) CreatePlaylist ¶ added in v0.10.0
func (*Database) CreateTrack ¶ added in v0.6.0
func (*Database) CreateUser ¶ added in v0.10.0
func (*Database) DeleteItemsFromPlaylist ¶ added in v0.10.0
func (db *Database) DeleteItemsFromPlaylist(ctx context.Context, playlistId string, trackIndices []int) error
TODO(patrik): Change from trackIndices to trackIds
func (*Database) GetAlbumById ¶ added in v0.6.0
func (*Database) GetAlbumByName ¶ added in v0.10.0
func (*Database) GetAlbumByPath ¶ added in v0.6.0
func (*Database) GetAlbumsByArtist ¶ added in v0.6.0
func (*Database) GetAllAlbums ¶ added in v0.6.0
func (*Database) GetAllArtists ¶ added in v0.6.0
func (*Database) GetAllTags ¶ added in v0.9.0
func (*Database) GetAllTracks ¶ added in v0.6.0
func (*Database) GetArtistById ¶ added in v0.6.0
func (*Database) GetArtistByName ¶ added in v0.8.0
func (*Database) GetArtistByPath ¶ added in v0.6.0
func (*Database) GetPlaylistById ¶ added in v0.10.0
func (*Database) GetPlaylistItems ¶ added in v0.10.0
func (*Database) GetPlaylistsByUser ¶ added in v0.10.0
func (*Database) GetTagByName ¶ added in v0.8.0
func (*Database) GetTrackById ¶ added in v0.6.0
func (*Database) GetTrackByName ¶ added in v0.10.0
func (*Database) GetTrackByPath ¶ added in v0.6.0
func (*Database) GetTrackTags ¶ added in v0.8.0
func (*Database) GetTracksByAlbum ¶ added in v0.6.0
func (*Database) GetUserById ¶ added in v0.10.0
func (*Database) GetUserByUsername ¶ added in v0.10.0
func (*Database) MarkAllAlbumsUnavailable ¶ added in v0.7.0
func (*Database) MarkAllArtistsUnavailable ¶ added in v0.7.0
func (*Database) MarkAllTracksUnavailable ¶ added in v0.7.0
func (*Database) MovePlaylistItem ¶ added in v0.10.0
func (db *Database) MovePlaylistItem(ctx context.Context, playlistId string, trackId string, toIndex int) error
TODO(patrik): Add bounds check for toIndex
func (*Database) RemoveTagFromTrack ¶ added in v0.8.0
func (*Database) UpdateAlbum ¶ added in v0.7.0
func (*Database) UpdateArtist ¶ added in v0.7.0
func (*Database) UpdateTrack ¶ added in v0.6.0
type PlaylistItem ¶ added in v0.10.0
type TrackChanges ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.