TrackPostgres

package
v0.0.0-...-704a905 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTrackPostgresRepo

func NewTrackPostgresRepo(db *sqlx.DB) domain.TrackRepo

Types

type TrackRepo

type TrackRepo struct {
	Sqlx *sqlx.DB
}

func (TrackRepo) AddToFavorites

func (table TrackRepo) AddToFavorites(trackId int64, userId int64) error

func (TrackRepo) CountPopularTrackOfWeek

func (table TrackRepo) CountPopularTrackOfWeek() (bool, error)

func (TrackRepo) Create

func (table TrackRepo) Create(dom *trackProto.Track) error

func (TrackRepo) Delete

func (table TrackRepo) Delete(id int64) error

func (TrackRepo) GetAll

func (table TrackRepo) GetAll() ([]*trackProto.Track, error)

func (TrackRepo) GetFavorites

func (table TrackRepo) GetFavorites(userId int64) ([]*trackProto.Track, error)

func (TrackRepo) GetLastId

func (table TrackRepo) GetLastId() (int64, error)

func (TrackRepo) GetPopular

func (table TrackRepo) GetPopular() ([]*trackProto.Track, error)

func (TrackRepo) GetPopularTrackOfWeekTop20

func (table TrackRepo) GetPopularTrackOfWeekTop20() ([]*trackProto.Track, error)

func (TrackRepo) GetPopularTracksFromArtist

func (table TrackRepo) GetPopularTracksFromArtist(artistId int64) ([]*trackProto.Track, error)

func (TrackRepo) GetSize

func (table TrackRepo) GetSize() (int64, error)

func (TrackRepo) GetTracksFromAlbum

func (table TrackRepo) GetTracksFromAlbum(albumId int64) ([]*trackProto.Track, error)

func (TrackRepo) GetTracksFromPlaylist

func (table TrackRepo) GetTracksFromPlaylist(playlistId int64) ([]*trackProto.Track, error)

func (TrackRepo) Like

func (table TrackRepo) Like(trackId int64, userId int64) error

func (TrackRepo) LikeCheckByUser

func (table TrackRepo) LikeCheckByUser(trackId int64, userId int64) (bool, error)

func (TrackRepo) Listen

func (table TrackRepo) Listen(trackId int64) error

func (TrackRepo) RemoveFromFavorites

func (table TrackRepo) RemoveFromFavorites(trackId int64, userId int64) error

func (TrackRepo) SearchByTitle

func (table TrackRepo) SearchByTitle(title string) ([]*trackProto.Track, error)

func (TrackRepo) SelectByID

func (table TrackRepo) SelectByID(id int64) (*trackProto.Track, error)

func (TrackRepo) Update

func (table TrackRepo) Update(dom *trackProto.Track) error

Jump to

Keyboard shortcuts

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