database

package
v0.0.0-...-ffaba75 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client          *mongo.Client
	Db              *mongo.Database
	AlbumCollection *mongo.Collection
	ImageCollection *mongo.Collection
)

Functions

func ConnectDB

func ConnectDB() error

func CreateAlbum

func CreateAlbum(album model.Album) error

func CreateCollections

func CreateCollections()

func CreateImage

func CreateImage(album model.Album, image model.Image) error

func DeleteAlbumById

func DeleteAlbumById(in model.Album) error

func DeleteAlbumByName

func DeleteAlbumByName(album model.Album) error

func DeleteImageByAlbum

func DeleteImageByAlbum(album model.Album) error

func DeleteImageById

func DeleteImageById(album model.Album, image model.Image) error

func GetAlbumById

func GetAlbumById(in model.Album) (model.Album, error)

func GetAlbumByName

func GetAlbumByName(in model.Album) (model.Album, error)

func GetAllAlbum

func GetAllAlbum() ([]model.Album, error)

func GetAllImage

func GetAllImage(in model.Album) ([]model.Image, error)

func GetImageById

func GetImageById(in2 model.Image) (model.Image, error)

func GetImageById2

func GetImageById2(in model.Album, in2 model.Image) (model.Image, error)

func GetImageByName

func GetImageByName(in model.Album, in2 model.Image) (model.Image, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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