Documentation ¶
Index ¶
- type MongoRepository
- type MongoRepositoryImpl
- func (s *MongoRepositoryImpl) CreateSong(key string, rawSong *[]byte) error
- func (s *MongoRepositoryImpl) GetSongById(objID *primitive.ObjectID) (*models.Song, error)
- func (s *MongoRepositoryImpl) RemoveSongById(objID *primitive.ObjectID) error
- func (s *MongoRepositoryImpl) SongFilter(query *bson.M) ([]*models.Song, error)
- func (s *MongoRepositoryImpl) UpdateSong(objID *primitive.ObjectID, updatedSong *bson.M) error
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 (*MongoRepositoryImpl) RemoveSongById ¶
func (s *MongoRepositoryImpl) RemoveSongById(objID *primitive.ObjectID) error
func (*MongoRepositoryImpl) SongFilter ¶
func (*MongoRepositoryImpl) UpdateSong ¶
Click to show internal directories.
Click to hide internal directories.