db

package
v0.0.0-...-ce70d39 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoMigrate

func AutoMigrate(dsn string) error

func Close

func Close(conn *pgxpool.Pool) error

func Connect

func Connect(dsn string) (*pgxpool.Pool, error)

func DecryptPassword

func DecryptPassword(encryptedPassword []byte) (string, error)

func EncryptPassword

func EncryptPassword(password string) ([]byte, error)

Types

type AddPlaylistTracksParams

type AddPlaylistTracksParams struct {
	PlaylistID string
	SongID     string
	Track      int32
}

type Album

type Album struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
}

type AlbumArtist

type AlbumArtist struct {
	AlbumID  string
	ArtistID string
}

type AlbumGenre

type AlbumGenre struct {
	AlbumID   string
	GenreName string
}

type AlbumRating

type AlbumRating struct {
	AlbumID  string
	UserName string
	Rating   int32
}

type AlbumStar

type AlbumStar struct {
	AlbumID  string
	UserName string
	Created  pgtype.Timestamptz
}

type Artist

type Artist struct {
	ID            string
	Name          string
	Created       pgtype.Timestamptz
	Updated       pgtype.Timestamptz
	MusicBrainzID *string
}

type ArtistRating

type ArtistRating struct {
	ArtistID string
	UserName string
	Rating   int32
}

type ArtistStar

type ArtistStar struct {
	ArtistID string
	UserName string
	Created  pgtype.Timestamptz
}

type CheckPlaylistExistsParams

type CheckPlaylistExistsParams struct {
	ID    string
	Owner string
}

type CreateAlbumArtistsParams

type CreateAlbumArtistsParams struct {
	AlbumID  string
	ArtistID string
}

type CreateAlbumGenresParams

type CreateAlbumGenresParams struct {
	AlbumID   string
	GenreName string
}

type CreateAlbumParams

type CreateAlbumParams struct {
	ID             string
	Name           string
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseMbid    *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
}

type CreateArtistParams

type CreateArtistParams struct {
	ID            string
	Name          string
	MusicBrainzID *string
}

type CreatePlaylistParams

type CreatePlaylistParams struct {
	ID      string
	Name    string
	Owner   string
	Public  bool
	Comment *string
}

type CreateScrobblesParams

type CreateScrobblesParams struct {
	UserName                string
	SongID                  string
	AlbumID                 *string
	Time                    pgtype.Timestamptz
	SongDurationMs          int32
	DurationMs              *int32
	SubmittedToListenbrainz bool
	NowPlaying              bool
}

type CreateSongArtistsParams

type CreateSongArtistsParams struct {
	SongID   string
	ArtistID string
}

type CreateSongGenresParams

type CreateSongGenresParams struct {
	SongID    string
	GenreName string
}

type CreateSongParams

type CreateSongParams struct {
	ID             string
	Path           string
	AlbumID        *string
	Title          string
	Track          *int32
	Year           *int32
	Size           int64
	ContentType    string
	DurationMs     int32
	BitRate        int32
	SamplingRate   int32
	ChannelCount   int32
	DiscNumber     *int32
	Bpm            *int32
	MusicBrainzID  *string
	ReplayGain     *float32
	ReplayGainPeak *float32
	Lyrics         *string
	CoverID        *string
}

type CreateUserParams

type CreateUserParams struct {
	Name              string
	EncryptedPassword []byte
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}

type DeleteLBFeedbackUpdatedStarsNotInMBIDListParams

type DeleteLBFeedbackUpdatedStarsNotInMBIDListParams struct {
	UserName  string
	SongMbids []string
}

type DeletePlaylistParams

type DeletePlaylistParams struct {
	ID    string
	Owner string
}

type FindAlbumArtistRefsBySongsRow

type FindAlbumArtistRefsBySongsRow struct {
	SongID string
	ID     string
	Name   string
}

type FindAlbumArtistsRow

type FindAlbumArtistsRow struct {
	ID            string
	Name          string
	Created       pgtype.Timestamptz
	Updated       pgtype.Timestamptz
	MusicBrainzID *string
	AlbumCount    int64
	Starred       pgtype.Timestamptz
	UserRating    *int32
	AvgRating     float64
}

type FindAlbumParams

type FindAlbumParams struct {
	UserName string
	ID       string
}

type FindAlbumRow

type FindAlbumRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type FindAlbumsAlphabeticalByNameParams

type FindAlbumsAlphabeticalByNameParams struct {
	UserName    string
	Offset      int32
	Limit       int32
	FromYear    *int32
	ToYear      *int32
	GenresLower []string
}

type FindAlbumsAlphabeticalByNameRow

type FindAlbumsAlphabeticalByNameRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type FindAlbumsByArtistParams

type FindAlbumsByArtistParams struct {
	UserName string
	ArtistID string
}

type FindAlbumsByArtistRow

type FindAlbumsByArtistRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type FindAlbumsByGenreParams

type FindAlbumsByGenreParams struct {
	UserName    string
	Offset      int32
	Limit       int32
	FromYear    *int32
	ToYear      *int32
	GenresLower []string
}

type FindAlbumsByGenreRow

type FindAlbumsByGenreRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type FindAlbumsByNameWithArtistMatchCountParams

type FindAlbumsByNameWithArtistMatchCountParams struct {
	Name        string
	ArtistNames []string
}

type FindAlbumsByNameWithArtistMatchCountRow

type FindAlbumsByNameWithArtistMatchCountRow struct {
	ID            string
	MusicBrainzID *string
	ArtistMatches int64
}

type FindAlbumsByYearParams

type FindAlbumsByYearParams struct {
	UserName    string
	Offset      int32
	Limit       int32
	FromYear    *int32
	ToYear      *int32
	GenresLower []string
}

type FindAlbumsByYearRow

type FindAlbumsByYearRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type FindAlbumsHighestRatedParams

type FindAlbumsHighestRatedParams struct {
	UserName    string
	Offset      int32
	Limit       int32
	FromYear    *int32
	ToYear      *int32
	GenresLower []string
}

type FindAlbumsHighestRatedRow

type FindAlbumsHighestRatedRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type FindAlbumsNewestParams

type FindAlbumsNewestParams struct {
	UserName    string
	Offset      int32
	Limit       int32
	FromYear    *int32
	ToYear      *int32
	GenresLower []string
}

type FindAlbumsNewestRow

type FindAlbumsNewestRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type FindAlbumsRandomParams

type FindAlbumsRandomParams struct {
	UserName    string
	Limit       int32
	FromYear    *int32
	ToYear      *int32
	GenresLower []string
}

type FindAlbumsRandomRow

type FindAlbumsRandomRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type FindAlbumsStarredParams

type FindAlbumsStarredParams struct {
	UserName    string
	Offset      int32
	Limit       int32
	FromYear    *int32
	ToYear      *int32
	GenresLower []string
}

type FindAlbumsStarredRow

type FindAlbumsStarredRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type FindArtistParams

type FindArtistParams struct {
	UserName string
	ID       string
}

type FindArtistRefsByAlbumsRow

type FindArtistRefsByAlbumsRow struct {
	AlbumID string
	ID      string
	Name    string
}

type FindArtistRefsBySongsRow

type FindArtistRefsBySongsRow struct {
	SongID        string
	ID            string
	Name          string
	MusicBrainzID *string
}

type FindArtistRow

type FindArtistRow struct {
	ID            string
	Name          string
	Created       pgtype.Timestamptz
	Updated       pgtype.Timestamptz
	MusicBrainzID *string
	Starred       pgtype.Timestamptz
	UserRating    *int32
	AvgRating     float64
}

type FindGenresByAlbumsRow

type FindGenresByAlbumsRow struct {
	AlbumID string
	Name    string
}

type FindGenresBySongsRow

type FindGenresBySongsRow struct {
	SongID string
	Name   string
}

type FindGenresWithCountRow

type FindGenresWithCountRow struct {
	Name       string
	AlbumCount int64
	SongCount  int64
}

type FindLBFeedbackUpdatedSongIDsInMBIDListNotStarredParams

type FindLBFeedbackUpdatedSongIDsInMBIDListNotStarredParams struct {
	UserName  string
	SongMbids []string
}

type FindNotLBUpdatedSongsRow

type FindNotLBUpdatedSongsRow struct {
	ID             string
	Path           string
	AlbumID        *string
	Title          string
	Track          *int32
	Year           *int32
	Size           int64
	ContentType    string
	DurationMs     int32
	BitRate        int32
	SamplingRate   int32
	ChannelCount   int32
	DiscNumber     *int32
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Bpm            *int32
	MusicBrainzID  *string
	ReplayGain     *float32
	ReplayGainPeak *float32
	Lyrics         *string
	CoverID        *string
	AlbumName      *string
	Starred        pgtype.Timestamptz
}

type FindPlaylistParams

type FindPlaylistParams struct {
	ID   string
	User string
}

type FindPlaylistRow

type FindPlaylistRow struct {
	ID         string
	Name       string
	Created    pgtype.Timestamptz
	Updated    pgtype.Timestamptz
	Owner      string
	Public     bool
	Comment    *string
	TrackCount int64
	DurationMs int64
}

type FindPlaylistsRow

type FindPlaylistsRow struct {
	ID         string
	Name       string
	Created    pgtype.Timestamptz
	Updated    pgtype.Timestamptz
	Owner      string
	Public     bool
	Comment    *string
	TrackCount int64
	DurationMs int64
}

type FindPossibleScrobbleConflictsParams

type FindPossibleScrobbleConflictsParams struct {
	UserName string
	SongIds  []string
	Times    []pgtype.Timestamptz
}

type FindRandomSongsParams

type FindRandomSongsParams struct {
	UserName    string
	Limit       int32
	FromYear    *int32
	ToYear      *int32
	GenresLower []string
}

type FindRandomSongsRow

type FindRandomSongsRow struct {
	ID                  string
	Path                string
	AlbumID             *string
	Title               string
	Track               *int32
	Year                *int32
	Size                int64
	ContentType         string
	DurationMs          int32
	BitRate             int32
	SamplingRate        int32
	ChannelCount        int32
	DiscNumber          *int32
	Created             pgtype.Timestamptz
	Updated             pgtype.Timestamptz
	Bpm                 *int32
	MusicBrainzID       *string
	ReplayGain          *float32
	ReplayGainPeak      *float32
	Lyrics              *string
	CoverID             *string
	AlbumName           *string
	AlbumReplayGain     *float32
	AlbumReplayGainPeak *float32
	Starred             pgtype.Timestamptz
	UserRating          *int32
	AvgRating           float64
}

type FindSongByPathRow

type FindSongByPathRow struct {
	ID             string
	Path           string
	AlbumID        *string
	Title          string
	Track          *int32
	Year           *int32
	Size           int64
	ContentType    string
	DurationMs     int32
	BitRate        int32
	SamplingRate   int32
	ChannelCount   int32
	DiscNumber     *int32
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Bpm            *int32
	MusicBrainzID  *string
	ReplayGain     *float32
	ReplayGainPeak *float32
	Lyrics         *string
	CoverID        *string
	AlbumName      *string
}

type FindSongRow

type FindSongRow struct {
	ID                 string
	Path               string
	AlbumID            *string
	Title              string
	Track              *int32
	Year               *int32
	Size               int64
	ContentType        string
	DurationMs         int32
	BitRate            int32
	SamplingRate       int32
	ChannelCount       int32
	DiscNumber         *int32
	Created            pgtype.Timestamptz
	Updated            pgtype.Timestamptz
	Bpm                *int32
	MusicBrainzID      *string
	ReplayGain         *float32
	ReplayGainPeak     *float32
	Lyrics             *string
	CoverID            *string
	AlbumName          *string
	AlbumMusicBrainzID *string
	AlbumReleaseMbid   *string
}

type FindSongsByAlbumParams

type FindSongsByAlbumParams struct {
	UserName string
	ID       string
}

type FindSongsByAlbumRow

type FindSongsByAlbumRow struct {
	ID                  string
	Path                string
	AlbumID             *string
	Title               string
	Track               *int32
	Year                *int32
	Size                int64
	ContentType         string
	DurationMs          int32
	BitRate             int32
	SamplingRate        int32
	ChannelCount        int32
	DiscNumber          *int32
	Created             pgtype.Timestamptz
	Updated             pgtype.Timestamptz
	Bpm                 *int32
	MusicBrainzID       *string
	ReplayGain          *float32
	ReplayGainPeak      *float32
	Lyrics              *string
	CoverID             *string
	AlbumName           *string
	AlbumReplayGain     *float32
	AlbumReplayGainPeak *float32
	Starred             pgtype.Timestamptz
	UserRating          *int32
	AvgRating           float64
}

type FindSongsByMusicBrainzIDRow

type FindSongsByMusicBrainzIDRow struct {
	ID                 string
	Path               string
	AlbumID            *string
	Title              string
	Track              *int32
	Year               *int32
	Size               int64
	ContentType        string
	DurationMs         int32
	BitRate            int32
	SamplingRate       int32
	ChannelCount       int32
	DiscNumber         *int32
	Created            pgtype.Timestamptz
	Updated            pgtype.Timestamptz
	Bpm                *int32
	MusicBrainzID      *string
	ReplayGain         *float32
	ReplayGainPeak     *float32
	Lyrics             *string
	CoverID            *string
	AlbumName          *string
	AlbumMusicBrainzID *string
	AlbumReleaseMbid   *string
}

type FindSongsRow

type FindSongsRow struct {
	ID                 string
	Path               string
	AlbumID            *string
	Title              string
	Track              *int32
	Year               *int32
	Size               int64
	ContentType        string
	DurationMs         int32
	BitRate            int32
	SamplingRate       int32
	ChannelCount       int32
	DiscNumber         *int32
	Created            pgtype.Timestamptz
	Updated            pgtype.Timestamptz
	Bpm                *int32
	MusicBrainzID      *string
	ReplayGain         *float32
	ReplayGainPeak     *float32
	Lyrics             *string
	CoverID            *string
	AlbumName          *string
	AlbumMusicBrainzID *string
	AlbumReleaseMbid   *string
}

type FindUnsubmittedLBScrobblesRow

type FindUnsubmittedLBScrobblesRow struct {
	UserName                   string
	SongID                     string
	AlbumID                    *string
	Time                       pgtype.Timestamptz
	SongDurationMs             int32
	DurationMs                 *int32
	SubmittedToListenbrainz    bool
	NowPlaying                 bool
	Name                       string
	EncryptedPassword          []byte
	EncryptedListenbrainzToken []byte
	ListenbrainzUsername       *string
}

type Genre

type Genre struct {
	Name string
}

type GetNowPlayingSongsRow

type GetNowPlayingSongsRow struct {
	UserName            string
	Time                pgtype.Timestamptz
	ID                  string
	Path                string
	AlbumID             *string
	Title               string
	Track               *int32
	Year                *int32
	Size                int64
	ContentType         string
	DurationMs          int32
	BitRate             int32
	SamplingRate        int32
	ChannelCount        int32
	DiscNumber          *int32
	Created             pgtype.Timestamptz
	Updated             pgtype.Timestamptz
	Bpm                 *int32
	MusicBrainzID       *string
	ReplayGain          *float32
	ReplayGainPeak      *float32
	Lyrics              *string
	CoverID             *string
	AlbumName           *string
	AlbumReplayGain     *float32
	AlbumReplayGainPeak *float32
	Starred             pgtype.Timestamptz
	UserRating          *int32
	AvgRating           float64
}

type GetPlaylistTracksParams

type GetPlaylistTracksParams struct {
	PlaylistID string
	UserName   string
}

type GetPlaylistTracksRow

type GetPlaylistTracksRow struct {
	ID                  string
	Path                string
	AlbumID             *string
	Title               string
	Track               *int32
	Year                *int32
	Size                int64
	ContentType         string
	DurationMs          int32
	BitRate             int32
	SamplingRate        int32
	ChannelCount        int32
	DiscNumber          *int32
	Created             pgtype.Timestamptz
	Updated             pgtype.Timestamptz
	Bpm                 *int32
	MusicBrainzID       *string
	ReplayGain          *float32
	ReplayGainPeak      *float32
	Lyrics              *string
	CoverID             *string
	AlbumName           *string
	AlbumReplayGain     *float32
	AlbumReplayGainPeak *float32
	Starred             pgtype.Timestamptz
	UserRating          *int32
	AvgRating           float64
}

type GetStreamInfoRow

type GetStreamInfoRow struct {
	Path         string
	BitRate      int32
	ContentType  string
	DurationMs   int32
	ChannelCount int32
}

type InsertSystemValueIfNotExistsParams

type InsertSystemValueIfNotExistsParams struct {
	Key   string
	Value string
}

type LbFeedbackUpdated

type LbFeedbackUpdated struct {
	SongID   string
	UserName string
	Mbid     string
}

type Playlist

type Playlist struct {
	ID      string
	Name    string
	Created pgtype.Timestamptz
	Updated pgtype.Timestamptz
	Owner   string
	Public  bool
	Comment *string
}

type PlaylistSong

type PlaylistSong struct {
	PlaylistID string
	SongID     string
	Track      int32
}

type Querier

type Querier interface {
	AddPlaylistTracks(ctx context.Context, arg []AddPlaylistTracksParams) (int64, error)
	CheckPlaylistExists(ctx context.Context, arg CheckPlaylistExistsParams) (bool, error)
	ClearPlaylist(ctx context.Context, playlistID string) error
	CreateAlbum(ctx context.Context, arg CreateAlbumParams) (*Album, error)
	CreateAlbumArtists(ctx context.Context, arg []CreateAlbumArtistsParams) (int64, error)
	CreateAlbumGenres(ctx context.Context, arg []CreateAlbumGenresParams) (int64, error)
	CreateArtist(ctx context.Context, arg CreateArtistParams) (*Artist, error)
	CreateGenre(ctx context.Context, name string) error
	CreatePlaylist(ctx context.Context, arg CreatePlaylistParams) error
	CreateScrobbles(ctx context.Context, arg []CreateScrobblesParams) (int64, error)
	CreateSong(ctx context.Context, arg CreateSongParams) (*Song, error)
	CreateSongArtists(ctx context.Context, arg []CreateSongArtistsParams) (int64, error)
	CreateSongGenres(ctx context.Context, arg []CreateSongGenresParams) (int64, error)
	CreateUser(ctx context.Context, arg CreateUserParams) error
	DeleteAlbumArtists(ctx context.Context, albumID string) error
	DeleteAlbumGenres(ctx context.Context, albumID string) error
	DeleteAlbumsLastUpdatedBefore(ctx context.Context, updated pgtype.Timestamptz) error
	DeleteAllGenres(ctx context.Context) error
	DeleteArtistsLastUpdatedBefore(ctx context.Context, updated pgtype.Timestamptz) error
	DeleteGenre(ctx context.Context, name string) error
	DeleteLBFeedbackUpdatedStarsNotInMBIDList(ctx context.Context, arg DeleteLBFeedbackUpdatedStarsNotInMBIDListParams) (pgconn.CommandTag, error)
	DeleteNowPlaying(ctx context.Context, userName string) error
	DeletePlaylist(ctx context.Context, arg DeletePlaylistParams) (pgconn.CommandTag, error)
	DeleteSongArtists(ctx context.Context, songID string) error
	DeleteSongGenres(ctx context.Context, songID string) error
	DeleteSongsLastUpdatedBefore(ctx context.Context, updated pgtype.Timestamptz) error
	DeleteUser(ctx context.Context, name string) (string, error)
	FindAlbum(ctx context.Context, arg FindAlbumParams) (*FindAlbumRow, error)
	FindAlbumArtistRefsBySongs(ctx context.Context, songIds []string) ([]*FindAlbumArtistRefsBySongsRow, error)
	FindAlbumArtists(ctx context.Context, userName string) ([]*FindAlbumArtistsRow, error)
	FindAlbumsAlphabeticalByName(ctx context.Context, arg FindAlbumsAlphabeticalByNameParams) ([]*FindAlbumsAlphabeticalByNameRow, error)
	FindAlbumsByArtist(ctx context.Context, arg FindAlbumsByArtistParams) ([]*FindAlbumsByArtistRow, error)
	FindAlbumsByGenre(ctx context.Context, arg FindAlbumsByGenreParams) ([]*FindAlbumsByGenreRow, error)
	FindAlbumsByNameWithArtistMatchCount(ctx context.Context, arg FindAlbumsByNameWithArtistMatchCountParams) ([]*FindAlbumsByNameWithArtistMatchCountRow, error)
	FindAlbumsByYear(ctx context.Context, arg FindAlbumsByYearParams) ([]*FindAlbumsByYearRow, error)
	FindAlbumsHighestRated(ctx context.Context, arg FindAlbumsHighestRatedParams) ([]*FindAlbumsHighestRatedRow, error)
	FindAlbumsNewest(ctx context.Context, arg FindAlbumsNewestParams) ([]*FindAlbumsNewestRow, error)
	FindAlbumsRandom(ctx context.Context, arg FindAlbumsRandomParams) ([]*FindAlbumsRandomRow, error)
	FindAlbumsStarred(ctx context.Context, arg FindAlbumsStarredParams) ([]*FindAlbumsStarredRow, error)
	FindAllGenres(ctx context.Context) ([]string, error)
	FindArtist(ctx context.Context, arg FindArtistParams) (*FindArtistRow, error)
	FindArtistRefsByAlbums(ctx context.Context, albumIds []string) ([]*FindArtistRefsByAlbumsRow, error)
	FindArtistRefsBySongs(ctx context.Context, songIds []string) ([]*FindArtistRefsBySongsRow, error)
	FindArtistSimple(ctx context.Context, id string) (*Artist, error)
	FindArtistsByName(ctx context.Context, artistNames []string) ([]*Artist, error)
	FindGenre(ctx context.Context, name string) (string, error)
	FindGenresByAlbums(ctx context.Context, albumIds []string) ([]*FindGenresByAlbumsRow, error)
	FindGenresBySongs(ctx context.Context, songIds []string) ([]*FindGenresBySongsRow, error)
	FindGenresWithCount(ctx context.Context) ([]*FindGenresWithCountRow, error)
	FindLBFeedbackUpdatedSongIDsInMBIDListNotStarred(ctx context.Context, arg FindLBFeedbackUpdatedSongIDsInMBIDListNotStarredParams) ([]string, error)
	FindNotLBUpdatedSongs(ctx context.Context, userName string) ([]*FindNotLBUpdatedSongsRow, error)
	FindPlaylist(ctx context.Context, arg FindPlaylistParams) (*FindPlaylistRow, error)
	FindPlaylists(ctx context.Context, user string) ([]*FindPlaylistsRow, error)
	FindPossibleScrobbleConflicts(ctx context.Context, arg FindPossibleScrobbleConflictsParams) ([]*Scrobble, error)
	FindRandomSongs(ctx context.Context, arg FindRandomSongsParams) ([]*FindRandomSongsRow, error)
	FindSong(ctx context.Context, id string) (*FindSongRow, error)
	FindSongByPath(ctx context.Context, path string) (*FindSongByPathRow, error)
	FindSongCount(ctx context.Context) (int64, error)
	FindSongWithoutAlbum(ctx context.Context, id string) (*Song, error)
	FindSongs(ctx context.Context, songIds []string) ([]*FindSongsRow, error)
	FindSongsByAlbum(ctx context.Context, arg FindSongsByAlbumParams) ([]*FindSongsByAlbumRow, error)
	FindSongsByMusicBrainzID(ctx context.Context, musicBrainzID *string) ([]*FindSongsByMusicBrainzIDRow, error)
	FindUnsubmittedLBScrobbles(ctx context.Context) ([]*FindUnsubmittedLBScrobblesRow, error)
	FindUser(ctx context.Context, name string) (*User, error)
	FindUsers(ctx context.Context) ([]*User, error)
	GetNowPlaying(ctx context.Context, userName string) (*Scrobble, error)
	GetNowPlayingSongs(ctx context.Context, userName string) ([]*GetNowPlayingSongsRow, error)
	GetPlaylistOwner(ctx context.Context, id string) (string, error)
	GetPlaylistTrackNumbers(ctx context.Context, playlistID string) ([]int32, error)
	GetPlaylistTracks(ctx context.Context, arg GetPlaylistTracksParams) ([]*GetPlaylistTracksRow, error)
	GetStreamInfo(ctx context.Context, id string) (*GetStreamInfoRow, error)
	GetSystemValue(ctx context.Context, key string) (*System, error)
	InsertSystemValueIfNotExists(ctx context.Context, arg InsertSystemValueIfNotExistsParams) (*System, error)
	RemoveAlbumRating(ctx context.Context, arg RemoveAlbumRatingParams) error
	RemoveArtistRating(ctx context.Context, arg RemoveArtistRatingParams) error
	RemoveLBFeedbackUpdated(ctx context.Context, arg RemoveLBFeedbackUpdatedParams) error
	RemovePlaylistTracks(ctx context.Context, arg RemovePlaylistTracksParams) error
	RemoveSongRating(ctx context.Context, arg RemoveSongRatingParams) error
	ReplaceSystemValue(ctx context.Context, arg ReplaceSystemValueParams) (*System, error)
	SearchAlbumArtists(ctx context.Context, arg SearchAlbumArtistsParams) ([]*SearchAlbumArtistsRow, error)
	SearchAlbums(ctx context.Context, arg SearchAlbumsParams) ([]*SearchAlbumsRow, error)
	SearchSongs(ctx context.Context, arg SearchSongsParams) ([]*SearchSongsRow, error)
	SetAlbumRating(ctx context.Context, arg SetAlbumRatingParams) error
	SetArtistRating(ctx context.Context, arg SetArtistRatingParams) error
	SetLBFeedbackUpdated(ctx context.Context, arg []SetLBFeedbackUpdatedParams) (int64, error)
	SetLBSubmittedByUsers(ctx context.Context, userNames []string) error
	SetSongRating(ctx context.Context, arg SetSongRatingParams) error
	StarAlbum(ctx context.Context, arg StarAlbumParams) error
	StarArtist(ctx context.Context, arg StarArtistParams) error
	StarSong(ctx context.Context, arg StarSongParams) error
	StarSongs(ctx context.Context, arg []StarSongsParams) (int64, error)
	UnstarAlbum(ctx context.Context, arg UnstarAlbumParams) error
	UnstarArtist(ctx context.Context, arg UnstarArtistParams) error
	UnstarSong(ctx context.Context, arg UnstarSongParams) error
	UpdateAlbum(ctx context.Context, arg UpdateAlbumParams) error
	UpdateArtist(ctx context.Context, arg UpdateArtistParams) error
	UpdatePlaylist(ctx context.Context, arg UpdatePlaylistParams) error
	UpdatePlaylistName(ctx context.Context, arg UpdatePlaylistNameParams) (pgconn.CommandTag, error)
	UpdatePlaylistTrackNumbers(ctx context.Context, arg UpdatePlaylistTrackNumbersParams) error
	UpdatePlaylistUpdated(ctx context.Context, arg UpdatePlaylistUpdatedParams) (pgconn.CommandTag, error)
	UpdateSong(ctx context.Context, arg UpdateSongParams) error
	UpdateUserListenBrainzConnection(ctx context.Context, arg UpdateUserListenBrainzConnectionParams) (*User, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddPlaylistTracks

func (q *Queries) AddPlaylistTracks(ctx context.Context, arg []AddPlaylistTracksParams) (int64, error)

func (*Queries) CheckPlaylistExists

func (q *Queries) CheckPlaylistExists(ctx context.Context, arg CheckPlaylistExistsParams) (bool, error)

func (*Queries) ClearPlaylist

func (q *Queries) ClearPlaylist(ctx context.Context, playlistID string) error

func (*Queries) CreateAlbum

func (q *Queries) CreateAlbum(ctx context.Context, arg CreateAlbumParams) (*Album, error)

func (*Queries) CreateAlbumArtists

func (q *Queries) CreateAlbumArtists(ctx context.Context, arg []CreateAlbumArtistsParams) (int64, error)

func (*Queries) CreateAlbumGenres

func (q *Queries) CreateAlbumGenres(ctx context.Context, arg []CreateAlbumGenresParams) (int64, error)

func (*Queries) CreateArtist

func (q *Queries) CreateArtist(ctx context.Context, arg CreateArtistParams) (*Artist, error)

func (*Queries) CreateGenre

func (q *Queries) CreateGenre(ctx context.Context, name string) error

func (*Queries) CreatePlaylist

func (q *Queries) CreatePlaylist(ctx context.Context, arg CreatePlaylistParams) error

func (*Queries) CreateScrobbles

func (q *Queries) CreateScrobbles(ctx context.Context, arg []CreateScrobblesParams) (int64, error)

func (*Queries) CreateSong

func (q *Queries) CreateSong(ctx context.Context, arg CreateSongParams) (*Song, error)

func (*Queries) CreateSongArtists

func (q *Queries) CreateSongArtists(ctx context.Context, arg []CreateSongArtistsParams) (int64, error)

func (*Queries) CreateSongGenres

func (q *Queries) CreateSongGenres(ctx context.Context, arg []CreateSongGenresParams) (int64, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) error

func (*Queries) DeleteAlbumArtists

func (q *Queries) DeleteAlbumArtists(ctx context.Context, albumID string) error

func (*Queries) DeleteAlbumGenres

func (q *Queries) DeleteAlbumGenres(ctx context.Context, albumID string) error

func (*Queries) DeleteAlbumsLastUpdatedBefore

func (q *Queries) DeleteAlbumsLastUpdatedBefore(ctx context.Context, updated pgtype.Timestamptz) error

func (*Queries) DeleteAllGenres

func (q *Queries) DeleteAllGenres(ctx context.Context) error

func (*Queries) DeleteArtistsLastUpdatedBefore

func (q *Queries) DeleteArtistsLastUpdatedBefore(ctx context.Context, updated pgtype.Timestamptz) error

func (*Queries) DeleteGenre

func (q *Queries) DeleteGenre(ctx context.Context, name string) error

func (*Queries) DeleteLBFeedbackUpdatedStarsNotInMBIDList

func (q *Queries) DeleteLBFeedbackUpdatedStarsNotInMBIDList(ctx context.Context, arg DeleteLBFeedbackUpdatedStarsNotInMBIDListParams) (pgconn.CommandTag, error)

func (*Queries) DeleteNowPlaying

func (q *Queries) DeleteNowPlaying(ctx context.Context, userName string) error

func (*Queries) DeletePlaylist

func (q *Queries) DeletePlaylist(ctx context.Context, arg DeletePlaylistParams) (pgconn.CommandTag, error)

func (*Queries) DeleteSongArtists

func (q *Queries) DeleteSongArtists(ctx context.Context, songID string) error

func (*Queries) DeleteSongGenres

func (q *Queries) DeleteSongGenres(ctx context.Context, songID string) error

func (*Queries) DeleteSongsLastUpdatedBefore

func (q *Queries) DeleteSongsLastUpdatedBefore(ctx context.Context, updated pgtype.Timestamptz) error

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, name string) (string, error)

func (*Queries) FindAlbum

func (q *Queries) FindAlbum(ctx context.Context, arg FindAlbumParams) (*FindAlbumRow, error)

func (*Queries) FindAlbumArtistRefsBySongs

func (q *Queries) FindAlbumArtistRefsBySongs(ctx context.Context, songIds []string) ([]*FindAlbumArtistRefsBySongsRow, error)

func (*Queries) FindAlbumArtists

func (q *Queries) FindAlbumArtists(ctx context.Context, userName string) ([]*FindAlbumArtistsRow, error)

func (*Queries) FindAlbumsByArtist

func (q *Queries) FindAlbumsByArtist(ctx context.Context, arg FindAlbumsByArtistParams) ([]*FindAlbumsByArtistRow, error)

func (*Queries) FindAlbumsByGenre

func (q *Queries) FindAlbumsByGenre(ctx context.Context, arg FindAlbumsByGenreParams) ([]*FindAlbumsByGenreRow, error)

func (*Queries) FindAlbumsByYear

func (q *Queries) FindAlbumsByYear(ctx context.Context, arg FindAlbumsByYearParams) ([]*FindAlbumsByYearRow, error)

func (*Queries) FindAlbumsHighestRated

func (q *Queries) FindAlbumsHighestRated(ctx context.Context, arg FindAlbumsHighestRatedParams) ([]*FindAlbumsHighestRatedRow, error)

func (*Queries) FindAlbumsNewest

func (q *Queries) FindAlbumsNewest(ctx context.Context, arg FindAlbumsNewestParams) ([]*FindAlbumsNewestRow, error)

func (*Queries) FindAlbumsRandom

func (q *Queries) FindAlbumsRandom(ctx context.Context, arg FindAlbumsRandomParams) ([]*FindAlbumsRandomRow, error)

func (*Queries) FindAlbumsStarred

func (q *Queries) FindAlbumsStarred(ctx context.Context, arg FindAlbumsStarredParams) ([]*FindAlbumsStarredRow, error)

func (*Queries) FindAllGenres

func (q *Queries) FindAllGenres(ctx context.Context) ([]string, error)

func (*Queries) FindArtist

func (q *Queries) FindArtist(ctx context.Context, arg FindArtistParams) (*FindArtistRow, error)

func (*Queries) FindArtistRefsByAlbums

func (q *Queries) FindArtistRefsByAlbums(ctx context.Context, albumIds []string) ([]*FindArtistRefsByAlbumsRow, error)

func (*Queries) FindArtistRefsBySongs

func (q *Queries) FindArtistRefsBySongs(ctx context.Context, songIds []string) ([]*FindArtistRefsBySongsRow, error)

func (*Queries) FindArtistSimple

func (q *Queries) FindArtistSimple(ctx context.Context, id string) (*Artist, error)

func (*Queries) FindArtistsByName

func (q *Queries) FindArtistsByName(ctx context.Context, artistNames []string) ([]*Artist, error)

func (*Queries) FindGenre

func (q *Queries) FindGenre(ctx context.Context, name string) (string, error)

func (*Queries) FindGenresByAlbums

func (q *Queries) FindGenresByAlbums(ctx context.Context, albumIds []string) ([]*FindGenresByAlbumsRow, error)

func (*Queries) FindGenresBySongs

func (q *Queries) FindGenresBySongs(ctx context.Context, songIds []string) ([]*FindGenresBySongsRow, error)

func (*Queries) FindGenresWithCount

func (q *Queries) FindGenresWithCount(ctx context.Context) ([]*FindGenresWithCountRow, error)

func (*Queries) FindLBFeedbackUpdatedSongIDsInMBIDListNotStarred

func (q *Queries) FindLBFeedbackUpdatedSongIDsInMBIDListNotStarred(ctx context.Context, arg FindLBFeedbackUpdatedSongIDsInMBIDListNotStarredParams) ([]string, error)

func (*Queries) FindNotLBUpdatedSongs

func (q *Queries) FindNotLBUpdatedSongs(ctx context.Context, userName string) ([]*FindNotLBUpdatedSongsRow, error)

func (*Queries) FindPlaylist

func (q *Queries) FindPlaylist(ctx context.Context, arg FindPlaylistParams) (*FindPlaylistRow, error)

func (*Queries) FindPlaylists

func (q *Queries) FindPlaylists(ctx context.Context, user string) ([]*FindPlaylistsRow, error)

func (*Queries) FindPossibleScrobbleConflicts

func (q *Queries) FindPossibleScrobbleConflicts(ctx context.Context, arg FindPossibleScrobbleConflictsParams) ([]*Scrobble, error)

func (*Queries) FindRandomSongs

func (q *Queries) FindRandomSongs(ctx context.Context, arg FindRandomSongsParams) ([]*FindRandomSongsRow, error)

func (*Queries) FindSong

func (q *Queries) FindSong(ctx context.Context, id string) (*FindSongRow, error)

func (*Queries) FindSongByPath

func (q *Queries) FindSongByPath(ctx context.Context, path string) (*FindSongByPathRow, error)

func (*Queries) FindSongCount

func (q *Queries) FindSongCount(ctx context.Context) (int64, error)

func (*Queries) FindSongWithoutAlbum

func (q *Queries) FindSongWithoutAlbum(ctx context.Context, id string) (*Song, error)

func (*Queries) FindSongs

func (q *Queries) FindSongs(ctx context.Context, songIds []string) ([]*FindSongsRow, error)

func (*Queries) FindSongsByAlbum

func (q *Queries) FindSongsByAlbum(ctx context.Context, arg FindSongsByAlbumParams) ([]*FindSongsByAlbumRow, error)

func (*Queries) FindSongsByMusicBrainzID

func (q *Queries) FindSongsByMusicBrainzID(ctx context.Context, musicBrainzID *string) ([]*FindSongsByMusicBrainzIDRow, error)

func (*Queries) FindUnsubmittedLBScrobbles

func (q *Queries) FindUnsubmittedLBScrobbles(ctx context.Context) ([]*FindUnsubmittedLBScrobblesRow, error)

func (*Queries) FindUser

func (q *Queries) FindUser(ctx context.Context, name string) (*User, error)

func (*Queries) FindUsers

func (q *Queries) FindUsers(ctx context.Context) ([]*User, error)

func (*Queries) GetNowPlaying

func (q *Queries) GetNowPlaying(ctx context.Context, userName string) (*Scrobble, error)

func (*Queries) GetNowPlayingSongs

func (q *Queries) GetNowPlayingSongs(ctx context.Context, userName string) ([]*GetNowPlayingSongsRow, error)

func (*Queries) GetPlaylistOwner

func (q *Queries) GetPlaylistOwner(ctx context.Context, id string) (string, error)

func (*Queries) GetPlaylistTrackNumbers

func (q *Queries) GetPlaylistTrackNumbers(ctx context.Context, playlistID string) ([]int32, error)

func (*Queries) GetPlaylistTracks

func (q *Queries) GetPlaylistTracks(ctx context.Context, arg GetPlaylistTracksParams) ([]*GetPlaylistTracksRow, error)

func (*Queries) GetStreamInfo

func (q *Queries) GetStreamInfo(ctx context.Context, id string) (*GetStreamInfoRow, error)

func (*Queries) GetSystemValue

func (q *Queries) GetSystemValue(ctx context.Context, key string) (*System, error)

func (*Queries) InsertSystemValueIfNotExists

func (q *Queries) InsertSystemValueIfNotExists(ctx context.Context, arg InsertSystemValueIfNotExistsParams) (*System, error)

func (*Queries) RemoveAlbumRating

func (q *Queries) RemoveAlbumRating(ctx context.Context, arg RemoveAlbumRatingParams) error

func (*Queries) RemoveArtistRating

func (q *Queries) RemoveArtistRating(ctx context.Context, arg RemoveArtistRatingParams) error

func (*Queries) RemoveLBFeedbackUpdated

func (q *Queries) RemoveLBFeedbackUpdated(ctx context.Context, arg RemoveLBFeedbackUpdatedParams) error

func (*Queries) RemovePlaylistTracks

func (q *Queries) RemovePlaylistTracks(ctx context.Context, arg RemovePlaylistTracksParams) error

func (*Queries) RemoveSongRating

func (q *Queries) RemoveSongRating(ctx context.Context, arg RemoveSongRatingParams) error

func (*Queries) ReplaceSystemValue

func (q *Queries) ReplaceSystemValue(ctx context.Context, arg ReplaceSystemValueParams) (*System, error)

func (*Queries) SearchAlbumArtists

func (q *Queries) SearchAlbumArtists(ctx context.Context, arg SearchAlbumArtistsParams) ([]*SearchAlbumArtistsRow, error)

func (*Queries) SearchAlbums

func (q *Queries) SearchAlbums(ctx context.Context, arg SearchAlbumsParams) ([]*SearchAlbumsRow, error)

func (*Queries) SearchSongs

func (q *Queries) SearchSongs(ctx context.Context, arg SearchSongsParams) ([]*SearchSongsRow, error)

func (*Queries) SetAlbumRating

func (q *Queries) SetAlbumRating(ctx context.Context, arg SetAlbumRatingParams) error

func (*Queries) SetArtistRating

func (q *Queries) SetArtistRating(ctx context.Context, arg SetArtistRatingParams) error

func (*Queries) SetLBFeedbackUpdated

func (q *Queries) SetLBFeedbackUpdated(ctx context.Context, arg []SetLBFeedbackUpdatedParams) (int64, error)

func (*Queries) SetLBSubmittedByUsers

func (q *Queries) SetLBSubmittedByUsers(ctx context.Context, userNames []string) error

func (*Queries) SetSongRating

func (q *Queries) SetSongRating(ctx context.Context, arg SetSongRatingParams) error

func (*Queries) StarAlbum

func (q *Queries) StarAlbum(ctx context.Context, arg StarAlbumParams) error

func (*Queries) StarArtist

func (q *Queries) StarArtist(ctx context.Context, arg StarArtistParams) error

func (*Queries) StarSong

func (q *Queries) StarSong(ctx context.Context, arg StarSongParams) error

func (*Queries) StarSongs

func (q *Queries) StarSongs(ctx context.Context, arg []StarSongsParams) (int64, error)

func (*Queries) UnstarAlbum

func (q *Queries) UnstarAlbum(ctx context.Context, arg UnstarAlbumParams) error

func (*Queries) UnstarArtist

func (q *Queries) UnstarArtist(ctx context.Context, arg UnstarArtistParams) error

func (*Queries) UnstarSong

func (q *Queries) UnstarSong(ctx context.Context, arg UnstarSongParams) error

func (*Queries) UpdateAlbum

func (q *Queries) UpdateAlbum(ctx context.Context, arg UpdateAlbumParams) error

func (*Queries) UpdateArtist

func (q *Queries) UpdateArtist(ctx context.Context, arg UpdateArtistParams) error

func (*Queries) UpdatePlaylist

func (q *Queries) UpdatePlaylist(ctx context.Context, arg UpdatePlaylistParams) error

func (*Queries) UpdatePlaylistName

func (q *Queries) UpdatePlaylistName(ctx context.Context, arg UpdatePlaylistNameParams) (pgconn.CommandTag, error)

func (*Queries) UpdatePlaylistTrackNumbers

func (q *Queries) UpdatePlaylistTrackNumbers(ctx context.Context, arg UpdatePlaylistTrackNumbersParams) error

func (*Queries) UpdatePlaylistUpdated

func (q *Queries) UpdatePlaylistUpdated(ctx context.Context, arg UpdatePlaylistUpdatedParams) (pgconn.CommandTag, error)

func (*Queries) UpdateSong

func (q *Queries) UpdateSong(ctx context.Context, arg UpdateSongParams) error

func (*Queries) UpdateUserListenBrainzConnection

func (q *Queries) UpdateUserListenBrainzConnection(ctx context.Context, arg UpdateUserListenBrainzConnectionParams) (*User, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RemoveAlbumRatingParams

type RemoveAlbumRatingParams struct {
	UserName string
	AlbumID  string
}

type RemoveArtistRatingParams

type RemoveArtistRatingParams struct {
	UserName string
	ArtistID string
}

type RemoveLBFeedbackUpdatedParams

type RemoveLBFeedbackUpdatedParams struct {
	UserName string
	SongIds  []string
}

type RemovePlaylistTracksParams

type RemovePlaylistTracksParams struct {
	PlaylistID string
	Tracks     []int32
}

type RemoveSongRatingParams

type RemoveSongRatingParams struct {
	UserName string
	SongID   string
}

type ReplaceSystemValueParams

type ReplaceSystemValueParams struct {
	Key   string
	Value string
}

type Scrobble

type Scrobble struct {
	UserName                string
	SongID                  string
	AlbumID                 *string
	Time                    pgtype.Timestamptz
	SongDurationMs          int32
	DurationMs              *int32
	SubmittedToListenbrainz bool
	NowPlaying              bool
}

type SearchAlbumArtistsParams

type SearchAlbumArtistsParams struct {
	UserName  string
	Offset    int32
	Limit     int32
	SearchStr string
}

type SearchAlbumArtistsRow

type SearchAlbumArtistsRow struct {
	ID            string
	Name          string
	Created       pgtype.Timestamptz
	Updated       pgtype.Timestamptz
	MusicBrainzID *string
	AlbumCount    int64
	Starred       pgtype.Timestamptz
	UserRating    *int32
	AvgRating     float64
}

type SearchAlbumsParams

type SearchAlbumsParams struct {
	UserName  string
	Offset    int32
	Limit     int32
	SearchStr string
}

type SearchAlbumsRow

type SearchAlbumsRow struct {
	ID             string
	Name           string
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
	ReleaseMbid    *string
	TrackCount     int64
	DurationMs     int64
	Starred        pgtype.Timestamptz
	UserRating     *int32
	AvgRating      float64
}

type SearchSongsParams

type SearchSongsParams struct {
	UserName  string
	Offset    int32
	Limit     int32
	SearchStr string
}

type SearchSongsRow

type SearchSongsRow struct {
	ID                  string
	Path                string
	AlbumID             *string
	Title               string
	Track               *int32
	Year                *int32
	Size                int64
	ContentType         string
	DurationMs          int32
	BitRate             int32
	SamplingRate        int32
	ChannelCount        int32
	DiscNumber          *int32
	Created             pgtype.Timestamptz
	Updated             pgtype.Timestamptz
	Bpm                 *int32
	MusicBrainzID       *string
	ReplayGain          *float32
	ReplayGainPeak      *float32
	Lyrics              *string
	CoverID             *string
	AlbumName           *string
	AlbumReplayGain     *float32
	AlbumReplayGainPeak *float32
	Starred             pgtype.Timestamptz
	UserRating          *int32
	AvgRating           float64
}

type SetAlbumRatingParams

type SetAlbumRatingParams struct {
	AlbumID  string
	UserName string
	Rating   int32
}

type SetArtistRatingParams

type SetArtistRatingParams struct {
	ArtistID string
	UserName string
	Rating   int32
}

type SetLBFeedbackUpdatedParams

type SetLBFeedbackUpdatedParams struct {
	SongID   string
	UserName string
	Mbid     string
}

type SetSongRatingParams

type SetSongRatingParams struct {
	SongID   string
	UserName string
	Rating   int32
}

type Song

type Song struct {
	ID             string
	Path           string
	AlbumID        *string
	Title          string
	Track          *int32
	Year           *int32
	Size           int64
	ContentType    string
	DurationMs     int32
	BitRate        int32
	SamplingRate   int32
	ChannelCount   int32
	DiscNumber     *int32
	Created        pgtype.Timestamptz
	Updated        pgtype.Timestamptz
	Bpm            *int32
	MusicBrainzID  *string
	ReplayGain     *float32
	ReplayGainPeak *float32
	Lyrics         *string
	CoverID        *string
}

type SongArtist

type SongArtist struct {
	SongID   string
	ArtistID string
}

type SongGenre

type SongGenre struct {
	SongID    string
	GenreName string
}

type SongRating

type SongRating struct {
	SongID   string
	UserName string
	Rating   int32
}

type SongStar

type SongStar struct {
	SongID   string
	UserName string
	Created  pgtype.Timestamptz
}

type StarAlbumParams

type StarAlbumParams struct {
	AlbumID  string
	UserName string
}

type StarArtistParams

type StarArtistParams struct {
	ArtistID string
	UserName string
}

type StarSongParams

type StarSongParams struct {
	SongID   string
	UserName string
}

type StarSongsParams

type StarSongsParams struct {
	SongID   string
	UserName string
	Created  pgtype.Timestamptz
}

type Store

type Store interface {
	Querier
	BeginTransaction(ctx context.Context) (Store, error)
	InstanceID() string
	Commit(ctx context.Context) error
	Rollback(ctx context.Context) error
	FindOrCreateArtistIDs(ctx context.Context, names []string) ([]string, error)
	UpdateAlbumArtists(ctx context.Context, albumID string, artistIDs []string) error
	UpdateAlbumGenres(ctx context.Context, albumID string, genres []string) error
	UpdateSongArtists(ctx context.Context, songID string, artistIDs []string) error
	UpdateSongGenres(ctx context.Context, songID string, genres []string) error
}

func NewStore

func NewStore(db *pgxpool.Pool) (Store, error)

type System

type System struct {
	Key   string
	Value string
}

type UnstarAlbumParams

type UnstarAlbumParams struct {
	UserName string
	AlbumID  string
}

type UnstarArtistParams

type UnstarArtistParams struct {
	UserName string
	ArtistID string
}

type UnstarSongParams

type UnstarSongParams struct {
	UserName string
	SongID   string
}

type UpdateAlbumParams

type UpdateAlbumParams struct {
	ID             string
	Name           string
	Year           *int32
	RecordLabels   *string
	MusicBrainzID  *string
	ReleaseMbid    *string
	ReleaseTypes   *string
	IsCompilation  *bool
	ReplayGain     *float32
	ReplayGainPeak *float32
}

type UpdateArtistParams

type UpdateArtistParams struct {
	ID            string
	Name          string
	MusicBrainzID *string
}

type UpdatePlaylistNameParams

type UpdatePlaylistNameParams struct {
	ID    string
	Owner string
	Name  string
}

type UpdatePlaylistParams

type UpdatePlaylistParams struct {
	ID      string
	Owner   string
	Name    string
	Public  bool
	Comment *string
}

type UpdatePlaylistTrackNumbersParams

type UpdatePlaylistTrackNumbersParams struct {
	PlaylistID string
	Add        int32
	MinTrack   int32
	MaxTrack   int32
}

type UpdatePlaylistUpdatedParams

type UpdatePlaylistUpdatedParams struct {
	ID    string
	Owner string
}

type UpdateSongParams

type UpdateSongParams struct {
	ID             string
	Path           string
	AlbumID        *string
	Title          string
	Track          *int32
	Year           *int32
	Size           int64
	ContentType    string
	DurationMs     int32
	BitRate        int32
	SamplingRate   int32
	ChannelCount   int32
	DiscNumber     *int32
	Bpm            *int32
	MusicBrainzID  *string
	ReplayGain     *float32
	ReplayGainPeak *float32
	Lyrics         *string
	CoverID        *string
}

type UpdateUserListenBrainzConnectionParams

type UpdateUserListenBrainzConnectionParams struct {
	Name                       string
	EncryptedListenbrainzToken []byte
	ListenbrainzUsername       *string
}

type User

type User struct {
	Name                       string
	EncryptedPassword          []byte
	EncryptedListenbrainzToken []byte
	ListenbrainzUsername       *string
}

Jump to

Keyboard shortcuts

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