repository

package
v0.0.0-...-094ba9a Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoRepository

type MongoRepository interface {
	CreateSong(key string, rawSong *[]byte) error
	GetSongById(objID *primitive.ObjectID) (*models.Song, error)
	UpdateSong(objID *primitive.ObjectID, updatedSong *bson.M) error
	RemoveSongById(objID *primitive.ObjectID) error
	SongFilter(query *bson.M) ([]*models.Song, error)
}

func NewMongoRepository

func NewMongoRepository(songCollection *mongo.Collection) (s MongoRepository)

type MongoRepositoryImpl

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

func (*MongoRepositoryImpl) CreateSong

func (s *MongoRepositoryImpl) CreateSong(key string, rawSong *[]byte) error

func (*MongoRepositoryImpl) GetSongById

func (s *MongoRepositoryImpl) GetSongById(objID *primitive.ObjectID) (*models.Song, error)

func (*MongoRepositoryImpl) RemoveSongById

func (s *MongoRepositoryImpl) RemoveSongById(objID *primitive.ObjectID) error

func (*MongoRepositoryImpl) SongFilter

func (s *MongoRepositoryImpl) SongFilter(query *bson.M) ([]*models.Song, error)

func (*MongoRepositoryImpl) UpdateSong

func (s *MongoRepositoryImpl) UpdateSong(objID *primitive.ObjectID, updatedSong *bson.M) error

Jump to

Keyboard shortcuts

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