store

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultUserName = "mifasol"
View Source
const DefaultUserPassword = "mifasol"

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonArtists

type JsonArtists []entity.ArtistEntity

func (*JsonArtists) Scan

func (j *JsonArtists) Scan(value interface{}) error

func (JsonArtists) Value

func (j JsonArtists) Value() (driver.Value, error)

type MifasolMetaDataBlockVorbisComment

type MifasolMetaDataBlockVorbisComment struct {
	flacvorbis.MetaDataBlockVorbisComment
}

type SongWithAuthorsEntity

type SongWithAuthorsEntity struct {
	entity.SongEntity
	JsonArtists JsonArtists `db:"json_artists"`
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(serverConfig *config.ServerConfig) *Store

func (*Store) AddSongToPlaylist

func (s *Store) AddSongToPlaylist(externalTrn *sqlx.Tx, playlistId restApiV1.PlaylistId, songId restApiV1.SongId, check bool) (*restApiV1.Playlist, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) CreateAlbum

func (s *Store) CreateAlbum(externalTrn *sqlx.Tx, albumMeta *restApiV1.AlbumMeta) (*restApiV1.Album, error)

func (*Store) CreateArtist

func (s *Store) CreateArtist(externalTrn *sqlx.Tx, artistMeta *restApiV1.ArtistMeta) (*restApiV1.Artist, error)

func (*Store) CreateFavoritePlaylist

func (s *Store) CreateFavoritePlaylist(externalTrn *sqlx.Tx, favoritePlaylistMeta *restApiV1.FavoritePlaylistMeta, check bool) (*restApiV1.FavoritePlaylist, error)

func (*Store) CreateFavoriteSong

func (s *Store) CreateFavoriteSong(externalTrn *sqlx.Tx, favoriteSongMeta *restApiV1.FavoriteSongMeta, check bool) (*restApiV1.FavoriteSong, error)

func (*Store) CreateInternalPlaylist

func (s *Store) CreateInternalPlaylist(externalTrn *sqlx.Tx, playlistId restApiV1.PlaylistId, playlistMeta *restApiV1.PlaylistMeta, check bool) (*restApiV1.Playlist, error)

func (*Store) CreatePlaylist

func (s *Store) CreatePlaylist(externalTrn *sqlx.Tx, playlistMeta *restApiV1.PlaylistMeta, check bool) (*restApiV1.Playlist, error)

func (*Store) CreateSong

func (s *Store) CreateSong(externalTrn *sqlx.Tx, songNew *restApiV1.SongNew, check bool) (*restApiV1.Song, error)

func (*Store) CreateSongFromRawContent

func (s *Store) CreateSongFromRawContent(externalTrn *sqlx.Tx, raw io.ReadCloser, lastAlbumId restApiV1.AlbumId) (*restApiV1.Song, error)

func (*Store) CreateUser

func (s *Store) CreateUser(externalTrn *sqlx.Tx, userMetaComplete *restApiV1.UserMetaComplete) (*restApiV1.User, error)

func (*Store) DeleteAlbum

func (s *Store) DeleteAlbum(externalTrn *sqlx.Tx, albumId restApiV1.AlbumId) (*restApiV1.Album, error)

func (*Store) DeleteArtist

func (s *Store) DeleteArtist(externalTrn *sqlx.Tx, artistId restApiV1.ArtistId) (*restApiV1.Artist, error)

func (*Store) DeleteFavoritePlaylist

func (s *Store) DeleteFavoritePlaylist(externalTrn *sqlx.Tx, favoritePlaylistId restApiV1.FavoritePlaylistId) (*restApiV1.FavoritePlaylist, error)

func (*Store) DeleteFavoriteSong

func (s *Store) DeleteFavoriteSong(externalTrn *sqlx.Tx, favoriteSongId restApiV1.FavoriteSongId) (*restApiV1.FavoriteSong, error)

func (*Store) DeletePlaylist

func (s *Store) DeletePlaylist(externalTrn *sqlx.Tx, playlistId restApiV1.PlaylistId) (*restApiV1.Playlist, error)

func (*Store) DeleteSong

func (s *Store) DeleteSong(externalTrn *sqlx.Tx, songId restApiV1.SongId) (*restApiV1.Song, error)

func (*Store) DeleteUser

func (s *Store) DeleteUser(externalTrn *sqlx.Tx, userId restApiV1.UserId) (*restApiV1.User, error)

func (*Store) GetDeletedAlbumIds

func (s *Store) GetDeletedAlbumIds(externalTrn *sqlx.Tx, fromTs int64) ([]restApiV1.AlbumId, error)

func (*Store) GetDeletedArtistIds

func (s *Store) GetDeletedArtistIds(externalTrn *sqlx.Tx, fromTs int64) ([]restApiV1.ArtistId, error)

func (*Store) GetDeletedFavoritePlaylistIds

func (s *Store) GetDeletedFavoritePlaylistIds(externalTrn *sqlx.Tx, fromTs int64) ([]restApiV1.FavoritePlaylistId, error)

func (*Store) GetDeletedFavoriteSongIds

func (s *Store) GetDeletedFavoriteSongIds(externalTrn *sqlx.Tx, fromTs int64) ([]restApiV1.FavoriteSongId, error)

func (*Store) GetDeletedPlaylistIds

func (s *Store) GetDeletedPlaylistIds(externalTrn *sqlx.Tx, fromTs int64) ([]restApiV1.PlaylistId, error)

func (*Store) GetDeletedSongIds

func (s *Store) GetDeletedSongIds(externalTrn *sqlx.Tx, fromTs int64) ([]restApiV1.SongId, error)

func (*Store) GetDeletedUserFavoritePlaylistIds

func (s *Store) GetDeletedUserFavoritePlaylistIds(externalTrn *sqlx.Tx, fromTs int64, userId restApiV1.UserId) ([]restApiV1.PlaylistId, error)

func (*Store) GetDeletedUserFavoriteSongIds

func (s *Store) GetDeletedUserFavoriteSongIds(externalTrn *sqlx.Tx, fromTs int64, userId restApiV1.UserId) ([]restApiV1.SongId, error)

func (*Store) GetDeletedUserIds

func (s *Store) GetDeletedUserIds(externalTrn *sqlx.Tx, fromTs int64) ([]restApiV1.UserId, error)

func (*Store) GetSongDirName

func (s *Store) GetSongDirName(songId restApiV1.SongId) string

func (*Store) GetSongFileName

func (s *Store) GetSongFileName(song *restApiV1.Song) string

func (*Store) ReadAlbum

func (s *Store) ReadAlbum(externalTrn *sqlx.Tx, albumId restApiV1.AlbumId) (*restApiV1.Album, error)

func (*Store) ReadAlbums

func (s *Store) ReadAlbums(externalTrn *sqlx.Tx, filter *restApiV1.AlbumFilter) ([]restApiV1.Album, error)

func (*Store) ReadArtist

func (s *Store) ReadArtist(externalTrn *sqlx.Tx, artistId restApiV1.ArtistId) (*restApiV1.Artist, error)

func (*Store) ReadArtists

func (s *Store) ReadArtists(externalTrn *sqlx.Tx, filter *restApiV1.ArtistFilter) ([]restApiV1.Artist, error)

func (*Store) ReadFavoritePlaylists

func (s *Store) ReadFavoritePlaylists(externalTrn *sqlx.Tx, filter *restApiV1.FavoritePlaylistFilter) ([]restApiV1.FavoritePlaylist, error)

func (*Store) ReadFavoriteSongs

func (s *Store) ReadFavoriteSongs(externalTrn *sqlx.Tx, filter *restApiV1.FavoriteSongFilter) ([]restApiV1.FavoriteSong, error)

func (*Store) ReadFileSyncReport

func (s *Store) ReadFileSyncReport(fromTs int64, userId restApiV1.UserId) (*restApiV1.FileSyncReport, error)

func (*Store) ReadFileSyncSongs

func (s *Store) ReadFileSyncSongs(externalTrn *sqlx.Tx, favoriteFromTs int64, favoriteUserId restApiV1.UserId) ([]restApiV1.FileSyncSong, error)

func (*Store) ReadPlaylist

func (s *Store) ReadPlaylist(externalTrn *sqlx.Tx, playlistId restApiV1.PlaylistId) (*restApiV1.Playlist, error)

func (*Store) ReadPlaylists

func (s *Store) ReadPlaylists(externalTrn *sqlx.Tx, filter *restApiV1.PlaylistFilter) ([]restApiV1.Playlist, error)

func (*Store) ReadSong

func (s *Store) ReadSong(externalTrn *sqlx.Tx, songId restApiV1.SongId) (*restApiV1.Song, error)

func (*Store) ReadSongContent

func (s *Store) ReadSongContent(song *restApiV1.Song) (*os.File, error)

func (*Store) ReadSongs

func (s *Store) ReadSongs(externalTrn *sqlx.Tx, filter *restApiV1.SongFilter) ([]restApiV1.Song, error)

func (*Store) ReadSyncReport

func (s *Store) ReadSyncReport(fromTs int64) (*restApiV1.SyncReport, error)

func (*Store) ReadUser

func (s *Store) ReadUser(externalTrn *sqlx.Tx, userId restApiV1.UserId) (*restApiV1.User, error)

func (*Store) ReadUserByUserName

func (s *Store) ReadUserByUserName(externalTrn *sqlx.Tx, userName string) (*restApiV1.User, error)

func (*Store) ReadUsers

func (s *Store) ReadUsers(externalTrn *sqlx.Tx, filter *restApiV1.UserFilter) ([]restApiV1.User, error)

func (*Store) UpdateAlbum

func (s *Store) UpdateAlbum(externalTrn *sqlx.Tx, albumId restApiV1.AlbumId, albumMeta *restApiV1.AlbumMeta) (*restApiV1.Album, error)

func (*Store) UpdateArtist

func (s *Store) UpdateArtist(externalTrn *sqlx.Tx, artistId restApiV1.ArtistId, artistMeta *restApiV1.ArtistMeta) (*restApiV1.Artist, error)

func (*Store) UpdatePlaylist

func (s *Store) UpdatePlaylist(externalTrn *sqlx.Tx, playlistId restApiV1.PlaylistId, playlistMeta *restApiV1.PlaylistMeta, check bool) (*restApiV1.Playlist, error)

func (*Store) UpdateSong

func (s *Store) UpdateSong(externalTrn *sqlx.Tx, songId restApiV1.SongId, songMeta *restApiV1.SongMeta, updateArtistMetaArtistId *restApiV1.ArtistId, check bool) (*restApiV1.Song, error)

func (*Store) UpdateSongContentTag

func (s *Store) UpdateSongContentTag(externalTrn *sqlx.Tx, songEntity *entity.SongEntity) error

UpdateSongContentTag update tags in song content

func (*Store) UpdateUser

func (s *Store) UpdateUser(externalTrn *sqlx.Tx, userId restApiV1.UserId, userMetaComplete *restApiV1.UserMetaComplete) (*restApiV1.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL