database

package
v0.0.0-...-5588ae0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 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