database

package
v0.0.0-...-926c178 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbConn

type DbConn struct {
	DbClient        *mongo.Client     `json:"dbClient"`
	MusicCollection *mongo.Collection `json:"musicCollection"`
}

DbConn represents meta-data for DB connection.

func Init

func Init() (DbConn, error)

func (*DbConn) AppendNewAlbum

func (db *DbConn) AppendNewAlbum(newAlbum *models.Album) error

func (*DbConn) GetAllAlbums

func (db *DbConn) GetAllAlbums() ([]models.Album, error)

func (*DbConn) GetSpecificAlbum

func (db *DbConn) GetSpecificAlbum(id string) (*models.Album, error)

Jump to

Keyboard shortcuts

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