db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	AddArtist(ctx context.Context, artists []*model.Artist) (int, error)
	GetArtistsById(ctx context.Context, id string) ([]*model.Artist, error)
	GetArtistByLink(ctx context.Context, link string) (*model.Artist, error)

	AddAlbum(ctx context.Context, albums []*model.Album) (int, error)
	GetAlbumsById(ctx context.Context, id string) ([]*model.Album, error)
	GetAlbumByLink(ctx context.Context, link string) (*model.Album, error)

	AddTracks(ctx context.Context, tracks []*model.Track) (int, error)
	GetTracksByLegacyId(ctx context.Context, id string) ([]*model.Track, error)
	GetTracksByIsrc(ctx context.Context, isrc string) ([]*model.Track, error)
	GetTrackByLink(ctx context.Context, link string) (*model.Track, error)

	GetByLink(ctx context.Context, link string) (model.Type, any, error)
}

func NewMongoRepository

func NewMongoRepository(db *mongo.Database, rec metrics.Recorder, log *logrus.Logger) Repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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