dao

package
v0.0.0-...-2c97fc3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// COLLECTION defined
	COLLECTION = "movies"
)

Variables

This section is empty.

Functions

func DeleteBook

func DeleteBook(r *http.Request) error

DeleteBook - Delete one record, brought for comparison. Not used

Types

type MoviesDAO

type MoviesDAO struct {
	Server   string
	Database string
}

MoviesDAO is datatype

func (*MoviesDAO) Connect

func (m *MoviesDAO) Connect()

Connect - Establish a connection to database

func (*MoviesDAO) Delete

func (m *MoviesDAO) Delete(movie models.Movie) error

Delete an existing movie

func (*MoviesDAO) FindAll

func (m *MoviesDAO) FindAll() ([]models.Movie, error)

FindAll --Find list of movies

func (*MoviesDAO) FindByID

func (m *MoviesDAO) FindByID(id string) (models.Movie, error)

FindByID - Find a movie by its id

func (*MoviesDAO) Insert

func (m *MoviesDAO) Insert(movie models.Movie) error

Insert a movie into database

func (*MoviesDAO) Update

func (m *MoviesDAO) Update(movie models.Movie) error

Update an existing movie

Jump to

Keyboard shortcuts

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