dao

package
v0.0.0-...-3cef9ca Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COLLECTION = "movies"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MoviesDAO

type MoviesDAO struct {
	Server   string
	Database string
}

func (*MoviesDAO) Connect

func (m *MoviesDAO) Connect()

Establish a connection to database

func (*MoviesDAO) Delete

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

Delete an existing movie

func (*MoviesDAO) FindAll

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

Find list of movies

func (*MoviesDAO) FindById

func (m *MoviesDAO) FindById(id string) (Movie, error)

Find a movie by its id

func (*MoviesDAO) Insert

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

Insert a movie into database

func (*MoviesDAO) Update

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

Update an existing movie

Jump to

Keyboard shortcuts

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