datastore

package
v0.0.0-...-fddd541 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlbumRepository

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

func NewAlbumRepository

func NewAlbumRepository(dbHandler *gorm.DB) *AlbumRepository

func (*AlbumRepository) GetByAlbumId

func (r *AlbumRepository) GetByAlbumId(albumId string) (*core.Album, error)

func (*AlbumRepository) GetByArtistIdAndName

func (r *AlbumRepository) GetByArtistIdAndName(artistId uint, name string) (*core.Album, error)

func (*AlbumRepository) GetById

func (r *AlbumRepository) GetById(id uint) (*core.Album, error)

func (*AlbumRepository) Store

func (r *AlbumRepository) Store(a *core.Album) (*core.Album, error)

type ArtistRepository

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

func NewArtistRepository

func NewArtistRepository(dbHandler *gorm.DB) *ArtistRepository

func (*ArtistRepository) GetByArtistId

func (r *ArtistRepository) GetByArtistId(artistId string) (*core.Artist, error)

func (*ArtistRepository) GetById

func (r *ArtistRepository) GetById(id uint) (*core.Artist, error)

func (*ArtistRepository) Store

func (r *ArtistRepository) Store(a *core.Artist) (*core.Artist, error)

type IAlbumRepository

type IAlbumRepository interface {
	GetById(id uint) (*core.Album, error)
	GetByAlbumId(albumId string) (*core.Album, error)
	GetByArtistIdAndName(atristId uint, name string) (*core.Album, error)
	Store(p *core.Album) (*core.Album, error)
}

type IArtistRepository

type IArtistRepository interface {
	GetById(id uint) (*core.Artist, error)
	GetByArtistId(artistId string) (*core.Artist, error)
	Store(p *core.Artist) (*core.Artist, error)
}

type IMissingReleaseRepository

type IMissingReleaseRepository interface {
	Fetch() []*core.MissingRelease
	FindByAlbumAndArtist(albumName string, artistName string) []*core.MissingRelease
	Store(r *core.MissingRelease) (*core.MissingRelease, error)
}

type IPlaylistRepository

type IPlaylistRepository interface {
	Fetch() []*core.Playlist
	GetById(id uint) (*core.Playlist, error)
	Store(p *core.Playlist) (*core.Playlist, error)
	Update(id uint, p *core.Playlist) (*core.Playlist, error)
}

type IReleaseRepository

type IReleaseRepository interface {
	Fetch() []*core.Release
	GetByAlbumType(albumType string) []*core.Release
	Store(p *core.Release) (*core.Release, error)
}

type ITrackRepository

type ITrackRepository interface {
	GetByPlaylistAndTrackId(playlistId uint, trackId string) (*core.Track, error)
	Store(t *core.Track) (*core.Track, error)
}

type MissingReleaseRepository

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

func NewMissingReleaseRepository

func NewMissingReleaseRepository(dbHandler *gorm.DB) *MissingReleaseRepository

func (*MissingReleaseRepository) Fetch

func (*MissingReleaseRepository) FindByAlbumAndArtist

func (r *MissingReleaseRepository) FindByAlbumAndArtist(albumName string, artistName string) []*core.MissingRelease

func (*MissingReleaseRepository) Store

type PlaylistRepository

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

func NewPlaylistRepository

func NewPlaylistRepository(dbHandler *gorm.DB) *PlaylistRepository

func (*PlaylistRepository) Fetch

func (r *PlaylistRepository) Fetch() []*core.Playlist

func (*PlaylistRepository) GetById

func (r *PlaylistRepository) GetById(id uint) (*core.Playlist, error)

func (*PlaylistRepository) Store

func (*PlaylistRepository) Update

func (r *PlaylistRepository) Update(id uint, p *core.Playlist) (*core.Playlist, error)

type ReleaseRepository

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

func NewReleaseRepository

func NewReleaseRepository(dbHandler *gorm.DB) *ReleaseRepository

func (*ReleaseRepository) Fetch

func (r *ReleaseRepository) Fetch() []*core.Release

func (*ReleaseRepository) GetByAlbumType

func (r *ReleaseRepository) GetByAlbumType(albumType string) []*core.Release

func (*ReleaseRepository) Store

func (r *ReleaseRepository) Store(rl *core.Release) (*core.Release, error)

type TrackRepository

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

func NewTrackRepository

func NewTrackRepository(dbHandler *gorm.DB) *TrackRepository

func (*TrackRepository) GetByPlaylistAndTrackId

func (r *TrackRepository) GetByPlaylistAndTrackId(playlistId uint, trackId string) (*core.Track, error)

FEATURE: use cache here

func (*TrackRepository) Store

func (r *TrackRepository) Store(t *core.Track) (*core.Track, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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